• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SOAP body - multiply choice parts

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to develope web service whose body consist only one part per request but there is a choice between these parts. I mean, it can look like this:


so:
or:

my solution was to create type in my newly created schema:

and then wsdl:message:

but then i have new enclosing tag NotWantedTag, which can't be there:


Have you got any other solutions?? is it possible to have a choice at body level without any additional tag.
Thanks for help in advance!
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont think this would be possible. Even if it were to be then the solution would not be interoperable. You should ideally be creating 2 seperate services.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
You may want to have a look at the @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) annotation, that enable you to set a parameter style.
I am not entirely sure that this will give you the desired result, but give it a try and let us know!
If you are doing WSDL-first development, then there should be a way to specify the parameter style through a JAXB binding file.
Best wishes!
 
reply
    Bookmark Topic Watch Topic
  • New Topic