You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ted Jones <Tj...@metamatrix.com> on 2007/07/11 20:51:13 UTC

[Axis2] JMS Client Options Not Passed

I have a JMS listener enabled in an Axis2 1.2 war. I have a JMS client
where I am adding a property to the client of a stub instance. I have a
handler at the top of the transport phase that interrogates the
properties of the context options for the property added by the client.
The property is not there. Is this not the correct approach for this
scenario? Is there another way to accomplish this? Also, the "to" EPR is
null in my handler even though I am setting this value in the client. Is
this expected?
 
Here is my client code:
 
 stub = new MyServiceStub(ctx,
http://chicago:8080/axis2/services/myservice);
 
  String url = "jms:/myservice?
transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.nami
ng.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactor
y&java.naming.provider.url=tcp://localhost:61616";
     
  Options options = stub._getServiceClient().getOptions();
  options.setProperty(Constants.Configuration.TRANSPORT_URL, url);
  options.setProperty("test", "Some value I need in my handler");
  options.setTo(new
EndpointReference("http://chicago:8080/axis2/services/myservice"));
  
  GetBookCollectionByTitleRequestDocument
getBookCollectionByTitleRequest2 =
(GetBookCollectionByTitleRequestDocument)
getTestObject(GetBookCollectionByTitleRequestDocument.class);

  GetBookCollectionTypeByTitle getBookCollectionTypeByTitle =
GetBookCollectionTypeByTitle.Factory
    .newInstance();
 
 getBookCollectionTypeByTitle.setBookName("Compilers");

  getBookCollectionByTitleRequest2
    .setGetBookCollectionByTitleRequest(getBookCollectionTypeByTitle);

  BookCollectionDocument bookCollectionDocument = stub
    .getBookCollection(getBookCollectionByTitleRequest2);
  assertNotNull(bookCollectionDocument);
 
 
TIA,
Ted