一个简单的SOAP消息

来源:互联网 发布:水管工人小游戏java 编辑:程序博客网 时间:2024/05/14 06:00

请求消息:

POST   /HelloBean HTTP/1.1

Content-Type:text/xml;charset="utf-8'

Content-冷体会:398

SOAPAction:""

Host:falcon:8080

<?xml version="1.0" encoding="UTF-8"?>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope">

<env:Body>

                 <ansl:hello xmlns:ansl="urn:examples"/>

</env:Body>

</env:Envelope>

响应消息:

HTTP/1.1 200 OK

SOAPAction:""

Content-Type:text/xml; charset=utf-8

Transfer-Encoding:chunked

<?xml version="1.0" encoding="UTF-8"?>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"

                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xmlns:ns0="urn:examples">

                  <env:Body>

                                     <ns0:helloResponse>

                                                     <result xsi:type="xsd:string" >Hello,World!<result>

                                       </ns0:helloResponse>

                    </env:Body>

</env:Envelope>