This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

@WebParam with complex type  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
leo karlsson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help
I did annoted my Person class as :


Is that what you meant?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!