File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes @WebParam with complex type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "@WebParam with complex type " Watch "@WebParam with complex type " New topic
Author

@WebParam with complex type

leo karlsson
Greenhorn

Joined: Jul 27, 2011
Posts: 2
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
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
leo karlsson
Greenhorn

Joined: Jul 27, 2011
Posts: 2
Thank you for your help
I did annoted my Person class as :


Is that what you meant?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @WebParam with complex type