You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by venkatesham nalla <v_...@hotmail.com> on 2014/08/25 17:38:23 UTC

How to configure netty transport in CXF 3.0.1?

Hi,
Could you please point me to the documentation/examples on how to configure netty http transport in CXF 3.0.1? 
Thanks,Venkat
 		 	   		  

RE: How to configure netty transport in CXF 3.0.1?

Posted by Rahul Somasunderam <rs...@certifydatasystems.com>.
I think I've done what's required here -
https://github.com/rahulsom/iisd/tree/fd1f458a071b7d26a2f628963f9c4cfd9531eb43

I'm looking at the stack trace and expecting to see NettyHttpConduit, but
only seeing `org.apache.cxf.transport.http.HTTPConduit`.

R,
rahul



--
View this message in context: http://cxf.547215.n5.nabble.com/How-to-configure-netty-transport-in-CXF-3-0-1-tp5748119p5754848.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: How to configure netty transport in CXF 3.0.1?

Posted by venkatesham nalla <v_...@hotmail.com>.
Hi,
I tried different things to use netty http transport on client side in cxf 3.0.1 which is not working. Can you please share an example configuration code or documentation on how to configure the netty transport for client? 
Thanks,Venkat

From: v_nalla@hotmail.com
To: willem.jiang@gmail.com
Subject: RE: How to configure netty transport in CXF 3.0.1?
Date: Fri, 19 Sep 2014 11:02:47 +0000




Yes. I did. 
Thanks,Venkat

> Date: Fri, 19 Sep 2014 11:12:09 +0800
> From: willem.jiang@gmail.com
> To: v_nalla@hotmail.com
> Subject: RE: How to configure netty transport in CXF 3.0.1?
> 
> Did you put the cxf-rt-transport-netty-client jar into your class path?
> 
> --  
> Willem Jiang
> 
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang  
> Weibo: 姜宁willem
> 
> 
> 
> On September 19, 2014 at 1:38:42 AM, venkatesham nalla (v_nalla@hotmail.com) wrote:
> > Hi Willem,
> > That is what I fail to understand what does it mean by endpoint address with netty. Is there  
> > any example or documentation please?
> > I am using a standalone client, with spring configuration file.
> > I modified the client.xml file to include the following > createdFromAPI="true"> this did not work.
> > This is what is done in the client code:
> > SpringBusFactory bf = new SpringBusFactory(); URL busFile = null; String configFile  
> > = System.getProperty("cxf.config.file"); if (configFile == null || configFile.trim().equals("")  
> > ) { busFile = Client.class.getResource("client.xml"); } else { busFile = Client.class.getResource(configFile);  
> > } Bus bus = bf.createBus(busFile.toString()); bf.setDefaultBus(bus);
> > AddressService service = new AddressService(wsdlURL, SERVICE_NAME);the wsdlURL  
> > is from local file sytem. I modifed the localtion attribute of soap:address to included  
> > netty:// prefix as well. nothing worked.
> > Thanks,Venkat
> >  
> > > Date: Fri, 19 Sep 2014 00:11:15 +0800
> > > From: willem.jiang@gmail.com
> > > To: v_nalla@hotmail.com
> > > Subject: RE: How to configure netty transport in CXF 3.0.1?
> > >
> > > Did you setup the endpoint address which is start with netty?
> > >
> > >
> > > --
> > > Willem Jiang
> > >
> > > Red Hat, Inc.
> > > Web: http://www.redhat.com
> > > Blog: http://willemjiang.blogspot.com (English)
> > > http://jnn.iteye.com (Chinese)
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> > >
> > >
> > > On September 18, 2014 at 10:29:06 PM, venkatesham nalla (v_nalla@hotmail.com) wrote:  
> > > > Hi Willem,
> > > > I tried the following for client to use netty transport, but none of these worked. Could  
> > > > you please help.
> > > > 1) 2) > name="*.netty-conduit">3) Added NettyConduitFacroty like this:org.apache.cxf.transport.http.netty.client.NettyHttpConduitFactory  
> > > > nettyConduitFactory = new org.apache.cxf.transport.http.netty.client.NettyHttpConduitFactory();  
> > > > bus.setExtension(nettyConduitFactory, HTTPConduitFactory.class);4) prefixed  
> > > > the netty:// for WSDL url to instantiate the service class.
> > > > Thanks,Venkat
> > > >
> > > >
> > > > From: v_nalla@hotmail.com
> > > > To: willem.jiang@gmail.com
> > > > Subject: RE: How to configure netty transport in CXF 3.0.1?
> > > > Date: Thu, 18 Sep 2014 12:47:52 +0000
> > > >
> > > >
> > > >
> > > >
> > > > Could you please send me an example how it can be done for client or a link to some documentation.  
> > > > thanks,Venkat
> > > >
> > > > > Date: Thu, 18 Sep 2014 12:01:30 +0800
> > > > > From: willem.jiang@gmail.com
> > > > > To: v_nalla@hotmail.com
> > > > > Subject: RE: How to configure netty transport in CXF 3.0.1?
> > > > >
> > > > > No, you cannot do it that way.
> > > > > As CXF loads the http conduit when creating the endpoint, when you change the request  
> > > > context to override the address, the http conduit cannot be reloaded.
> > > > >
> > > > >
> > > > > --
> > > > > Willem Jiang
> > > > >
> > > > > Red Hat, Inc.
> > > > > Web: http://www.redhat.com
> > > > > Blog: http://willemjiang.blogspot.com (English)
> > > > > http://jnn.iteye.com (Chinese)
> > > > > Twitter: willemjiang
> > > > > Weibo: 姜宁willem
> > > > >
> > > > >
> > > > >
> > > > > On September 18, 2014 at 4:48:32 AM, venkatesham nalla (v_nalla@hotmail.com) wrote:  
> > > > > > HI,
> > > > > > I was able to start the server with netty transport. But the same technique netty://  
> > > > prefix
> > > > > > not working for the client. I am setting the endpoint url netty://http://... using  
> > > > ((BindingProvider)wsperf).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,  
> > > > > > clientArgs[1]);
> > > > > > Can you please help how I can configure client with netty transport?
> > > > > > Thanks,Venkat
> > > > > >
> > > > > > From: v_nalla@hotmail.com
> > > > > > To: willem.jiang@gmail.com
> > > > > > Subject: RE: How to configure netty transport in CXF 3.0.1?
> > > > > > Date: Wed, 17 Sep 2014 14:44:44 +0000
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Hi Willem,
> > > > > > It is not working. I am getting the following exception when starting the server.  
> > Did
> > > > > > not work for client either.
> > > > > > Starting Server RPCPerf at netty://http://localhost:30180/RPCPerf/RPCPerfService  
> > > > > >
> > > > > > Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.NullPointerException  
> > > > > > at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371)  
> > at
> > > > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
> > > > > > at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152)  
> > > > > > at javax.xml.ws.Endpoint.publish(Endpoint.java:240) at com.att.cio.rpcperf.server.RPCPerfServer.(RPCPerfServer.java:27)  
> > > > > > at com.rpcperf.server.RPCPerfServer.main(RPCPerfServer.java:70)Caused  
> > by:
> > > > > > java.lang.NullPointerException at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:131)  
> > > > > > at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:84)  
> > > > > > at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:63) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)  
> > > > > > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)  
> > > > > > at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)  
> > at
> > > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
> > > > > > ... 5 more
> > > > > > Thanks,Venkat
> > > > > >
> > > > > > > Date: Tue, 26 Aug 2014 09:25:49 +0800
> > > > > > > From: willem.jiang@gmail.com
> > > > > > > To: users@cxf.apache.org
> > > > > > > Subject: Re: How to configure netty transport in CXF 3.0.1?
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > You just need to setup the address which is start with "netty://" just like “netty://http://localhost:9000/SoapContext/"  
> > > > > > and make sure you put the cxf-rt-transport-netty-server and cxf-rt-transport-netty-client  
> > > > > > into the class path.
> > > > > > >
> > > > > > > I will add an example for it.
> > > > > > >
> > > > > > > --
> > > > > > > Willem Jiang
> > > > > > >
> > > > > > > Red Hat, Inc.
> > > > > > > Web: http://www.redhat.com
> > > > > > > Blog: http://willemjiang.blogspot.com (English)
> > > > > > > http://jnn.iteye.com (Chinese)
> > > > > > > Twitter: willemjiang
> > > > > > > Weibo: 姜宁willem
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On August 25, 2014 at 11:38:59 PM, venkatesham nalla (v_nalla@hotmail.com) wrote:  
> > > > > > > > Hi,
> > > > > > > > Could you please point me to the documentation/examples on how to configure netty  
> > > > > > http
> > > > > > > > transport in CXF 3.0.1?
> > > > > > > > Thanks,Venkat
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >  
> 
 		 	   		   		 	   		  

Re: How to configure netty transport in CXF 3.0.1?

Posted by Willem Jiang <wi...@gmail.com>.
Hi, 

You just need to setup the address which is start with "netty://" just like “netty://http://localhost:9000/SoapContext/" and make sure you put the cxf-rt-transport-netty-server and cxf-rt-transport-netty-client into the class path.

I will add an example for it.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On August 25, 2014 at 11:38:59 PM, venkatesham nalla (v_nalla@hotmail.com) wrote:
> Hi,
> Could you please point me to the documentation/examples on how to configure netty http  
> transport in CXF 3.0.1?
> Thanks,Venkat
>