Search code examples
web-serviceswsdlmulecxfanypoint-studio

Mule WSDL Connector


I use version 3.8 (3.8.3) . I basically want to host my wsdl in a different location other than http://{serviceurl}?wsdl like http://{serviceurl}/my-great-service.wsdl

At the following mule doc https://docs.mulesoft.com/mule-user-guide/v/3.8/wsdl-connectors

it says that you can specify the _wsdlLocation_ property of the CXF endpoint as follows

<endpoint address="wsdl-cxf:http://localhost:8080/book/services/BookService?method=getBooks">
   <properties>
      <property name="wsdlLocation" value="file:///c:/BookService.wsdl"/>
   </properties>
</endpoint>

But where to put this in the mule xml ?

To the root of the file <mule> here </mule> or to <flow> here </flow> or to the <cxf:proxy-service> here </cxf:proxy-service>

The mule documentation is so limited and lock of examples.


Solution

  • Any reason why you are using the cxf connector instead of the web service consumer?

    https://docs.mulesoft.com/mule-user-guide/v/3.8/web-service-consumer

    All the global configuration elements are specified after the <mule> tag and before the <flow> elements.

    Example with web service consumer below:

    <mule ......>
        <ws:consumer-config name="Web_Service_Consumer" service="ServiceService" 
        port="ServicePort" serviceAddress="addresUrl" 
        wsdlLocation="wsdl location" doc:name="Web Service Consumer"/>
    
        <flow>...</flow>
    </mule>
    

    If for any reason you want to use the cxf connector, is the same but using the cxf connector