【发布时间】:2012-02-14 11:23:06
【问题描述】:
我在 VB 中编写了一个简单的 Web 服务 (ASMX) 函数:
公共函数 processMessage(ByVal Messages as XMLElement) As String 将 strS 调暗为字符串 strS = Messages.outerXML 返回 strS 结束功能并通过发送以下请求进行测试(尝试读取两条消息):
<soap:信封 xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gps-hex-communicator"> <soap:标题/> <肥皂:身体> <processMessage xmlns="urn:gps-hex-communicator"> <消息> <留言> <DeviceID>11A</DeviceID> <MessageID>1111B</MessageID> </留言> <留言> <DeviceID>22A</DeviceID> <MessageID>2222B<MessageID> </留言> </消息> </processMessage> </肥皂:身体> </soap:信封>并得到以下响应:
<soap:信封 xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns :xsd="http://www.w3.org/2001/XMLSchema"> <肥皂:身体> <processMessageResponse xmlns="urn:gps-hex-communicator"> <processMessageResult><![CDATA[<Message xmlns="urn:gps-hex-communicator"> <DeviceID>11A</DeviceID> <MessageID>1111B</MessageID> </Message>]]></processMessageResult> </processMessageResponse> </肥皂:身体> </soap:信封>问题是它在阅读第一条消息后停止,而第二条则永远不会出现。我怎样才能得到它?
【问题讨论】:
标签: xml vb.net web-services soap asmx