Hi,

I am trying to implement a simple service using xfire api (I don't want to
use services.xml). So I referred to the guide located at
http://xfire.codehaus.org/JMS+Transport and tried to convert the config into
code. I want to know if I am adding the JMS binding correctly. Here is my
sample:

 

For transport:

       XFire xfire = XFireFactory.newInstance().getXFire();

       JMSTransport jt = new JMSTransport(xfire, 

              getConnectionFactory());

       xfire.getTransportManager().register(jt);

 

The method getConnectionFactory will get a connection factory from OpenJMS
context.

 

For service:

       ObjectServiceFactory serviceFactory = new ObjectServiceFactory();

        Service service = serviceFactory.create(Echo.class);

        service.setInvoker(new BeanInvoker(new EchoImpl()));

 

The echo implementation and interface are same as in the examples.

 

Finally the binding:

        service.addEndpoint(

             new Endpoint(

                    new QName("e:EchoJMSEndpoint"),

                    new Soap11Binding(

                           new QName("e:EchoJMSBinding"),

                           JMSTransport.BINDING_ID,

                           service),

                    "jms://Echo"));

 

 

This is the part which I doubt. Is this the correct way to add JMS binding /
end-point to a service?

I will shortly send the client sample also.

 

Thanks and Regards

Mayank 

 

****************************************************************************
****************************
 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

 

Reply via email to