在 SOAP 消息中发布 XML 字符串 [英] Post XML String in SOAP message

查看:45
本文介绍了在 SOAP 消息中发布 XML 字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一些帮助朋友,
我想在 iOS sdk 的 SOAP 消息中发布 XML 字符串.
可以这样做吗?
如果是,请给我一些示例代码.否则建议我这样做的替代方法.
请帮我解决这个问题.
提前致谢.

I want some help friends,
I want to Post XML string in SOAP message in iOS sdk.
Is it possible to do this?
If yes, Please give me some sample code for that. otherwise advice me alternative way to do this.
Please help me to come out from this problem.
Thanks in advance.

代码:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<postCourseUsage xmlns="http://tempuri.org/">
<xml><?xml version="1.0"?><CU><ULID>admin</ULID><CID>myOwn</CID><CURS><CUR><CN>Home</CN><USG><CUSG>2</CUSG><SD>12-Jul-2011 12:41:42</SD></USG></CUR></CURS></CU></xml>
</postCourseUsage>
</soap:Body>
</soap:Envelope>

推荐答案

我得到了答案.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<postCourseUsage xmlns="http://tempuri.org/">
<xml>&lt;?xml version="1.0"?&gt;&lt;CU&gt;&lt;ULID&gt;admin&lt;/ULID&gt;&lt;CID&gt;myOwn&lt;/CID&gt;&lt;CURS&gt;&lt;CUR&gt;&lt;CN&gt;Home&lt;/CN&gt;&lt;USG&gt;&lt;CUSG&gt;2&lt;/CUSG&gt;&lt;SD&gt;12-Jul-2011 12:41:42&lt;/SD&gt;&lt;/USG&gt;&lt;/CUR&gt;&lt;/CURS&gt;&lt;/CU&gt;</xml>
</postCourseUsage>
</soap:Body>
</soap:Envelope>

使用此代码,我可以将 xml 字符串作为参数传递给 soap 消息,并在服务器端将其解释为 XML.

Using this code i can pass xml string as argument in soap message and on the server side it will interprete it as XML.

这篇关于在 SOAP 消息中发布 XML 字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆