Search code examples
mulemule-studiomule-componentmule-elmule-esb

"Store WSDL file into a folder"


I have a flow where I am getting the WSDL defination by using CXF and java component. http://localhost:8081/soapapi?wsdl Here I am getting the WSDL defination but I am not able to store that output into a file.

 <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>

above is my code. How can I store the WSDL into a file?


Solution

  • If you want just the wsdl, no need for CXF, that will actually host the web service itself. Just use the http requestor to access the wsdl:

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