Hi again Freeman,
I managed to do a very simple example to reproduce the "jbi-message <==> soap-message" bug. So i can get a complete message log. It should be easier to understand. The WSDL : <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://ejb.proto.mycompany.com" xmlns:impl="http://ejb.proto.mycompany.com" xmlns:intf="http://ejb.proto.mycompany.com" xmlns:tns2="http://dto.proto.mycompany.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <schema targetNamespace="http://ejb.proto.mycompany.com" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://dto.proto.mycompany.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <import namespace="http://dto.proto.mycompany.com"/> <element name="getProtoDTOResponse"> <complexType> <sequence> <element name="getProtoDTOReturn" nillable="true" type="tns2:ProtoDTO"/> </sequence> </complexType> </element> <element name="getProtoDTO"> <complexType> <sequence> <element name="param" nillable="true" type="xsd:string"/> </sequence> </complexType> </element> </schema> <schema targetNamespace="http://dto.proto.mycompany.com" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <complexType name="ProtoDTO"> <sequence> <element name="id" nillable="true" type="xsd:string"/> </sequence> </complexType> </schema> </wsdl:types> <wsdl:message name="getProtoDTORequest"> <wsdl:part element="intf:getProtoDTO" name="parameters"/> </wsdl:message> <wsdl:message name="getProtoDTOResponse"> <wsdl:part element="intf:getProtoDTOResponse" name="parameters"/> </wsdl:message> <wsdl:portType name="ProtoBean"> <wsdl:operation name="getProtoDTO"> <wsdl:input message="intf:getProtoDTORequest" name="getProtoDTORequest"/> <wsdl:output message="intf:getProtoDTOResponse" name="getProtoDTOResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ProtoBeanSoapBinding" type="intf:ProtoBean"> <wsaw:UsingAddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getProtoDTO"> <wsdlsoap:operation soapAction="getProtoDTO"/> <wsdl:input name="getProtoDTORequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getProtoDTOResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="ProtoBeanService"> <wsdl:port binding="intf:ProtoBeanSoapBinding" name="ProtoBean"> <wsdlsoap:address location="http://0.0.0.0:8092/ProtoBeanService"/> </wsdl:port> </wsdl:service> </wsdl:definitions> ServiceMix log : 13 dÚc. 2007 12:10:27 org.apache.cxf.interceptor.LoggingInInterceptor handleMessage INFO: Inbound Message -------------------------------------- Encoding: UTF-8 Headers: {Host=[0.0.0.0:8092], User-Agent=[Java/1.5.0_09], connection=[keep-alive], SOAPAction=["getProtoDTO"], transfer-encoding=[chunked], Pragma=[no-cache],content-type=[text/xml; charset=UTF-8], Cache-Control=[no-cache], Accept=[*]} Message: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getProtoDTO xmlns:ns2="http://ejb.proto.mycompany.com">< param></ param></ns2:getProtoDTO></soap:Body></soap:Envelope> -------------------------------------- DEBUG - CxfBcComponent - Created correlation id: ID:172.xx.xxx.xxx-116d3309a4d-4:0 DEBUG - DeliveryChannelImpl - SendSync ID:172.xx.xxx.xxx-116d3309a4d-4:0 in DeliveryChannel{servicemix-cxf-bc} DEBUG - SedaFlow - Called Flow send DEBUG - DeliveryChannelImpl - Waiting for exchange ID:172.xx.xxx.xxx-116d3309a4d-4:0 (4904c8) to be answered in DeliveryChannel{servicemix-cxf-bc} from sendSync DEBUG - SedaQueue - [EMAIL PROTECTED] dequeued exchange: InOut[ id: ID:172.xx.xxx.xxx-116d3309a4d-4:0 status: Active role: provider interface: {http://ejb.proto.mycompany.com}ProtoBean service: {http://ejb.proto.mycompany.com}ProtoBeanService endpoint: ProtoBean operation: {http://ejb.proto.mycompany.com}getProtoDTO in: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://ejb.proto.mycompany.com" name="getProtoDTORequest" type="msg:getProtoDTORequest" version="1.0"><jbi:part><ns2:getProtoDTO xmlns:ns2="http://ejb.proto.mycompany.com">< param/></ns2:getProtoDTO></jbi:part></jbi:message> ] DEBUG - CxfBcComponent - Received exchange: status: Active, role: provider DEBUG - CxfBcComponent - Retrieved correlation id: ID:172.xx.xxx.xxx-116d3309a4d-4:0 13 dÚc. 2007 12:10:28 org.apache.cxf.interceptor.LoggingInInterceptor handleMessage INFO: Inbound Message -------------------------------------- Headers: {null=[HTTP/1.1 200 OK], Content-Length=[450], Content-Language=[fr-FR], Date=[Thu, 13 Dec 2007 11:10:28 GMT], Server=[WebSphere Application Server/6.1], content-type=[text/xml; charset=utf-8]} Message: -------------------------------------- DEBUG - DeliveryChannelImpl - Send ID:172.xx.xxx.xxx-116d3309a4d-4:0in DeliveryChannel{servicemix-cxf-bc} DEBUG - SedaFlow - Called Flow send DEBUG - SedaQueue - [EMAIL PROTECTED] dequeued exchange: InOut[ id: ID:172.xx.xxx.xxx-116d3309a4d-4:0 status: Active role: consumer interface: {http://ejb.proto.mycompany.com}ProtoBean service: {http://ejb.proto.mycompany.com}ProtoBeanService endpoint: ProtoBean operation: {http://ejb.proto.mycompany.com}getProtoDTO in: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://ejb.proto.mycompany.com" name="getProtoDTORequest" type="msg:getProtoDTORequest" version="1.0"><jbi:part><ns2:getProtoDTO xmlns:ns2="http://ejb.proto.mycompany.com">< param/></ns2:getProtoDTO></jbi:part></jbi:message> out: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://ejb.proto.mycompany.com" name="getProtoDTOResponse" type="msg:getProtoDTOResponse" version="1.0"><jbi:part><p637:getProtoDTOResponse xmlns:p637="http://ejb.proto.mycompany.com"><getProtoDTOReturn><id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/></getProtoDTOReturn></p637:getProtoDTOResponse></jbi:part></jbi:message> ] DEBUG - DeliveryChannelImpl - Notifying exchange ID:172.xx.xxx.xxx-116d3309a4d-4:0(4904c8) in DeliveryChannel{servicemix-cxf-bc} from processInboundSynchronousExchange DEBUG - DeliveryChannelImpl - Notified: ID:172.xx.xxx.xxx-116d3309a4d-4:0(4904c8) in DeliveryChannel{servicemix-cxf-bc} from sendSync 13 dÚc. 2007 12:10:28 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose INFO: Outbound Message -------------------------------------- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><p637:getProtoDTOResponse xmlns:p637="http://ejb.proto.mycompany.com"><getProtoDTOReturn><id xsi:nil="true" /></getProtoDTOReturn></p637:getProtoDTOResponse></soap:Body></soap:Envelope> -------------------------------------- DEBUG - DeliveryChannelImpl - Send ID:172.xx.xxx.xxx-116d3309a4d-4:0 in DeliveryChannel{servicemix-cxf-bc} DEBUG - SedaFlow - Called Flow send DEBUG - SedaQueue - [EMAIL PROTECTED] dequeued exchange: InOut[ id: ID:172.xx.xxx.xxx-116d3309a4d-4:0 status: Done role: provider interface: {http://ejb.proto.mycompany.com}ProtoBean service: {http://ejb.proto.mycompany.com}ProtoBeanService endpoint: ProtoBean operation: {http://ejb.proto.mycompany.com}getProtoDTO in: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://ejb.proto.mycompany.com" name="getProtoDTORequest" type="msg:getProtoDTORequest" version="1.0"><jbi:part><ns2:getProtoDTO xmlns:ns2="http://ejb.proto.mycompany.com">< param/></ns2:getProtoDTO></jbi:part></jbi:message> out: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="http://ejb.proto.mycompany.com" name="getProtoDTOResponse" type="msg:getProtoDTOResponse" version="1.0"><jbi:part><p637:getProtoDTOResponse xmlns:p637="http://ejb.proto.mycompany.com"><getProtoDTOReturn><id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/></getProtoDTOReturn></p637:getProtoDTOResponse></jbi:part></jbi:message> ] DEBUG - CxfBcComponent - Received exchange: status: Done, role:provider DEBUG - CxfBcComponent - Retrieved correlation id: ID:172.xx.xxx.xxx-116d3309a4d-4:0 CXF Client log : 13 déc. 2007 12:10:29 org.apache.cxf.phase.PhaseInterceptorChain doIntercept 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,187] 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.getProtoDTO(Unknown Source) at com.sopra.proto.ejb.ProtoBean_ProtoBean_Client.main(ProtoBean_ProtoBean_Client.java:56) 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,187]] 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 Best regards, Florent. Freeman Fang-2 wrote: > > 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. >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/servicemix-cxf-bc-missing-namespace-prefix-tp14292666s12049p14314128.html Sent from the ServiceMix - User mailing list archive at Nabble.com.