Skip to main content

How to eliminate optional element from soap request

1 reply [Last post]
SrrSub
Offline
Joined: 2012-06-14
Points: 0

Hi,

I have a class with two properties which are exclusive to each other, mean either of one can have value at any time and other one will be null.
I have marked both the property as '@XmlElement(required = false, nillable = true)'
When the SOAP request is getting generated it includes the element (for null property) with 'xsi:nil="true"'
Is there any way to prevent JAXB from generating this xml element because web service doesn't expect it to be in request.

Thanks in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
SrrSub
Offline
Joined: 2012-06-14
Points: 0