在SOAP-UI中,我向这样的Web服务发出请求:
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xxx="http://xxx.call/">
- <soapenv:Header/>
- <soapenv:Body>
- <cotf:call_XXX>
- <!--Optional:-->
- <arg0>
- <!--Optional:-->
- <parameter1>some text</parameter1>
- <!--Optional:-->
- <parameter2>XML string</parameter1>
- </arg0>
- </cotf:call_XXX>
- </soapenv:Body>
- </soapenv:Envelope>
我想知道的是如何可以传递参数2上的XML字符串,因为如果我直接放置XML字符串假定XML字符串节点作为请求参数….
谢谢
编码所需的XML实体或使用CDATA。
- <arg0>
- <!--Optional:-->
- <parameter1><test>like this</test></parameter1>
- <!--Optional:-->
- <parameter2><![CDATA[<test>or like this</test>]]></parameter2>
- </arg0>