Forums Register Login

@WebParam with complex type

+Pie Number of slices to send: Send
Hi,

I have a web-service method with a complex type parameter

in the request soap message i get :


while I want to get this result :


assuming




Is that possible

Thanks in advance
+Pie Number of slices to send: Send
Hi!
Yes, it is possible.
I would experiment with creating a WSDL and generating code from it to see exactly how you need to implement your JAXB bean class.
Assuming you use a JAX-WS web service stack and JAXB.
Best wishes!
+Pie Number of slices to send: Send
Thank you for your help
I did annoted my Person class as :


Is that what you meant?
+Pie Number of slices to send: Send
Hi!
Take a look at the JavaDoc for the annotation javax.xml.bind.annotation.XmlElement.
There are some examples there as well as documentation of the different attributes of the @XmlElement annotation, for instance nillable and required, that may be of use to you.
Best wishes!
My cellmate was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 8405 times.
Similar Threads
Why qualified XML elements are erroring out ?
Significance of XML encoding/decoding over Serialization
Beginning code - what am I missing?
value for the useBean class attribute Invalid Problem
Search Method . Passing values Problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:39:17.