I want to write a test client for a service which uses JMS as the transport
application. I have the interface file which is very simple and has only one
operation:

public interface DateFormatter
{
        String getFormattedDate();
}


I tried doing it like this (mostly followed the client code at
http://xfire.codehaus.org/JMS+Transport , but am not using spring):

1. Create instance of XFire
2. Get connection factory from JNDI lookup
3. Register it as a new JMSTransport
xfire.getTransportManager().register(new JMSTransport(xfire,
connectionFactory));

4. Create the service factory
5. Add soap/JMS transport to the factory
serviceFactory.addSoap11Transport(JMSTransport.BINDING_ID);

6. Create the service model
Service serviceModel = serviceFactory.create(DateFormatter.class);

7. Create a proxy for the service
XFireProxyFactory factory = new XFireProxyFactory(xfire);
DateFormatter dfClient = (DateFormatter) factory.create(serviceModel,
"jms://DateFormatter");

8. Set the end point
((XFireProxy)Proxy.getInvocationHandler(dfClient)).getClient().setEndpointUr
i("jms://queue1");

9. Invoke the operation
dfClient.getFormattedDate();


But no messages seem to reach the channel.

This is printed in the output:
INFO: Sent message: Source ID: A27ADD09-82AD-86E2-20FB-92A98665DC72
Destination: null JMSType: TextMessage

What am I doing wrong?
Isn't there anyone else who is using JMS transport?

Thanks
Mayank



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to