"Store WSDL file into a folder"

"Store WSDL file into a folder"

我有一个流程,通过使用 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 存储到文件中?

如果您只需要 wsdl,不需要 CXF,那实际上将托管 Web 服务本身。只需使用 http 请求器访问 wsdl:

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