soap xml_SOAP XML消息–使用Liquid XML Studio进行了解和创建

soap xml

什么是SOAP? (What Is SOAP?)

Soap is an XML based transport protocol. Soap stands for Simple Object Access Protocol. Soap is a lightweight mechanism for exchanging structured and typed information. As it is XML based so it is language and platform independent. SOAP has been a widely accepted protocol for XML based system- to- system communications so several web services rely on SOAP.

肥皂是一种基于XML的传输协议。 Soap代表简单对象访问协议 。 Soap是用于交换结构化和类型化信息的轻量级机制。 由于它基于XML,所以它与语言和平台无关。 SOAP已经成为基于XML的系统间通信的一种广泛接受的协议,因此一些Web服务都依赖SOAP。

SOAP has the following Elements:

SOAP具有以下元素:

  • Envelope

    信封
  • Header

    标头
  • Body

    身体
  • Fault

    故障

SOAP Envelope:  You can consider Envelope as the Root Element in XML. It is configured to get notified that when the message transfer is over and when you need to stop receiving the message and process it. Just like XML Root is mandatory, Envelope is also a mandatory part of Soap. Every Envelope must contain one body Element in it. Inside the Envelope positions, all the elements are fixed and cannot be changed. The Element is prefixed by ENV Namespace.

SOAP信封 :您可以将信封视为XML中的根元素。 它被配置为在消息传输结束以及何时需要停止接收消息并对其进行处理时得到通知。 就像XML Root是必需的一样,信封也是Soap的必需部分。 每个信封中都必须包含一个身体元素。 在“包络”位置内,所有元素都是固定的,无法更改。 元素以ENV命名空间为前缀。

An Envelope looks like this

信封看起来像这样

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="https://www.w3.org/2001/12/soap-envelope"

SOAP-ENV:encodingStyle="https://www.w3.org/2001/12/soap-encoding">
  ...
  Message information goes here
  ...
</SOAP-ENV:Envelope>

SOAP Header: Header in Element can exist multiple times in the soap. The header element will always be the first child of the Envelope. Header Elements are used to add new features and functionality in the soap. All the List Header Elements come after Envelope Start Element and Body Start Element. Header Element has the following two Attributes.

SOAP标头 :Element中的头可以在肥皂中多次存在。 标头元素将始终是信封的第一个子元素。 标头元素用于在肥皂中添加新功能。 所有列表标题元素都位于信封开始元素和正文开始元素之后。 标头元素具有以下两个属性。

SOAP Body: Body is a mandatory part of a soap message. It contains the data which needs to be exchanged in a soap message. The body should be inside an Envelope and below a Header. Soap based web services can be implemented on IIS Server and then the Soap processor will map the body information to .net based objects.

SOAP正文:正文是肥皂消息的必需部分。 它包含需要在肥皂消息中交换的数据。 主体应位于信封内且标题下。 可以在IIS服务器上实现基于Soap的Web服务,然后Soap处理器会将主体信息映射到基于.net的对象。

SOAP Faults: For Error Handling Fault element is included in a soap message. This is also present inside Envelope and after a body element. Fault element has the following sub-elements.

SOAP Faults :肥皂消息中包含“错误处理错误”元素。 这也存在于Envelope内部和body元素之后。 故障元素具有以下子元素。

  • Fault Code: This is an error code which details the type of error code that has been generated.

    故障代码:这是一个错误代码,详细说明了已生成的错误代码的类型。
  • Fault String: small description about the error.

    故障字符串:有关错误的简短描述。
  • Fault Actor: Possible cause of error. This is useful when the service is served through many hope and it is intended that this will tell you which hope had created the error.

    故障角色:可能的错误原因。 当通过许多希望提供服务时,这很有用,它可以告诉您是哪个希望导致了错误。
  • Details: Detailed description of error caused.

    详细信息:引起的错误的详细描述。

To create a SOAP Message for SOAP-based web service from the Liquid XML Editor is very easy to do, here’s how;

要从Liquid XML Editor创建基于SOAP的Web服务的SOAP消息非常容易,这就是方法。

Step 1: Download the Liquid Xml Editor from here and install.

步骤1:从此处下载Liquid Xml Editor,然后安装。

Step 2: Create a new project.

步骤2:创建一个新项目。

Step 3: Right click on documents Add a new item.

第3步:右键单击文档添加新项目。

 Step 4: Now click on icon which says Call A Webservice.

  第4步:现在,单击“ 调用Web服务”图标

Step 5: Provide the webservice URL and click on Test.

第5步:提供Web服务URL,然后单击“ 测试”。

Step 6: Once the test is successful, click on New .

步骤6:测试成功后,点击新建。

Step 7: A list of soap methods is displayed.

步骤7:显示肥皂方法列表。

Step 8: Click on any of the methods for which you need to create SOAP-based XML.

步骤8:单击您需要创建基于SOAP的XML的任何方法。

Step 9: Now click Finish to complete the operation.

步骤9:现在,单击Finish(完成)以完成操作。

SOAP will be generated for your operation.

将为您的操作生成SOAP。

翻译自: https://www.journaldev.com/458/soap-xml-message-understanding-and-creating-with-liquid-xml-studio

soap xml

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值