(Urgent)Query regarding HttpRouter/JBR-provider
puneetjain Apr 6, 2008 6:55 AMHi,
I am writing an application in JBossESB.
Environement:
=========
JBoss Application Server -4.2.2.GA
JbossESB 4.2.1GA
I am using jbr-provider for http protocol support. I have to route the http request to a servlet from JBossESB. To achieve this I have written below configuration. Regarding the component used in the configuration I have few questions:
Question 1:
=======
Does HttpRouter supports only OneWay communication? As per the java code of HttpRouter class (Line No 113) the message returned by the class is always null. How can I get the response back sent by the URL called?
Question2:
=======
It seems that jbr-provider have support for the data sent by Http POST method only as the body of message is null in case of GET request and Exception is thrown.
Is so what is the way to handle data sent by GET Request?
Exception is given below:
Question:
=======
Is there any other router class to invoke a request to a Servlet in RequestResponse mep?
<?xml version = "1.0" encoding = "UTF-8"?> <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5"> <providers> <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-context-factory="org.jnp.interfaces.NamingContextFactory" jndi-URL="localhost"> <jms-bus busid="sampleEsbChannel"> <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_sample_esb"/> </jms-bus> </jms-provider> <jbr-provider name="JBR-Http" protocol="http" host="0.0.0.0"> <jbr-bus busid="Http-1" port="8765" /> </jbr-provider> </providers> <services> <service category="SampleCategory" name="Sample" description="WS Frontend speaks natively to the ESB"> <listeners> <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" maxThreads="1"/> <jms-listener name="JMS-ESBListener" busidref="sampleEsbChannel" maxThreads="1"/> </listeners> <actions> <action name="httprouter" class="org.jboss.soa.esb.actions.routing.HttpRouter"> <property name="routeUrl" value="http://localhost:8080/servlet"></property> </action> </actions> </service> </services> </jbossesb>
Exception:
15:41:29,211 INFO [MessagePayloadProxy] Setting null data in message location(s): [org.jboss.soa.esb.message.defaultEntry] 15:41:29,226 WARN [ServiceInvoker] Badly formed EPR [EPR: PortReference < <wsa:Address http://0.0.0.0:8765/> >] for Service [SampleCategory:Sample] and Message [header: [ ]].Courier for EPR not supported! 15:41:29,242 INFO [ServiceInvoker] Invalid EPR for service: ignoring for message: header: [ ] 15:41:30,211 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/quickstart_sample_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/> > ] ReplyTo: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/quickstart_sample_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:java.nam ing.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='cbfddd36-8ad3-4af7-8a68-13f2cf8af0d2'/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] Me ssageID: ID:2-12074766900861 RelatesTo: jms:correlationID#5121a176-0b5f-4e4b-bdcb-c388236db385 ] org.jboss.soa.esb.actions.ActionProcessingException: org.jboss.soa.esb.listeners.message. MessageDeliverException: Null data found in message location(s): [org.jboss.soa.esb.message.defaultEntry] at org.jboss.soa.esb.actions.routing.HttpRouter.process(HttpRouter.java:95) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316) at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(MessageAwareListener.java:303) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: org.jboss.soa.esb.listeners.message.MessageDeliverException: Null data found in message locati on(s): [org.jboss.soa.esb.message.defaultEntry] at org.jboss.soa.esb.message.MessagePayloadProxy.getPayload(MessagePayloadProxy.java:161) at org.jboss.soa.esb.actions.routing.HttpRouter.process(HttpRouter.java:93) ... 5 more 15:41:30,304 ERROR [JBossRemotingGatewayListener] JBoss Remoting Gateway failed to synchronously deliver message to target service [SampleCategory:Sample]. org.jboss.soa.esb.couriers.FaultMessageException: org.jboss.soa.esb.actions.ActionProcessingException: org.jboss.soa.esb.listeners.message.Me ssageDeliverException: Null data found in message location(s): [org.jboss.soa.esb.message.defaultEntry] at org.jboss.soa.esb.listeners.message.errors.Factory.createExceptionFromFault(Factory.java:49) at org.jboss.internal.soa.esb.couriers.helpers.JmsComposer.compose(JmsComposer.java:83) at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:393) at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:223) at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:205) at org.jboss.soa.esb.client.ServiceInvoker$EPRInvoker.attemptDelivery(ServiceInvoker.java:444) at org.jboss.soa.esb.client.ServiceInvoker$EPRInvoker.access$200(ServiceInvoker.java:370) at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:259) at org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:155) at org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter.deliverSyncWithoutDecomposing(UncomposedMessageDeliveryAdapter.java:107) at org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter.deliverSync(UncomposedMessageDeliveryAdapter.java:86) at org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener.invoke(JBossRemotingGatewayListener.java:316) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769) at org.jboss.remoting.transport.coyote.CoyoteInvoker.service(CoyoteInvoker.java:310) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:619) Caused by: org.jboss.soa.esb.actions.ActionProcessingException: org.jboss.soa.esb.listeners.message.MessageDeliverException: Null data found in message location(s): [org.jboss.soa.esb.message.defaultEntry] at org.jboss.soa.esb.actions.routing.HttpRouter.process(HttpRouter.java:95) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316) at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(MessageAwareListener.java:303) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) ... 1 more Caused by: org.jboss.soa.esb.listeners.message.MessageDeliverException: Null data found in message location(s): [org.jboss.soa.esb.message.defaultEntry] at org.jboss.soa.esb.message.MessagePayloadProxy.getPayload(MessagePayloadProxy.java:161) at org.jboss.soa.esb.actions.routing.HttpRouter.process(HttpRouter.java:93) ... 5 more 15:41:30,476 ERROR [CoyoteInvoker] Error processing request java.io.NotSerializableException: org.jboss.internal.soa.esb.message.format.xml.MessageImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion1_2(JavaSerializationManager.java:107) at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:91) at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120) at org.jboss.remoting.marshal.http.HTTPMarshaller.write(HTTPMarshaller.java:73) at org.jboss.internal.soa.esb.remoting.HttpMarshaller.write(HttpMarshaller.java:51) at org.jboss.remoting.transport.coyote.CoyoteInvoker.versionedWrite(CoyoteInvoker.java:434) at org.jboss.remoting.transport.coyote.CoyoteInvoker.service(CoyoteInvoker.java:377) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:619)
Please help me resolve these problems.
Any reply will be appreciated.
Thanks in Advanced
Puneet