开发者

Using jaxb classes as parameters or results of web-methods

开发者 https://www.devze.com 2023-03-10 18:15 出处:网络
I am making web service tha开发者_JS百科t generates and accepts xml information, and i am wondering, whether generated from xml schema jaxb classes could be transferred as-is.The details depends on wh

I am making web service tha开发者_JS百科t generates and accepts xml information, and i am wondering, whether generated from xml schema jaxb classes could be transferred as-is.


The details depends on what technology you're using as the transport for your web service but the answer is yes.

For example, if you're using JAX-WS (for soap) or JAX-RS (for rest) then both of those technologies have a way of using JAXB objects. If you're writing a pure servlet then you can marshal the JAXB objects and write the XML onto the response or unmarshal the request with JAXB. Of course, your client is also going to need some way of interpreting the data.

0

精彩评论

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

关注公众号