[mule-user] cxf configuration problem

0 views
Skip to first unread message

cary1

unread,
May 27, 2008, 9:45:26 PM5/27/08
to us...@mule.codehaus.org

Hello,

I have a web service client calling a mule cxf service that in turn is
calling a http mule echo service.

I did an wireshark trace and the response from the http echo is not being
handled correctly by the mule cxf service.

This is the relevant log trace:

May 28, 2008 11:28:06 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: class
org.mule.transport.http.ReleasingInputStream nor any of its super class is
known to this context.
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:207)
at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:63)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:84)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77)
at
org.mule.transport.cxf.CxfServiceComponent.sendToDestination(CxfServiceComponent.java:255)
at
org.mule.transport.cxf.CxfServiceComponent.onCall(CxfServiceComponent.java:112)
etc

my mule configuration is:

<service name="PrintWebService">
<inbound>
<cxf:inbound-endpoint
address="http://localhost:8090/services/Print"
serviceName="RFIDPrintService"
serviceClass="nec.resources.rfid.print.RFIDPrint"
responseTransformer-refs="XmlToObject"
synchronous="true"/>
</inbound>

<component>
<!--method-entry-point-resolver>
<include-entry-point method="print"/>
</method-entry-point-resolver-->
<spring-object bean="printService"/>
</component>

<outbound>
<outbound-pass-through-router>
<!--vm:outbound-endpoint address="vm://echo"/-->
<http:outbound-endpoint
contentType="text/plain"
transformer-refs="ObjectToXml"

responseTransformer-refs="XmlToObject StreamToString"

address="http://localhost:18080/print/"/>
</outbound-pass-through-router>

</outbound>
</service>

<service name="EchoService">
<inbound>
<vm:inbound-endpoint
path="echo"
transformer-refs="ObjectToXml"
responseTransformer-refs="XmlToObject"
synchronous="true"/>
<inbound-endpoint
transformer-refs="StreamToString"
address="http://localhost:18080/print"
synchronous="true"/>
</inbound>
<component>
<method-entry-point-resolver>
<include-entry-point method="echo"/>
</method-entry-point-resolver>
<spring-object bean="echo"/>
</component>
</service>

None of the responseTransformers are being triggered (which I find
unexpected).

There is no problem if I use the echo's vm service.

I don't understand why Mule is handing the InputStream from the http
response all the way down to the JAXB marshaller.

Any ideas,

Cary
--
View this message in context: http://www.nabble.com/cxf-configuration-problem-tp17503725p17503725.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Antoine Borg

unread,
May 28, 2008, 4:03:52 AM5/28/08
to us...@mule.codehaus.org
Hello,

If you follow the VM endpoints, the following transformations happen:

1. ObjectToXML (inbound of Echo Service; Echo Component receives XML)
2. XMLToObject (response transformer of Echo service inbound endpoint;
Object returned.)
3. XMLToObject (response transformer of the Print service's inbound endpoint
... Is this correct?)

If you follow the HTTP endpoints, the following transformations happen:

1. ObjectToXML (outbound HTTP endpoint on Print Service; XML sent to Echo
Service)
2. StreamToString (inbound HTTP endpoint on Echo Service; This is different
to the above list)
3. XMLToObject (response transformer on outbound HTTP endpoint for Print
service; Echo would return the string - is this transformation appropriate?)
4. StreamToString (response transformer on outbound HTTP endpoint for Print
service; You'd be transforming an object here - is this transformation
appropriate?)

Antoine Borg, Senior Consultant | Tel: +356 21334457 | Fax: +356 21 334156
ricston Ltd., Lincoln, 7 Ferdinand Grech Street, Lija LJA1142, MALTA
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com

cary1

unread,
May 29, 2008, 8:25:43 PM5/29/08
to us...@mule.codehaus.org

I want to close off this post just in case anyone looking through experiences
the same problem.

The problem was the responseTransformers on the endpoints weren't being
invoked.

I discovered this is a bug in Mule v2.0 but has been addressed in the newest
release, Mule 2.0.1.

Thankyou,

Cary
--
View this message in context: http://www.nabble.com/cxf-configuration-problem-tp17503725p17549009.html

Reply all
Reply to author
Forward
0 new messages