我有一个从wsdl生成的服务客户端.我正在尝试呼叫远程服务,我收到下面看到的导管启动器错误.我尝试了许多解决方案但没有成功.
我找到了推荐使用http-jetty扩展的解决方案(旧帖子).我不相信这对我有意义,因为服务器没有在本地运行.
我还发现帮助我的最近配置是一个示例cxf.xml文件,其中包含:
<bean class="org.apache.cxf.transport.local.LocalTransportFactory"
lazy-init="false">
<property name="transportIds">
<list>
<value>http://cxf.apache.org/transports/local</value>
<value>http://cxf.apache.org/transports/http</value>
<value>http://schemas.xmlsoap.org/soap/http</value>
<value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
</list>
</property>
</bean>
Run Code Online (Sandbox Code Playgroud)
此配置提供有关如何配置传输工厂并将其绑定到http://schemas.xmlsoap.org/soap/http的指导.当我尝试使用HTTPTransportFactory时,我收到一个异常,它无法初始化(没有这样的方法错误).
Caused by: org.apache.cxf.BusException: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http.
at org.apache.cxf.transport.ConduitInitiatorManagerImpl.getConduitInitiator(ConduitInitiatorManagerImpl.java:112)
at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:73)
at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:61)
at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:708)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:476)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:127)
Run Code Online (Sandbox Code Playgroud)
预防措施:此时,我将停止尝试将我的CXF客户端升级到2.4.2并回退到最老的版本(2.2系列).这不太理想.
我想继续升级.有关如何配置CXF 2.4.X的任何建议,以便我的客户端HTTP SOAP配置正确连接将非常适合.
我对Web服务很陌生.我无法找到JAX-WS和CXF之间的区别.
根据我的理解,JAX-WS是java和CXF提供的规范的实现.
如果我错了,请纠正我.