开发者

How to parse SOAP response in JAX-WS?

How should i parse SOAP r开发者_如何学Goesponse? Do i have to write LogicalHandler (like here http://www.java-tips.org/java-ee-tips/java-api-for-xml-web-services/writing-a-handler-in-jax-ws.html) to get the payload of response and then use SAX to parse it or are there any other handy methods in JAX to do this?

I only need data from some xml tags in response?


If you use any JAX-WS implementation (CXF, Axis2, Metro) you shouldn't really have to parse responses. You can generate JAXB annotated classes from the WSDL of the web service you want to access and have marshallers to bind the XML payload to generated java beans.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜