Hi,
I am adding the client source also for the below service. Right now it
throws exception because the service is unavailable so I don’t know where
the problem is. It is based on the client code at
http://xfire.codehaus.org/JMS+Transport but without spring.

Transport code is same as the code for service:
                XFire xfire = XFireFactory.newInstance().getXFire();
                JMSTransport jt = new JMSTransport(xfire, 
                                getConnectionFactory());
                xfire.getTransportManager().register(jt);

This is the service model:
                ObjectServiceFactory serviceFactory = new
ObjectServiceFactory();
                serviceFactory.addSoap11Transport(JMSTransport.BINDING_ID);
                Service serviceModel = serviceFactory.create(Echo.class);

Finally the code for the service proxy:
                XFireProxyFactory proxyFactory = new XFireProxyFactory();
                Echo echo = (Echo) proxyFactory.create(serviceModel,
"jms://Echo");
        ((XFireProxy)
Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Echo");

Now, if I start the service and then run the client, the service shows no
activity at all; while the client returns saying no response.
Please help!

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!
________________________________________
From: Mayank Thakore [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 11-41
To: [email protected]
Subject: [xfire-user] Help with adding JMS binding

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!




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

    http://xircles.codehaus.org/manage_email

Reply via email to