我正在尝试使用mule中的“cxf:proxy-service”来公开一个简单的问候语Web服务。以下是我的流程。
<flow name="WS_In">
<http:inbound-endpoint address="http://localhost:8080/HelloService" exchange-pattern="request-response">
<cxf:proxy-service wsdlLocation="classpath:HelloService.wsdl" namespace="http://example.org/HelloService"/>
</http:inbound-endpoint>
<component>
<prototype-object class="com.example.ServiceProxy">
</prototype-object>
</component>
<echo-component></echo-component>
<logger level="INFO" />
</flow>
但它给我的错误如下:
2013-01-03 16:13:35,569 ERROR [main] construct.AbstractFlowConstruct (AbstractFlowConstruct.java:180) - Failed to stop service: WS_In
org.mule.api.lifecycle.LifecycleException: Lifecycle Manager 'WS_In.stage1' phase 'start' does not support phase 'dispose'
我的ServiceProxy calss如下
public class ServiceProxy implements Callable, Initialisable
请帮助我理解我错过的路径。
答案 0 :(得分:2)
使用属性“service”来指定服务名称,而不是<cxf:proxy-service>
元素中的属性'name'。
答案 1 :(得分:1)
试试这个......
...
<flow name="WS_In">
<http:inbound-endpoint address="http://localhost:8080/HelloService" exchange-pattern="request-response">
<cxf:proxy-service wsdlLocation="classpath:HelloService.wsdl" namespace="http://example.org/HelloService" service="HelloService"/>
</http:inbound-endpoint>
<component class="com.example.ServiceProxy" />
<echo-component></echo-component>
<logger level="INFO" />
</flow>