Search code examples
soapwsdlmulejax-ws

Mule SoapKit Redirecting to wrong operation


I'm using Soap Router to configure my flows and able to test well in SoapUI. But when the same request is used in postman with Request type as post it is going into first flow irrespective of input. Did I prepare my WSDL wrong or is my implementation in mule wrong?

My WSDL : (This WSDL is created using JAX WS Annotations) EmpProg.wsdl

my mule flow generated from wsdl

<http:listener-config name="api-httpListenerConfig" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
  <apikit-soap:config name="/EmpProgApiImplService/EmpProgApiImplPort/api-config" wsdlUrl="empprogapiimpl.wsdl" serviceName="EmpProgApiImplService" portName="EmpProgApiImplPort" doc:name="APIkit SOAP: Configuration"/>
  <flow name="api-main">
    <http:listener path="/EmpProgApiImplService/EmpProgApiImplPort" config-ref="api-httpListenerConfig" doc:name="/EmpProgApiImplService/EmpProgApiImplPort" />
    <apikit-soap:router config-ref="/EmpProgApiImplService/EmpProgApiImplPort/api-config" doc:name="SOAP Router"/>
  </flow>
  <flow name="tagEmp:/EmpProgApiImplService/EmpProgApiImplPort/api-config">
    <set-payload value="&lt;soap:Fault xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;&lt;faultcode&gt;soap:Server&lt;/faultcode&gt;&lt;faultstring&gt;Operation [tagEmp:/EmpProgApiImplService/EmpProgApiImplPort/api-config] not implemented&lt;/faultstring&gt;&lt;/soap:Fault&gt;" doc:name="Set Payload"/>
  </flow>
  <flow name="startEmp:/EmpProgApiImplService/EmpProgApiImplPort/api-config">
    <set-payload value="&lt;soap:Fault xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;&lt;faultcode&gt;soap:Server&lt;/faultcode&gt;&lt;faultstring&gt;Operation [startEmp:/EmpProgApiImplService/EmpProgApiImplPort/api-config] not implemented&lt;/faultstring&gt;&lt;/soap:Fault&gt;" doc:name="Set Payload"/>
  </flow>
  <flow name="stopEmp:/EmpProgApiImplService/EmpProgApiImplPort/api-config">
    <set-payload value="&lt;soap:Fault xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;&lt;faultcode&gt;soap:Server&lt;/faultcode&gt;&lt;faultstring&gt;Operation [stopEmp:/EmpProgApiImplService/EmpProgApiImplPort/api-config] not implemented&lt;/faultstring&gt;&lt;/soap:Fault&gt;" doc:name="Set Payload"/>
  </flow>

When I place any request in postman it goes to tagEmp flow, but when tried through soap-ui it works fine and goes to its respective flows. Not sure what could be the issue.


Solution

  • Issue resolved by adding SoapAction in header with its value as operation name. It is then hitting its own operation when trying from Postman.