本文介绍了如何将SOAP消息解析为Jaxb类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个SOAPMessage对象。我想解析并将其转换为一组Jaxb类。
如何将消息转换为Jaxb可以解组的格式?
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(??)
javax.xml.bind.Unmarshaller.unmarshal(??)
推荐答案
SOAP消息的正文包含实际数据及其要解组的位。您可以执行以下操作:
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)(
这篇关于如何将SOAP消息解析为Jaxb类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!