I am making web service that generates and accepts xml information, and i am wondering, whether generated from xml schema jaxb classes could be transferred as-is.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.