我开始处理SOAP消息,我需要获取此响应的字符串然后将其转换为图片,但问题是要让字符串开始用。从Java的SOAP C#Webservice获取单个数据片段
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ObtenerImagenResponse xmlns="http://localhost/WebService">
<ObtenerImagenResult>This is a picture</ObtenerImagenResult>
</ObtenerImagenResponse>
</soap:Body>
</soap:Envelope>
如何从Java中提取“这是一张图片”。
(我熟悉发送SOAP消息,我也可以得到一些消息,这要感谢一些C但我不知道如何使用它们)。
预先感谢您。如果需要,我可以提供更多信息,但这只是很多类似的SOAP响应的示例,我无法阅读,哪些响应携带一个单一元素。
你可以使用XPath http://stackoverflow.com/questions/2811001/how-to-read-xml-using-xpath-in-java –