Linked Questions

Popular Questions

I have the following problem and cannot find a solution:
The WSDL has elementFormDefault="qualified", in the response that I receive in my CXF client all the elements are prefixed with namespace but JAXB throws an exception

org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"unm:ENTSCWS", local:"searchReturn"). Expected elements are 
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(
    at ...

If i change in the WSDL elementFormDefault="unqualified" it is working, but I am not allowed to change the WSDL, it should have the elements prefixed with the namespace.

The contains the annotaction:

@javax.xml.bind.annotation.XmlSchema(namespace = "unm:ENTSCWS", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package entscws;

The response class contains the annotation:

@XmlType(name = "", propOrder = {
@XmlRootElement(name = "searchResponse")
public class SearchResponse {

Do you have any idea why I get this error?

Related Questions