I do all my stuff programmatically when talking to queues and topics. You will need to of course setup the message Queue and queue connection factory in openJms before trying to send messages over it.

I use IBM Web Sphere MQ as the messaging provider, so on my client I have to include the necessary websphere MQ jar files. You'll have to include the openJms jars in your client's classpath.

If you haven't done any standard Axis2 HTTP web services this probably won't mean much to you, but on my client, I create a connection to the web-service by:

// Work out the URL (end point ref) for the JMS queue that is used as the transport to the web service.
// The inital context factory class is Web Sphere MQ specific, needs to be changed to openJms class for your code.
// The URL localhost:1414/SYSTEM.DEF.SVRCONN should change to reference your openJms messaging setup.
// The queue connection factory and queue names should change to represent the queue
String jmsEpr = "jms:/myQueue?" + JMSConstants.CONFAC_JNDI_NAME_PARAM + "=myQueueConnectionFactory&java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory&java.naming.provider.url="">
ConfigurationContext context = ConfigurationContextFactory.createConfigurationContextFromFileSystem( repositoryPath, repositoryPath + "/conf/axis2.xml");
FinalOKServiceSOAP12Port_httpStub service = new FinalOKServiceSOAP12Port_httpStub( context, jmsEpr);

now all messages will be sent over JMS just by invoking service.sendMessage() or what ever your methods are named.  There are other ways of doing this, but this way works for me, and allows me to use HTTP and JMS transports when I need to.

Peter Kipping wrote:
Maybe that's the part I don't understand.  I'm using openjms and I created a queue called Version and sent it to that queue using jms:
 

TextMessage message = session.createTextMessage();

message.setText(text);

sender.send(message);
 
How am i supposed to be using the URL?  I saw that in the example but wasn't clear on it.
 
Peter






Date: Tue, 4 Dec 2007 14:51:02 +1300
From: [EMAIL PROTECTED]
To: [email protected]
Subject: Re: JMSSender to queue

What URL did you use for your service endpoint in your client code?

e.g. jms:/topic.....

Peter Kipping wrote:
I am doing the jms transport example and I get the following error:
 
2007-12-03 15:01:42,288 ERROR org.apache.axis2.transport.jms.JMSSender - Cannot
send reply to unknown JMS Destination
Exception in thread "JMSWorker-6" org.apache.axis2.transport.jms.AxisJMSExceptio
n: Cannot send reply to unknown JMS Destination
        at org.apache.axis2.transport.jms.JMSSender.handleException(JMSSender.ja
va:318)
        at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:111)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
        at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(A
bstractInOutSyncMessageReceiver.java:48)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
        at org.apache.axis2.transport.jms.JMSMessageReceiver$Worker.run(JMSMessa
geReceiver.java:249)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:619)
 
I have axis using the name of the service (Version) as the name of the input queue, but do I need a different queue for JMSSender to send it's response on?  How do I configure this?
 
Thanks,
Pete


Connect and share in new ways with Windows Live. Connect now!


-- 

Anthony
------------------------------------- 
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand
 
[EMAIL PROTECTED]
Ph  +64 4 472 8818
Fax +64 4 472 8811
------------------------------------- 
www.bcsoft.co.nz
--------------------------------------------------------------- 
This email may contain confidential or privileged information, 
and is intended for use only by the addressee, or addressees. 
If you are not the intended recipient please advise the sender 
immediately and do not copy, use or disclose the contents to 
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses 
received with this email, or to any changes made to the original 
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black 
Coffee Software Ltd.
--------------------------------------------------------------- 
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


Get the power of Windows + Web with the new Windows Live. Power up!


-- 

Anthony
------------------------------------- 
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand
 
[EMAIL PROTECTED]
Ph  +64 4 472 8818
Fax +64 4 472 8811
------------------------------------- 
www.bcsoft.co.nz
--------------------------------------------------------------- 
This email may contain confidential or privileged information, 
and is intended for use only by the addressee, or addressees. 
If you are not the intended recipient please advise the sender 
immediately and do not copy, use or disclose the contents to 
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses 
received with this email, or to any changes made to the original 
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black 
Coffee Software Ltd.
--------------------------------------------------------------- 
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to