Hi, I'm using Apache CXF 2.7.11 client to generate the stub classes from WSDL file.
In WSDL, I have few elements like :-
When JAXB is generated then in class I'm getting the attributes like
I have written a client to consume this web service and when I try to trigger the request, I'm getting following
SOAP envelope request :-
In my client I have not mapped these attributes so it is always going to be empty in SOAP request. I do not want to modify the WSDL (means removing these elements from WSDL file) to exclude these nillable elements from SOAP envelope request. My requirement is I do not want these nillable elements in my SOAP envelope request at all. These elements can appear in SOAP envelope request if there is a data otherwise not (assume I have done the mapping in client side).
I understand that if I remove these annotations completely (
@XmlElement(nillable = true)) or make the annotations like
@XmlElement in JAXB classes then it will not appear in SOAP envelope request but modifying so many JAXB classes manually is a difficult task for me.
Is there any way I can configure it in POM.xml file so that at the time of generating the JAXB classes using wsdl2java the annotations does not appear in JAXB classes or some other optimum way to prevent it.
Chunk of POM.xml:-
Thank you