“将WSDL文件存储到文件夹中”

时间:2019-06-03 06:47:39

标签: mule mule-studio mule-component mule-el mule-esb

我有一个流程,使用CXF和Java组件来获取WSDL定义。 http://localhost:8081/soapapi?wsdl在这里,我得到了WSDL的定义,但无法将输出存储到文件中。

 <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="helloworld.wsdl" service="IHelloWorldService" port="IHelloWorldPort" serviceAddress="http://localhost:8081/soapapi" doc:name="Web Service Consumer"/>
<flow name="WSDL_Create">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/soapapi" doc:name="HTTP"/>
    <cxf:jaxws-service serviceClass="com.example.wsdl.IHelloWorld" doc:name="CXF"/>
    <component class="com.example.wsdl.HelloWorldWSImpl" doc:name="Java"/>
    <file:outbound-endpoint path="C:\Workspace\mule3\wsdl\src\main\wsdl" outputPattern="helloworld.wsdl" responseTimeout="10000" doc:name="File"/>
</flow>

上面是我的代码。如何将WSDL存​​储到文件中?

1 个答案:

答案 0 :(得分:1)

如果只需要wsdl,而无需CXF,则实际上将托管Web服务本身。只需使用http请求者来访问wsdl:

<http:request url="http://localhost:8081/soapapi?wsdl" />