title: How to pass a file as SOAP request to Mule SOAP client to consume service
body: <p>I have a flow which is exposing a webservice :-</p>
  
  <pre><code>&lt;flow name="ServiceFlow" doc:name="ServiceFlow"&gt;
  
  &lt;http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP"/&gt;
  
  &lt;cxf:jaxws-service  serviceClass="com.test.services.schema.maindata.v1.MainData"  doc:name="SOAP"/&gt;
  
  &lt;component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl" doc:name="JavaMain_ServiceImpl"/&gt;
  
  &lt;/flow&gt;
  </code></pre>
  
  <p>This web service have a operation <strong>insertDataOperation</strong> which takes all the input from SOAP request and insert it in Database...
  My SOAP request is as follow :-</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://services.test.com/schema/MainData/V1"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;v1:insertDataRequest&gt;
           &lt;v1:Id&gt;311&lt;/v1:Id&gt;
           &lt;v1:Name&gt;ttttt&lt;/v1:Name&gt;
           &lt;v1:Age&gt;56&lt;/v1:Age&gt;
           &lt;v1:Designation&gt;eeeee&lt;/v1:Designation&gt;
        &lt;/v1:insertDataRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Now I have another web service client flow which is consuming  this webservice and the flow is :-</p>
  
  <pre><code>&lt;flow name="ClientFlow" doc:name="ClientFlow"&gt;
   &lt;file:inbound-endpoint responseTimeout="10000" connector-ref="File_Global" doc:name="File"  path="E:\backup\test"&gt;
              &lt;file:filename-regex-filter pattern="SoapRequestInsert.xml" caseSensitive="false"/&gt;
      &lt;/file:inbound-endpoint&gt;
      &lt;file:file-to-string-transformer encoding="UTF-8" mimeType="text/xml" doc:name="File to String"/&gt;
  &lt;cxf:jaxws-client doc:name="SOAP" serviceClass="com.test.services.schema.maindata.v1.MainData" operation="insertDataOperation" port="MainDataPort" /&gt;
          &lt;http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP"/&gt;
  &lt;/flow&gt;
  </code></pre>
  
  <p>Now here I am trying to consume the webservice by using a file inbound endpoint and passing the SOAP request in the file <strong>SoapRequestInsert.xml</strong> .. But the issue is that I don't get any error but the data is not inserted in database.. I checked the log .. where I found it enters the insert method of webservice implementation class but it doesn't get the input value ... Please help ... I have taken the reference from the following :- <a href="https://stackoverflow.com/questions/16539303/consuming-a-jax-ws-in-a-mule-esb-flow">Consuming a JAX-WS in a Mule ESB flow</a>  </p>
  
  <p>But It's not working .. what should I do to make it consume successfully and insert into DB ??? Pls help </p>