Hi Florent,

Yes, cxf doesn't support soap encoded, you should avoid using soapenc with cxf.

But about the prefix missing issue, it seems like something wrong during jbi message <===> soap message transformation.

Would you please append the whole jbi message and soap message, or whole logs you get, as well as the wsdl you are using.

Best Regards

Freeman

Florent wrote:
Hi again,

To bypass the problem, i put an empty object in every nillable array
(instead of a null value).

But, i got a new error (very similar to the first one) :

INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared namespace
prefix "soapenc" (for attribute "arrayType")
at [row,col {unknown-source}]: [1,680] at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:559)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:465)
        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
        at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1948)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        at $Proxy27.searchAutorisationByInternalAutorisationNumberDTO(Unknown
Source)
        at
com.mycompany.fcb.ejb.ejb.ReadAutorisationBean_ReadAutorisationBean_Client.main(ReadAutorisationBean_ReadAutorisationBean_Client.java:59)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix
"soapenc" (for attribute "arrayType")
 at [row,col {unknown-source}]: [1,680]]
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:396)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:334)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:311)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:545)
        ... 17 more

That doesn't suprise me, especially regardin the soap message i posted in my
previous mail :

<repaymentDate>2007-12-31T23:00:00.000Z</repaymentDate>
<subjectToApproval
        soapenc:arrayType="p724:SubjectToApprovalDTO[0]"
        xmlns:p724="http://dto.fcb.mycompany.com"; />
<syndication xsi: nil="true" />
<syndicationReference xsi:nil="true" />
<tolerancePercentage>1.0</tolerancePercentage>

There is a soapenc namespace prefix, but there is no soapenc namespace
declaration...
I remember from one of my previous post, you said cxf doesn't support
soapenc, isn't it?

Is it possible to get the get the namespace declaration, even if it's not
used by cxf?

Best regards,
Florent.



Florent wrote:
Hello,

I still have the same configuration :
- Web service server (WAS 6.1)
- Servicemix-cxf-bc consumer / provier (used as a bridge)
- Web service client (CXF)

I got some nillable array in my WSDL definition. Everything is ok as long
as those arrays are not null.
But when they are, "xsi:nil="true"" is added to the soap message.
Everything is still ok as long as i don't use the bridge (direct WS call
from my CXF client)

When i used the bridge, here is a part of the jbi out message :

<commitmentCode>1130</commitmentCode>
<companyCode>071</companyCode>
<consolidatedAutorisation
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:nil="true" />
<consolidatedUtilisation
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:nil="true" />

But here is a part of the soap out message :

<repaymentDate>2007-12-31T23:00:00.000Z</repaymentDate>
<subjectToApproval
        soapenc:arrayType="p724:SubjectToApprovalDTO[0]"
        xmlns:p724="http://dto.fcb.mycompany.com"; />
<syndication xsi: nil="true" />
<syndicationReference xsi:nil="true" />
<tolerancePercentage>1.0</tolerancePercentage>

As you can see, there is no
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

And here is the error log of cxf client :

INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Undeclared
namespace prefix "xsi" (for attribute "nil")
at [row,col {unknown-source}]: [1,613] at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:559)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:465)
        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
        at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1948)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
        at $Proxy27.searchAutorisationByInternalAutorisationNumberDTO(Unknown
Source)
        at
com.mycompany.fcb.ejb.ejb.ReadAutorisationBean_ReadAutorisationBean_Client.main(ReadAutorisationBean_ReadAutorisationBean_Client.java:59)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "xsi"
(for attribute "nil")
 at [row,col {unknown-source}]: [1,613]]
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:396)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:334)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:311)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:545)
        ... 17 more


Does servicemix-cxf supports
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; namespace refix?

Thanks in advance,
Best regards,
Florent.


Reply via email to