开发者

Object's life cycle in a WS call

What happ开发者_运维问答ens to a Java object's life when it is passed to a SOAP web service and returned after modification? I know it is serialized, mar-shelled, converted to XML etc. But i am not sure about the sequence.


You usually start with a generated object whose class is decorated with XML annotations. After filling your object with data, you pass it as a parameter to a web service method. The JAX-WS libraries will use JAXB and the annotations on your object to marshal it into XML, pack it into a SOAP message, and send it over the network to a web service endpoint.

On the server side, the SOAP message is disassembled and the object XML is unmarshaled. At this point, the method logic executes and provides a return value. If that return value is another XML serializable object, we go through the whole process again to marshal and send the response.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜