Hi,
Seems like the soap fault message throw by your axis2 server isn't
comply with the soap1.1 spec [1] or soap1.2 spec [2], so that the cxf bc
can't handle the response soap fault message correctly since cxf bc
follow the soap fault message defined in the specs.
The soap fault message in the soap body should start with
<soap:Fault> ...., but your message start with <Exception> which is
incorrect
Would you please use some tool like tcpmon to dump onwire message
returned from your axis2 server to see if they are comply with the specs?
[1]http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507
[2]http://www.w3.org/TR/2007/REC-soap12-part1-20070427/#soapfault
Regards
Freeman
dhaas wrote:
I am running Fuse 3.3.1.3 and I have a CXFBC consumer defined as follows:
<cxfbc:consumer wsdl="classpath:wsdl/DataGateway.wsdl"
targetService="stake:dgw-request-response"
endpoint="DataMaintenanceJBISOAPPort"
service="dgw:DataMaintenanceJBIService"/>
The service is implemented by a CXFBC provider going to an external service
with the same wsdl. Pretty simple. Everything works fine for requests that
return successfully, but if there is a SOAP fault, servicemix throws an
exception, and I get that JBI error back instead of the original SOAPFault.
Turning on DEBUG logging in servicemix shows the SOAPFault attempting to
come back:
InOut[
id: ID:172.20.2.56-11b6f1e8caa-2:1
status: Active
role: consumer
service: {urn:com.issinc.stake}dgw-request-response
endpoint: endpoint
operation: {http://www.issinc.com/gateway/services/wsdl}query
in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmln
s:msg="http://www.issinc.com/gateway/services/wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w
3.org/2001/XMLSchema-instance" name="QueryRequest" type="msg:QueryRequest"
version="1.0"><jbi:part><ser:Query xmlns:ser=
"http://www.issinc.com/gateway/services">
<!--You have a CHOICE of the next 2 items at this level-->
<ser:snl xmlns:ser="http://www.issinc.com/gateway/services">SHOW
Ai\ Battle\ Plan</ser:snl>
<!--1 or more repetitions:-->
<ser:attr xmlns:ser="http://www.issinc.com/gateway/services">Object
Id</ser:attr>
<ser:attr
xmlns:ser="http://www.issinc.com/gateway/services">Status</ser:attr>
</ser:Query></jbi:part></jbi:message>
out: <?xml version="1.0" encoding="UTF-8"?><JBIFault
xmlns="http://cxf.apache.org/bindings/jbi"><Exception xmlns="">or
g.apache.axis2.AxisFault: The SNL string is invalid, SNL = [SHOW Ai\ Battle\
Plan]; nested exception is:
ipt.tas.QueryPanel.snlmodel.SNLParseException: Error parsing SHOW
Ai\ Battle\ Plan
: "Ai Battle Plan" is not a valid value. Expecting an Object.
at
ipt.tas.gateway.service.data_maint.DataMaintenanceService.getSNLModel(DataMaintenanceService.java:291)
at
ipt.tas.gateway.service.data_maint.DataMaintenanceService.processQuery(DataMaintenanceService.java:117)
at
ipt.tas.gateway.service.data_maint.DataMaintenanceService.query(DataMaintenanceService.java:230)
at sun.reflect.GeneratedMethodAccessor241.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:84)
at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254)
at javax.servlet.http.HttpServlet.service(HttpServlet...
]
DEBUG - DeliveryChannelImpl - Notifying exchange
ID:172.20.2.56-11b6f1e8caa-2:1(11be9d4) in
DeliveryChannel{servicemix-cxf-bc} from processInboundSynchronousExchange
DEBUG - DeliveryChannelImpl - Notified:
ID:172.20.2.56-11b6f1e8caa-2:1(11be9d4) in
DeliveryChannel{servicemix-cxf-bc} from sendSync
And then immediately I see the exception that gets returned to the client:
Jul 29, 2008 8:14:15 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Message wrapper element is
'{http://cxf.apache.org/bindings/jbi}JBIFault' but expected
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
at
org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor.handleMessage(JbiOutWsdl1Interceptor.java:98)
at
org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor.handleMessage(JbiOutWsdl1Interceptor.java:57)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at
org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:198)
at
org.apache.servicemix.cxfbc.CxfBcConsumer.process(CxfBcConsumer.java:199)
at
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handleMessage(CxfBcConsumer.java:525)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:280)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:254)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.lang.Exception: Message wrapper element is
'{http://cxf.apache.org/bindings/jbi}JBIFault' but expected '
{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
... 25 more
DEBUG - DeliveryChannelImpl - Send ID:172.20.2.56-11b6f1e8caa-2:1
in DeliveryChannel{servicemix-cxf-bc}
DEBUG - SecuredBroker - send exchange with secure broker
DEBUG - SedaFlow - Called Flow send
DEBUG - SedaQueue -
[EMAIL PROTECTED] dequeued
exchange: I
That causes my client to receive the following SOAP fault:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Message wrapper element is
'{http://cxf.apache.org/bindings/jbi}JBIFault' but expected
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I have googled for this exception and I don't see it reported anywhere. Is
this a bug or is something misconfigured?