SOAP web service sends unexpected element. How to handle the response from the service in my case?

Hello!
The bottom line is this: there is a web service that I call and get the answer. But the response has an unexpected namespace
Unmarshalling Error: unexpected element (uri:"urn:otrs-com:soap:functions", local:"SessionID"). Expected elements are <{}Error>,<{}SessionID>

In the source code that generate the cxf-codegen-plugin this namespace is missing. If it manually in the generated XmlRootElement class, the response is parsed successfully. When regeneration classes all the changes I accordingly lose.
What best practise exists in such situations how best to proceed?
Thank you.

The same generated response class
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"sessionID",
"error"
})
@XmlRootElement(name = "SessionCreateResponse")
public class SessionCreateResponse {

 @XmlElement(name = "SessionID", required = true)
 protected String sessionID;
 @XmlElement(name = "Error")
 protected OTRSError error;

/**
 * Gets the value of the sessionID property.
 * 
 * @return
 * possible object is
 * {@link String }
 * 
*/
 public String getSessionID() {
 return sessionID;
}

/**
 * Sets the value of the sessionID property.
 * 
 * @param value
 * allowed object is
 * {@link String }
 * 
*/
 public void setSessionID(String value) {
 this.sessionID = value;
}

/**
 * Gets the value of the error property.
 * 
 * @return
 * possible object is
 * {@link OTRSError }
 * 
*/
 public OTRSError getError() {
 return error;
}

/**
 * Sets the value of the error property.
 * 
 * @param value
 * allowed object is
 * {@link OTRSError }
 * 
*/
 public void setError(OTRSError value) {
 this.error = value;
}

}

Contents of package-info
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.otrs.org/TicketConnector/")
package org.otrs.ticketconnector;

March 23rd 20 at 19:45
0 answer

Find more questions by tags SOAPJava