It's been a while since I used the JMS transport. But perhaps you should try defining the appropriate connection factories under the JMS configuration in the axis2.xml file.
Thanks, Hiranya On Dec 15, 2014, at 12:54 PM, Tech Bolek <[email protected]> wrote: > I'm sort of operating half-blind here but it seems like the configuration > below, even though is still not working, makes more sense than the previous > one. Again, the bold lines are what I added to the original configuration. > This timeI'm getting an error: > 2014-12-15 13:50:06,488 [-] [HttpClientWorker-1] ERROR JMSSender Unable to > create a JMSMessageSender for : > org.apache.axis2.transport.jms.JMSOutTransportInfo@283dd358 > oracle.jms.AQjmsException: JMS-107: Operation not allowed on Connection > at oracle.jms.AQjmsError.throwEx(AQjmsError.java:334) > at oracle.jms.AQjmsConnection.createTopicSession(AQjmsConnection.java:728) > at > org.apache.axis2.transport.jms.JMSOutTransportInfo.createJMSSender(JMSOutTransportInfo.java:365) > at > org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:121) > at > org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:119) > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443) > at > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:159) > at > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:265) > at > org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84) > at > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) > at > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114) > at > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:229) > at > org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:370) > at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive( > > > <definitions xmlns="http://ws.apache.org/ns/synapse"> > <proxy name="StockQuoteProxy" transports="https http jms" > startOnLoad="true" trace="disable"> > <target> > <endpoint> > <address uri="http://localhost:9000/services/SimpleStockQuoteService" > /> > </endpoint> > <inSequence> > <log level="full" /> > <enrich> > <source type="body" clone="true" /> > <target type="property" property="jms_body_text" /> > </enrich> > <property name="jms_body_text" > expression="get-property('jms_body_text')" scope="default" /> > <xslt key="jmsMsgToSoapMsg_xslt"> > <property name="jms_text" > expression="get-property('jms_body_text')" /> > </xslt> > <log level="full"> > <property name="After transformation" value="************" /> > </log> > </inSequence> > <outSequence> > <log level="full"> > <property name="OUT SEQUENCE" value="************" /> > </log> > <send/> > </outSequence> > </target> > > <publishWSDL > uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> > > <parameter name="transport.jms.ContentType"> > <rules> > <jmsProperty>ContentType</jmsProperty> > <default>text/plain</default> > </rules> > </parameter> > > <parameter > name="transport.jms.Destination">cn=tro_Q_JMS2,cn=OracleDBQueues,cn=ORCL,cn=OracleContext,ou=Services, > o=sgi,c=us</parameter> > <parameter > name="transport.jms.ReplyDestination">cn=tro_Q_JMS1,cn=OracleDBQueues,cn=ORCL,cn=OracleContext,ou=Services, > o=sgi,c=us</parameter> > > </proxy> > > <localEntry key="jmsMsgToSoapMsg_xslt" src="file:jmsMsgToSoapMsg.xslt" /> > > <sequence name="fault"> > <log level="full"> > <property name="MESSAGE" value="Executing default "fault" > sequence" /> > <property name="ERROR_CODE" expression="get-property('ERROR_CODE')" /> > <property name="ERROR_MESSAGE" > expression="get-property('ERROR_MESSAGE')" /> > </log> > <drop/> > </sequence> > > <sequence name="main"> > <log/> > <drop/> > </sequence> > </definitions> > > > On Monday, December 15, 2014 11:26 AM, Tech Bolek <[email protected]> > wrote: > > > Thanks. I've set up an LDAP server and configured my queues (I'm using JMS > queues though, not XML queues). Usign this link > http://wso2.com/library/tutorials/2011/11/configuring-wso2-esb-with-oracle-as-messaging-media/. > > My synapse configuration does the following:1. Read a message from JMS > queue2. Perform XSLT transformation and forward the request to the apache2 > axis server to invoke the test stock quote service3. The stock quote response > is captured in the log. > Now I'd like to capture the response in another JMS queue. I've tried > epanding the synapse config file as with the bold lines below but I'm getting > an error: > > 2014-12-15 11:24:59,000 [-] [HttpClientWorker-1] ERROR NativeWorkerPool > Uncaught exception > java.lang.NullPointerException > at > org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:135) > at > org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:119) > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443) > at > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:159) > at > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:265) > at > org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84) > at > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) > at > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114) > at > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:229) > at > org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:370) > at > org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:160) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) > > > > > <definitions xmlns="http://ws.apache.org/ns/synapse"> > <proxy name="StockQuoteProxy" transports="https http jms" > startOnLoad="true" trace="disable"> > <target> > <endpoint> > <address > uri="http://localhost:9000/services/SimpleStockQuoteService" /> > </endpoint> > <inSequence> > <log level="full" /> > <enrich> > <source type="body" clone="true" /> > <target type="property" > property="jms_body_text" /> > </enrich> > <property name="jms_body_text" > expression="get-property('jms_body_text')" scope="default" /> > <xslt key="jmsMsgToSoapMsg_xslt"> > <property name="jms_text" > expression="get-property('jms_body_text')" /> > </xslt> > <log level="full"> > <property name="After transformation" > value="************" /> > </log> > </inSequence> > <outSequence> > <log level="full"> > <property name="OUT SEQUENCE" > value="************" /> > </log> > <send> > <header name="To" > value="jms:/cn=tro_Q_JMS1,cn=OracleDBQueues,cn=ORCL,cn=OracleContext,ou=Services,o=sgi,c=us"/> > </send> > </outSequence> > </target> > <publishWSDL > > uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> > <parameter name="transport.jms.ContentType"> > <rules> > <jmsProperty>ContentType</jmsProperty> > <default>text/plain</default> > </rules> > </parameter> > <parameter > name="transport.jms.Destination">cn=tro_Q_JMS2,cn=OracleDBQueues,cn=ORCL,cn=OracleContext,ou=Services, > o=sgi,c=us</parameter> > </proxy> > <localEntry key="jmsMsgToSoapMsg_xslt" > src="file:jmsMsgToSoapMsg.xslt" /> > <sequence name="fault"> > <log level="full"> > <property name="MESSAGE" value="Executing default > "fault" sequence" /> > <property name="ERROR_CODE" > expression="get-property('ERROR_CODE')" /> > <property name="ERROR_MESSAGE" > expression="get-property('ERROR_MESSAGE')" /> > </log> > <drop /> > </sequence> > <sequence name="main"> > <log /> > <drop /> > </sequence> > </sequence> > > On Monday, November 3, 2014 5:37 PM, Isuru Udana <[email protected]> > wrote: > > > Hi All, > We can use existing JMS transport for Oracle AQ integration. There are set of > extra configurations needed to be done like setting us a LDAP server etc. > Resource available at [1] describes Oracle AQ integration with WSO2 ESB. > Since WSO2 ESB uses synapse as the mediation engine, we should be able do in > the same way for synapse. > And synapse do support to plug-in custom MessageStores. So we have that > option too. > [1] > http://wso2.com/library/tutorials/2011/11/configuring-wso2-esb-with-oracle-as-messaging-media/ > > Thanks. > On Tue, Nov 4, 2014 at 2:30 AM, Rajika Kumarasiri > <[email protected]> wrote: > > Oracle AQ provides a JNDI API and you should be able to use the JMS > transport without much trouble. > > Rajika > > On Mon, Nov 3, 2014 at 10:31 AM, Tech Bolek <[email protected]> > wrote: > >> Greetings, >> I'm looking for recomendations how to extend Synapse to support Oracle AQ >> messages. For example, I'd like to be able to specify in the configuration >> file that a message from a specific channel is to be sent to a pecific >> queue. Or that a message that originates in a specific queue is to be >> forwarded to web service. Oracle AQ has its own java API and I'm wondering >> how to integrate it with Synapse. I'm considering wiritng a custom >> transport and as well as looking at the Task interface or the Mediator >> interface. >> > > > > > -- > Isuru Udana > Senior Software Engineer; WSO2 Inc.; http://wso2.com > > email: [email protected] > blog: http://mytecheye.blogspot.com/ > twitter: http://twitter.com/isudana > > > > > > > -- Hiranya Jayathilaka Mayhem Lab/RACE Lab; Dept. of Computer Science, UCSB; http://cs.ucsb.edu E-mail: [email protected]; Mobile: +1 (805) 895-7443 Blog: http://techfeast-hiranya.blogspot.com
