Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP body - multiply choice parts

 
Michal Gsh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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!
 
Vijay keshava
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic