[mule-user] http outbound endpoint and chaining router

3 views
Skip to first unread message

steve k

unread,
Sep 25, 2009, 11:48:08 AM9/25/09
to us...@mule.codehaus.org

Is it possible to capture binary data like an image from the http outbound
endpoint? Also, has anyone seen or dealt with the ReleasingInputStream
class? I get that as the response payload from the http endpoint. I think it
might have to do with the fact that the url path results in a page redirect
once executed. I would love some insight on the issue.

Has anyone experienced problems with the chaining router when first
executing a http endpoint then trying to forward that onto another mule
service via the vm outbound endpoint? I am getting a null pointer exception
and it is not even reaching the next service.
--
View this message in context: http://www.nabble.com/http-outbound-endpoint-and-chaining-router-tp25614433p25614433.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,
Sep 28, 2009, 2:38:15 AM9/28/09
to us...@mule.codehaus.org
Hi,

In your chaining router, you need to make sure to configure the
synchronous attribute of the outbound endpoint properly. Post some
config and we'll be able to help

A

steve k wrote:
> Is it possible to capture binary data like an image from the http outbound
> endpoint? Also, has anyone seen or dealt with the ReleasingInputStream
> class? I get that as the response payload from the http endpoint. I think it
> might have to do with the fact that the url path results in a page redirect
> once executed. I would love some insight on the issue.
>
> Has anyone experienced problems with the chaining router when first
> executing a http endpoint then trying to forward that onto another mule
> service via the vm outbound endpoint? I am getting a null pointer exception
> and it is not even reaching the next service.
>

--

Antoine Borg, Director of Services | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM

See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/

email: _antoin...@ricston.com <mailto:antoin...@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>

steve k

unread,
Sep 28, 2009, 11:49:25 AM9/28/09
to us...@mule.codehaus.org

Here is the snippet of code from the config. The transformer I use on the
response just changes the payload from ReleasingInputStream to a string.

<service name="Service1">
<inbound>
<vm:inbound-endpoint path="Service1"/>
</inbound>
<outbound>
<chaining-router>
<http:outbound-endpoint host="${host}"
responseTrasnformer-refs="ChangePayloadTransformer" port="${port}"
path="${path}" contentType="binary" synchronous="true" />
<vm:outbound-endpoint path="Service2"/>
</chaining-router>
</outbound>
</service>
<service name="Service2">
<inbound>
<vm:inbound-endpoint path="Service2"/>
</inbound>
<component>
<spring-object bean="SaveService2"/>
</component>
</service>

The error I get from the config is:

ERROR 2009-09-28 11:45:00,347 [primaryEntryConnector.receiver.2]
org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy:
null

java.lang.NullPointerException
at
edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:769)
at
org.mule.transport.vm.VMConnector.getReceiverByEndpoint(VMConnector.java:206)
at org.mule.transport.vm.VMConnector.getReceiver(VMConnector.java:154)
at
org.mule.transport.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:91)
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:163)
at org.mule.transport.AbstractConnector.send(AbstractConnector.java:2016)
at
org.mule.endpoint.DynamicURIOutboundEndpoint.send(DynamicURIOutboundEndpoint.java:178)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213)
at
org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:152)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at
org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:159)
at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:123)
at
org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:88)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45)
at
org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:93)
at
org.mule.service.AbstractService.sendToOutboundRouter(AbstractService.java:892)
at org.mule.model.seda.SedaService.doSend(SedaService.java:258)
at org.mule.service.AbstractService.sendEvent(AbstractService.java:500)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
at
org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228)
at
org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188)
at
org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:364)
at
org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252)
at
org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:175)
at
org.mule.transport.vm.VMMessageReceiver.onCall(VMMessageReceiver.java:107)
at
org.mule.transport.vm.VMMessageDispatcher$2.doInTransaction(VMMessageDispatcher.java:125)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at
org.mule.transport.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:128)
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:163)
at org.mule.transport.AbstractConnector.send(AbstractConnector.java:2016)
at
org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:76)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213)
at
org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:152)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at
org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:159)
at
org.mule.routing.outbound.FilteringOutboundRouter.route(FilteringOutboundRouter.java:79)
at
org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:88)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45)
at
org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:93)
at
org.mule.service.AbstractService.sendToOutboundRouter(AbstractService.java:892)
at org.mule.model.seda.SedaService.doSend(SedaService.java:258)
at org.mule.service.AbstractService.sendEvent(AbstractService.java:500)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
at
org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228)
at
org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188)
at
org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:364)
at
org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252)
at
org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193)
at
org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:273)
at
org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:227)
at
org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:190)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Unknown Source)

antoine.borg wrote:
>
> Hi,
>
> In your chaining router, you need to make sure to configure the
> synchronous attribute of the outbound endpoint properly. Post some
> config and we'll be able to help
>
> A
>
>

--
View this message in context: http://www.nabble.com/http-outbound-endpoint-and-chaining-router-tp25614433p25645415.html


Sent from the Mule - User mailing list archive at Nabble.com.

Antoine Borg

unread,
Sep 29, 2009, 2:33:30 AM9/29/09
to us...@mule.codehaus.org
Set the vm://service2 endpoint to synchronous both in the ChainingRouter
and in the Inbound section of the next service. As it is, Mule thinks
that when the message is sent from the ChainingRouter, it should not
wait for a reply (since synchronous="false" by default).

A

--

Antoine Borg, Director of Services | Tel: +32 28 504 696

ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM

See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/

---------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages