I've problems consuming a web service which uses XMLID as element
referencing.
Out of the box calling this web service ends in an exception:
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:
Unmarshalling Error: Undefined ID "1".
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)
at com.sun.proxy.$Proxy55.pullMessage(Unknown Source)
at
de.dmsserver.plugin.ford.test.lds.LDSTest.stageII_test1(LDSTest.java:555)
at de.dmsserver.plugin.ford.test.lds.LDSTest.main(LDSTest.java:441)
Caused by: javax.xml.bind.UnmarshalException: Undefined ID "1".
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:647)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.errorUnresolvedIDREF(UnmarshallingContext.java:699)
at
com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor$IDREFTransducedAccessorImpl$1.run(TransducedAccessor.java:321)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.runPatchers(UnmarshallingContext.java:743)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.endDocument(UnmarshallingContext.java:530)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.endDocument(InterningXmlVisitor.java:52)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.endDocument(SAXConnector.java:99)
at
com.sun.xml.internal.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:121)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:309)
at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:288)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:834)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:102)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder$2.run(JAXBEncoderDecoder.java:894)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:892)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:712)
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:179)
at
org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor.handleMessage(SoapHeaderInterceptor.java:145)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
at
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:216)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
... 3 more
The xml payload looks like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
[...]
<ns3:payloadManifest
xmlns:ns3="http://www.starstandards.org/webservices/2005/10/transport"
xmlns:ns2="http://www.openapplications.org/oagis/9"
xmlns="http://www.starstandard.org/STAR/5">
<ns3:manifest contentID="1"/>
</ns3:payloadManifest>
</soap:Header>
<soap:Body>
<ns3:PullMessageResponse xmlns="http://www.starstandard.org/STAR/5"
xmlns:ns2="http://www.openapplications.org/oagis/9"
xmlns:ns3="http://www.starstandards.org/webservices/2005/10/transport">
<ns3:payload>
<ns3:content id="1">
<ProcessSalesLead>
[...]
</ProcessSalesLead>
</ns3:content>
</ns3:payload>
</ns3:PullMessageResponse>
</soap:Body>
</soap:Envelope>
So the payloadManifest Header references one (or more) content-Objects
in the body.
This is a valid XML but unfortunately cxf/jaxb fails to parse this payload.
Do I need to configure something to be able to handle such variants? Or
is there at least a way to disable this mechanics so that I'm able to
consume this web service at all?
Thanks
Martin