Web Services入门
WSDL教程
SOAP教程
- SOAP 介绍
- SOAP 消息语法结构
- SOAP Envelope 根元素详解
- SOAP Header 元素详解
- SOAP Body 元素详解
- SOAP Fault 元素详解
- SOAP HTTP 协议
- SOAP 简单示例
UDDI教程
开源项目
知识点
相关文章
更多最近更新
更多SOAP Body 元素详解
2019-04-26 16:35|来源: 网路
SOAP Body 元素
强制使用的 SOAP Body 元素包含实际的 SOAP 消息。
SOAP Body 元素
必需的 SOAP Body 元素可包含打算传送到消息最终端点的实际 SOAP 消息。
SOAP Body 元素的直接子元素可以是合格的命名空间。
实例
<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body> <m:GetPrice xmlns:m="http://www.w3schools.com/prices"> <m:Item>Apples</m:Item> </m:GetPrice> </soap:Body> </soap:Envelope>
上面的例子请求苹果的价格。请注意,上面的 m:GetPrice 和 Item 元素是应用程序专用的元素。它们并不是 SOAP 标准的一部分。
而一个 SOAP 响应应该类似这样:
<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body> <m:GetPriceResponse xmlns:m="http://www.w3schools.com/prices"> <m:Price>1.90</m:Price> </m:GetPriceResponse> </soap:Body> </soap:Envelope>
相关问答
更多-
如何用JDOM解析SOAP(How parse SOAP with JDOM)[2022-07-29]
Body元素位于http://schemas.xmlsoap.org/soap/envelope/命名空间中,但您使用的是单个参数getChildren方法,该方法在无命名空间中查找元素。 您需要将适当的Namespace传递给getChildren的双参数版本。 The Body element is in the http://schemas.xmlsoap.org/soap/envelope/ namespace, but you're using the single argument getChi ... -
改变属性soap:body(Changing attributes soap:body)[2023-08-07]
也许你想要覆盖这里描述的序列化器 Perhaps you want to override the serializer as described here -
SOAP请求的问题(Problems with SOAP request)[2023-01-25]
可能是命名空间问题。 在Siebel外部IO中,您可以尝试在ICField级别停用命名空间的所有用户属性。 Could be namespace issue. In the Siebel external IO, you could try inactivating all the user properties for namespace at ICField level. -
可以在Salesforce SOAP响应中添加标题和修改主体吗?(Can A Header Be Added & Body Modified In A Salesforce SOAP Response?)[2022-12-10]
我不相信你可以直接在Apex定义的WebService方法中添加任何类型的SOAP头。 如果你绝对没有其他选择,你可以通过REST Web服务(通过@RestResource注释)构建自己的自定义SOAP响应,但这是一个非常难看的解决方案。 I don't believe you can directly add any kind SOAP headers in an Apex defined WebService methods. If you have absolutely no other optio ... -
我有个坏消息。 开箱即用的安全实现无法做到这一点 ,我不知道如何扩展WCF以支持它,除非您从头开始编写所有WS-Security的东西。 除了要扩展已经实现的协议的场景外,WCF是非常可扩展的 - 这些类大多是密封/内部的,不能重用。 如果这些元素是SOAP头而不是body元素,那么整个问题就完全不同了。 编辑: 我再次检查了你提供的整个SOAP消息我发现了另外两个问题。 我怀疑您的服务提供的安全级别。 它不显示纯文本密码,但它可以是全部。 隐藏密码不仅是您需要的安全性,因为如果安全性未正确实施,攻击者可以 ...
-
Message.CreateMessage(XmlDictionaryReader,Int32,MessageVersion)解决了这个问题。 操纵xml,然后从xml创建新消息。 Message.CreateMessage(XmlDictionaryReader, Int32, MessageVersion) solved the problem. Manipulate the xml and then create the new message from the xml.
-
你应该使用字符串作为你的消息哈希。 您可能还想更改函数调用。 client.call('cred_LogIn', message: { 'sUsername': 'my_username', 'sPassword': 'my_password', 'sConsumerIdent': 'DZ-Manager_Web-Service_Consumer'}, attributes: { xml ...
-
我不知道Simple XML Converter是如何工作的,但元素名称是元素名称,它们可以作为前缀 。 这似乎是混乱,因为:字符用于在物理XML文档(标记)中分隔名称空间前缀和元素名称。 您只需从名称中删除“前缀”并添加@Namespace注释即可。 例如: ResponseEnvelope.java @Root(name = "Envelope") @Namespace(prefix = "soapenv", reference = "http://schemas.xmlsoap.org/soap/en ...
-
解决方案是在Spring WS的JIRA问题中: https : //jira.spring.io/browse/SWS-605 具体来说,解决方案是在@ArjenPoutsma创建的maven项目https://jira.spring.io/secure/attachment/19345/soapheader.zip中 The solution is in this JIRA issue of Spring WS: https://jira.spring.io/browse/SWS-605 In conc ...
-
很明显,该请求根据错误消息丢失了soapAction头。 请添加具有适当值的soapAction 。 Tibco BW 6.3.2 remove the header that contains soapAction due to a bug--> upgrading version to 6.3.3 , the problem is fixed