I am consuming a SOAP webservice in my application and i am using JAXB for marshalling/unmarshalling the XML request/response. I was using apache-cxf client for client code generation.
The Service provider added an extra field in the response. However, I am not making use of that field. But still addition of a new simple string type field to the already existing complex type disturbed the service and I am getting the below error.
"javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unexpected element (uri:"http://", local:"aaa")"
Could some one please help me in fixing this issue without regenrating the client code?
You have to regenerate client code, because contract was changed by provider. It is very bad idea to put any workaround for that.