aspose file tools*
The moose likes Web Services and the fly likes SOAP body - multiply choice parts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP body - multiply choice parts" Watch "SOAP body - multiply choice parts" New topic
Author

SOAP body - multiply choice parts

Michal Gsh
Greenhorn

Joined: Aug 04, 2008
Posts: 1
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

Joined: Jul 05, 2011
Posts: 40
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

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


My free books and tutorials: http://www.slideshare.net/krizsan
 
 
subject: SOAP body - multiply choice parts