How to parse SOAP message into Jaxb classes

2019-02-28 03:50发布

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(??)

标签: java soap jaxb
1条回答
家丑人穷心不美
2楼-- · 2019-02-28 04:33

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)(
查看更多
登录 后发表回答