How to parse SOAP message into Jaxb classes

匿名 (未验证) 提交于 2019-12-03 02:33:02

问题:

I have a SOAPMessage Object. I would like to parse and convert it into a set of Jaxb classes. How would I convert the message into a format that Jaxb can unmarshal?

javax.xml.bind.Unmarshaller.unmarshal(??)

回答1:

The body of the SOAP message contains the actual data and its the bit you want to unmarshal. You could do the following:

Node node = soapMessage.getSOAPBody(); unmarshaller.unmarshal(node)( 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!