我有一个从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配置正确连接将非常适合.
我想关闭JAXB绑定消息的模式验证.我正在处理客户端CXF代码(WSDL第一代).我试过用
<jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort"
createdFromAPI="true">
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
</jaxws:client>
Run Code Online (Sandbox Code Playgroud)
没有成功(参见参考CXF FAQ).我很难找到一种设置此属性的编程方式.我还探讨了短路CXF并访问解析器,unmarshaller等.
谢谢你的帮助.
我想将流变量与文字字符串进行比较,并忽略变量的大小写.例如
...
<when expression="#[StringUtils.upperCase(flowVars['officeCode']) == 'REGION1']">
....
Run Code Online (Sandbox Code Playgroud)
产生的错误是[错误:无法访问:StringUtils; 在课堂上:null] [近:{...未知....}]
我也试过了
<when expression="#[regex('[a-zA-Z0-9]+',flowVars['officeCode'],Pattern.CASE_INSENSITIVE) == 'REGION1']">
Run Code Online (Sandbox Code Playgroud)
对于正则表达式比较,我收到错误"文本不是字符串"
任何帮助非常感谢.