You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Coder One <co...@yahoo.com> on 2010/01/27 11:15:28 UTC

Custom Transport and Creating a JaxWS Client

CXF 2.2.5
 
I can't seem to create a client-side service instance to invoke my web service via my custom transport. I followed the info at http://cxf.apache.org/docs/jax-ws-java-first-with-jms-transport.html, but I am sure I must have missed some steps.
 
For example, do I need to store a local copy of the WSDL and remove the port info that refers to http from the WSDL?  The JMS example referred to "jms://" for the address. That is my "myproto", but where do I register "myproto://" before using it in the factory?
 
Thanks,
 
 
Code to create the client:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setWsdlURL("http://localhost:8084/gadget-server/gadgetService?wsdl");
factory.setAddress("myproto://abc");
 // Just an interface that was used to implement the service.  Also used on server-side.
factory.setServiceClass(gadgetServiceClazz); 
factory.create();
 
Exception
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://gadget.acme.com/}GadgetServiceService.
at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:126)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:408)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:521)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:271)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:177)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)


      

Re: Custom Transport and Creating a JaxWS Client

Posted by Coder One <co...@yahoo.com>.



----- Original Message ----
From: Coder One <co...@yahoo.com>
To: users@cxf.apache.org
Sent: Wed, January 27, 2010 2:15:28 AM
Subject: Custom Transport and Creating a JaxWS Client

CXF 2.2.5
 
I can't seem to create a client-side service instance to invoke my web service via my custom transport. I followed the info at http://cxf.apache.org/docs/jax-ws-java-first-with-jms-transport.html, but I am sure I must have missed some steps.
 
For example, do I need to store a local copy of the WSDL and remove the port info that refers to http from the WSDL?  The JMS example referred to "jms://" for the address. That is my "myproto", but where do I register "myproto://" before using it in the factory?
 
Thanks,
 
 
Code to create the client:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setWsdlURL("http://localhost:8084/gadget-server/gadgetService?wsdl");
factory.setAddress("myproto://abc");
 // Just an interface that was used to implement the service.  Also used on server-side.
factory.setServiceClass(gadgetServiceClazz); 
factory.create();
 
Exception
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://gadget.acme.com/}GadgetServiceService.
at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:126)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:408)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:521)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:271)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:177)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)


      

Re: Custom Transport and Creating a JaxWS Client

Posted by "more.harshal2007@gmail.com" <ha...@itshastra.com>.
R u able to view generated WSDL with JMS transport?

Thanks

--
View this message in context: http://cxf.547215.n5.nabble.com/Custom-Transport-and-Creating-a-JaxWS-Client-tp568931p4343485.html
Sent from the cxf-user mailing list archive at Nabble.com.