Forums Register Login

SOAP body - multiply choice parts

+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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!
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2673 times.
Similar Threads
MS Exchange web service: If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute
An access occurred that is not valid
change result xml element name
Empty target namespace with axis1.2
AXIS 1.4 Response XML Help-Urgent
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:39:25.