I'm facing the following error:
org.apache.cxf.interceptor.Fault: Unmarshalling Error:
unexpected element (uri:"URL1", local:"cdrNummer")
Expected elements are <{URL2}cdrNummer>,<{URL2}meldingen>,<{URL2}akteafschrift>
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:932) ~[cxf-rt-databinding-jaxb-3.3.5.jar:3.3.5]
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:738) ~[cxf-rt-databinding-jaxb-3.3.5.jar:3.3.5]
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:170) ~[cxf-rt-databinding-jaxb-3.3.5.jar:3.3.5]
Setup using stub service running locally, which returns data. Using apache.cxf version 3.3.5.
When I hit that service for the first 6 times - it fails with above error even though I see successful response (SOAP envelope) in the logs. Hitting service for the 7th time returns a successful response "Without" throwing the above error and then things work fine until I restart the application.
I have verified the schema definition and it seems correct:
<xs:complexType name="opvragenAkteafschriftAntwoord">
<xs:sequence>
<xs:element name="cdrNummer" type="types:cdrNummer">
<xs:annotation>
<xs:documentation>useful</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="akteafschrift" type="types:akteafschrift"/>
<xs:element minOccurs="0" name="meldingen" type="types:meldingen"/>
</xs:sequence>
</xs:complexType>
First argument cdrNummer
is mandatory, where as the other two are optional. Also tried to supply the other two optional arguments, then also just URL value changes, but I get the same unmarshalling error.