You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by 华 钟明 <cr...@gmail.com> on 2019/02/02 05:44:21 UTC
Why TTPTransportFactory no longer implements the WSDLEndpointFactory
interface
In the 2.7.x version I can publish the WebService service like this
HTTPTransportFactory transportFactory = new HTTPTransportFactory();
ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
serverFactoryBean.setAddress(url.getAbsolutePath());
serverFactoryBean.setServiceClass(type);
serverFactoryBean.setServiceBean(impl);
serverFactoryBean.setBus(bus);
serverFactoryBean.setDestinationFactory(transportFactory);
serverFactoryBean.create();
but in the 3.2.x version, since the HTTPTransportFactory no longer implements the WSDLEndpointFactory interface, it returns null when calling ServerFactoryBean#getWSDLEndpointFactory, which results in the <soap:address location/> tag. Lost, how should this problem be solved?
Best Regards!
Zhongming Hua
Re: Why TTPTransportFactory no longer implements the
WSDLEndpointFactory interface
Posted by 华 钟明 <cr...@gmail.com>.
Thank you for your answer, because cxf is useful in the dubbo framework to implement the webservice protocol. The following connection is related code.
https://github.com/apache/incubator-dubbo/blob/master/dubbo-rpc/dubbo-rpc-webservice/src/main/java/org/apache/dubbo/rpc/protocol/webservice/WebServiceProtocol.java
Because there is a small problem after upgrading to 3.2.x version, this tag is missing from wsdl. <soap:address location/>
So I don't know if it is a bug in cxf itself or if I don't apply it properly.
If it is my improper application, I have any way to modify it, I checked the information on the Internet, there is no relevant solution.
hoping to get your help.
Best Regards!
Zhongming Hua
在 2019/2/12 下午9:28,“Daniel Kulp”<dk...@apache.org> 写入:
The big issue is: why are you creating any of these things? You shouldn’t need to. They are all registered on the bus already. There shouldn’t be any need to set the destination factory as it would be looked up from the registry on the bus depending on the URL. Thus, if you need to configure a particular destination factory, configure it on the bus and then let the lookups do the right thing.
Dan
> On Feb 12, 2019, at 12:38 AM, 华 钟明 <cr...@gmail.com> wrote:
>
> Hi,
> I also found the same problem in stackoverflow. How can I solve this problem?
> Address : https://stackoverflow.com/questions/30854730/apache-cxf-3-not-generating-address-element
>
> Best Regards!
> Zhongming Hua
>
>
> 在 2019/2/5 上午11:20,“华 钟明”<cr...@gmail.com> 写入:
>
>
> Thank you for your answer.
> I tried to use SoapTransportFactory before, but I also need to display the ServletController :
> ServletController servletController= new ServletController(transportFactory.getRegistry(), httpServlet.getServletConfig(), httpServlet);
>
> If I change to SoapTransportFactory, I don't know what to do to create ServletController.
> Because I need to call servletController.invoke(request, response);
> If I change to SoapTransportFactory, is there no way to create it, or is there another way to replace it?
>
> Best Regards!
> Zhongming Hua
>
>
> 在 2019/2/5 上午4:10,“Daniel Kulp”<dk...@apache.org> 写入:
>
>
> Most likely, just replace it with org.apache.cxf.binding.soap.SoapTransportFactory
>
> The HTTPTransportFactory needs to be fully usable for the REST/JAX-RS services which are not defined by anything WSDL related. Thus, the HTTPTransportFactory no longer implements the methods needed for the wsdl extensors and such. In your particular case, if you are expecting a “soap:address” extension element, it really needs to be the SoapTransportFactory (which will then delegate down to a HTTPTransportFactory for this case).
>
> Dan
>
>
>
>> On Feb 2, 2019, at 12:44 AM, 华 钟明 <cr...@gmail.com> wrote:
>>
>>
>> In the 2.7.x version I can publish the WebService service like this
>>
>>
>> HTTPTransportFactory transportFactory = new HTTPTransportFactory();
>>
>> ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
>>
>> serverFactoryBean.setAddress(url.getAbsolutePath());
>> serverFactoryBean.setServiceClass(type);
>> serverFactoryBean.setServiceBean(impl);
>> serverFactoryBean.setBus(bus);
>> serverFactoryBean.setDestinationFactory(transportFactory);
>> serverFactoryBean.create();
>>
>> but in the 3.2.x version, since the HTTPTransportFactory no longer implements the WSDLEndpointFactory interface, it returns null when calling ServerFactoryBean#getWSDLEndpointFactory, which results in the <soap:address location/> tag. Lost, how should this problem be solved?
>>
>>
>> Best Regards!
>> Zhongming Hua
>>
>
> --
> Daniel Kulp
> dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
> Talend Community Coder - http://talend.com <http://coders.talend.com/>
>
>
--
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>
Re: Why TTPTransportFactory no longer implements the
WSDLEndpointFactory interface
Posted by Daniel Kulp <dk...@apache.org>.
The big issue is: why are you creating any of these things? You shouldn’t need to. They are all registered on the bus already. There shouldn’t be any need to set the destination factory as it would be looked up from the registry on the bus depending on the URL. Thus, if you need to configure a particular destination factory, configure it on the bus and then let the lookups do the right thing.
Dan
> On Feb 12, 2019, at 12:38 AM, 华 钟明 <cr...@gmail.com> wrote:
>
> Hi,
> I also found the same problem in stackoverflow. How can I solve this problem?
> Address : https://stackoverflow.com/questions/30854730/apache-cxf-3-not-generating-address-element
>
> Best Regards!
> Zhongming Hua
>
>
> 在 2019/2/5 上午11:20,“华 钟明”<cr...@gmail.com> 写入:
>
>
> Thank you for your answer.
> I tried to use SoapTransportFactory before, but I also need to display the ServletController :
> ServletController servletController= new ServletController(transportFactory.getRegistry(), httpServlet.getServletConfig(), httpServlet);
>
> If I change to SoapTransportFactory, I don't know what to do to create ServletController.
> Because I need to call servletController.invoke(request, response);
> If I change to SoapTransportFactory, is there no way to create it, or is there another way to replace it?
>
> Best Regards!
> Zhongming Hua
>
>
> 在 2019/2/5 上午4:10,“Daniel Kulp”<dk...@apache.org> 写入:
>
>
> Most likely, just replace it with org.apache.cxf.binding.soap.SoapTransportFactory
>
> The HTTPTransportFactory needs to be fully usable for the REST/JAX-RS services which are not defined by anything WSDL related. Thus, the HTTPTransportFactory no longer implements the methods needed for the wsdl extensors and such. In your particular case, if you are expecting a “soap:address” extension element, it really needs to be the SoapTransportFactory (which will then delegate down to a HTTPTransportFactory for this case).
>
> Dan
>
>
>
>> On Feb 2, 2019, at 12:44 AM, 华 钟明 <cr...@gmail.com> wrote:
>>
>>
>> In the 2.7.x version I can publish the WebService service like this
>>
>>
>> HTTPTransportFactory transportFactory = new HTTPTransportFactory();
>>
>> ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
>>
>> serverFactoryBean.setAddress(url.getAbsolutePath());
>> serverFactoryBean.setServiceClass(type);
>> serverFactoryBean.setServiceBean(impl);
>> serverFactoryBean.setBus(bus);
>> serverFactoryBean.setDestinationFactory(transportFactory);
>> serverFactoryBean.create();
>>
>> but in the 3.2.x version, since the HTTPTransportFactory no longer implements the WSDLEndpointFactory interface, it returns null when calling ServerFactoryBean#getWSDLEndpointFactory, which results in the <soap:address location/> tag. Lost, how should this problem be solved?
>>
>>
>> Best Regards!
>> Zhongming Hua
>>
>
> --
> Daniel Kulp
> dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
> Talend Community Coder - http://talend.com <http://coders.talend.com/>
>
>
--
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>
Re: Why TTPTransportFactory no longer implements the
WSDLEndpointFactory interface
Posted by 华 钟明 <cr...@gmail.com>.
Hi,
I also found the same problem in stackoverflow. How can I solve this problem?
Address : https://stackoverflow.com/questions/30854730/apache-cxf-3-not-generating-address-element
Best Regards!
Zhongming Hua
在 2019/2/5 上午11:20,“华 钟明”<cr...@gmail.com> 写入:
Thank you for your answer.
I tried to use SoapTransportFactory before, but I also need to display the ServletController :
ServletController servletController= new ServletController(transportFactory.getRegistry(), httpServlet.getServletConfig(), httpServlet);
If I change to SoapTransportFactory, I don't know what to do to create ServletController.
Because I need to call servletController.invoke(request, response);
If I change to SoapTransportFactory, is there no way to create it, or is there another way to replace it?
Best Regards!
Zhongming Hua
在 2019/2/5 上午4:10,“Daniel Kulp”<dk...@apache.org> 写入:
Most likely, just replace it with org.apache.cxf.binding.soap.SoapTransportFactory
The HTTPTransportFactory needs to be fully usable for the REST/JAX-RS services which are not defined by anything WSDL related. Thus, the HTTPTransportFactory no longer implements the methods needed for the wsdl extensors and such. In your particular case, if you are expecting a “soap:address” extension element, it really needs to be the SoapTransportFactory (which will then delegate down to a HTTPTransportFactory for this case).
Dan
> On Feb 2, 2019, at 12:44 AM, 华 钟明 <cr...@gmail.com> wrote:
>
>
> In the 2.7.x version I can publish the WebService service like this
>
>
> HTTPTransportFactory transportFactory = new HTTPTransportFactory();
>
> ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
>
> serverFactoryBean.setAddress(url.getAbsolutePath());
> serverFactoryBean.setServiceClass(type);
> serverFactoryBean.setServiceBean(impl);
> serverFactoryBean.setBus(bus);
> serverFactoryBean.setDestinationFactory(transportFactory);
> serverFactoryBean.create();
>
> but in the 3.2.x version, since the HTTPTransportFactory no longer implements the WSDLEndpointFactory interface, it returns null when calling ServerFactoryBean#getWSDLEndpointFactory, which results in the <soap:address location/> tag. Lost, how should this problem be solved?
>
>
> Best Regards!
> Zhongming Hua
>
--
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>
Re: Why TTPTransportFactory no longer implements the
WSDLEndpointFactory interface
Posted by 华 钟明 <cr...@gmail.com>.
Thank you for your answer.
I tried to use SoapTransportFactory before, but I also need to display the ServletController :
ServletController servletController= new ServletController(transportFactory.getRegistry(), httpServlet.getServletConfig(), httpServlet);
If I change to SoapTransportFactory, I don't know what to do to create ServletController.
Because I need to call servletController.invoke(request, response);
If I change to SoapTransportFactory, is there no way to create it, or is there another way to replace it?
Best Regards!
Zhongming Hua
在 2019/2/5 上午4:10,“Daniel Kulp”<dk...@apache.org> 写入:
Most likely, just replace it with org.apache.cxf.binding.soap.SoapTransportFactory
The HTTPTransportFactory needs to be fully usable for the REST/JAX-RS services which are not defined by anything WSDL related. Thus, the HTTPTransportFactory no longer implements the methods needed for the wsdl extensors and such. In your particular case, if you are expecting a “soap:address” extension element, it really needs to be the SoapTransportFactory (which will then delegate down to a HTTPTransportFactory for this case).
Dan
> On Feb 2, 2019, at 12:44 AM, 华 钟明 <cr...@gmail.com> wrote:
>
>
> In the 2.7.x version I can publish the WebService service like this
>
>
> HTTPTransportFactory transportFactory = new HTTPTransportFactory();
>
> ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
>
> serverFactoryBean.setAddress(url.getAbsolutePath());
> serverFactoryBean.setServiceClass(type);
> serverFactoryBean.setServiceBean(impl);
> serverFactoryBean.setBus(bus);
> serverFactoryBean.setDestinationFactory(transportFactory);
> serverFactoryBean.create();
>
> but in the 3.2.x version, since the HTTPTransportFactory no longer implements the WSDLEndpointFactory interface, it returns null when calling ServerFactoryBean#getWSDLEndpointFactory, which results in the <soap:address location/> tag. Lost, how should this problem be solved?
>
>
> Best Regards!
> Zhongming Hua
>
--
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>
Re: Why TTPTransportFactory no longer implements the
WSDLEndpointFactory interface
Posted by Daniel Kulp <dk...@apache.org>.
Most likely, just replace it with org.apache.cxf.binding.soap.SoapTransportFactory
The HTTPTransportFactory needs to be fully usable for the REST/JAX-RS services which are not defined by anything WSDL related. Thus, the HTTPTransportFactory no longer implements the methods needed for the wsdl extensors and such. In your particular case, if you are expecting a “soap:address” extension element, it really needs to be the SoapTransportFactory (which will then delegate down to a HTTPTransportFactory for this case).
Dan
> On Feb 2, 2019, at 12:44 AM, 华 钟明 <cr...@gmail.com> wrote:
>
>
> In the 2.7.x version I can publish the WebService service like this
>
>
> HTTPTransportFactory transportFactory = new HTTPTransportFactory();
>
> ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
>
> serverFactoryBean.setAddress(url.getAbsolutePath());
> serverFactoryBean.setServiceClass(type);
> serverFactoryBean.setServiceBean(impl);
> serverFactoryBean.setBus(bus);
> serverFactoryBean.setDestinationFactory(transportFactory);
> serverFactoryBean.create();
>
> but in the 3.2.x version, since the HTTPTransportFactory no longer implements the WSDLEndpointFactory interface, it returns null when calling ServerFactoryBean#getWSDLEndpointFactory, which results in the <soap:address location/> tag. Lost, how should this problem be solved?
>
>
> Best Regards!
> Zhongming Hua
>
--
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>