title: PHP SoapClient upload file
body: <p>How can I upload a file with SoapClient?</p>
  <p>PHP Code:</p>
  <pre><code>$WSEDC = new SoapClient('http://172.32.132.2/CareWSCHISS/WSEDC.asmx?WSDL');
          $response = $WSEDC-&gt;EDCDataCheckIn([
              'EDCData' =&gt; [
                  // Class
                  'BenefitID' =&gt; '',
                  'BilledAmount' =&gt; '',
                  'ApprovedAmount' =&gt; '',
                  'ExcessAmount' =&gt; '',
                  'CashMember' =&gt; '',
                  'Quantity' =&gt; '',
                  'CReason' =&gt; '',
                  // End Class
                  'BenefitLimit' =&gt; '',
                  'ClaimNo' =&gt; '',
                  'PolicyNo' =&gt; '',
                  'TransmissionDate' =&gt; now()-&gt;format('Y-m-d'),
                  'ProcessingDate' =&gt; now()-&gt;format('Y-m-d'),
                  'ProcessingTime' =&gt; now()-&gt;format('H:i'),
                  'ResponseCode' =&gt; '',
                  'TID' =&gt; $data['provider_id'],
                  'MID' =&gt; '',
                  'CardNo' =&gt; $data['card_no'],
                  'TraceNumber' =&gt; '',
                  'DiagnosticNo' =&gt; '00',
                  'DiagnosticNo1' =&gt; '',
                  'DiagnosticNo2' =&gt; '',
                  'Remarks' =&gt; $data['remarks'],
                  'TotalBilled' =&gt; $data['total_claim_amount'],
                  'ClaimDocument' =&gt; '',
                  'FileName' =&gt; '', // file name
                  'TmpFile' =&gt; '', // file
                  'DocumentID' =&gt; '',
                  'MIME' =&gt; '', // file mime
                  'ErrorMessage' =&gt; '',
                  'ClaimType' =&gt; $data['coverage'],
                  'ReimbursementF' =&gt; 1,
                  'Start' =&gt; $data['admission_date_from'],
                  'Finish' =&gt; $data['admission_date_to'],
                  'OverallLimitAmount' =&gt; 0,
                  'RemainingLimit' =&gt; 0,
                  'BilledAmountTotal' =&gt; 0,
                  'ApprovedAmountTotal' =&gt; 0,
                  'ExcessAmountTotal' =&gt; 0,
                  'CashMemberTotal' =&gt; 0,
                  'ExcessPayOnSpotF' =&gt; 0,
              ],
              'EDCMemberData' =&gt; [
                  'Name' =&gt; '',
                  'Sex' =&gt; '',
                  'MaritalStatus' =&gt; '',
                  'BirthDate' =&gt; '',
                  'Address' =&gt; '',
                  'MemberClass' =&gt; '',
                  'MemberStatus' =&gt; '',
                  'StartDate' =&gt; '',
                  'EndDate' =&gt; '',
              ],
              'ErrMsg' =&gt; '',
          ]);
  
          return $response;
  </code></pre>
  <p>I dont know to attach image to <code>TmpFile</code>.
  I've tried with SoapUI and success. with SoapUi I only need point out the file path</p>
  <p>here success feedback from soapui</p>
  <pre><code>&lt;soap:Envelope xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;soap:Body&gt;
        &lt;EDCDataCheckInResponse xmlns=&quot;http://tempuri.org/&quot;&gt;
           &lt;EDCDataCheckInResult&gt;true&lt;/EDCDataCheckInResult&gt;
           &lt;EDCData&gt;
              &lt;BenefitID&gt;
                 &lt;BenefitIDClass&gt;
                    &lt;BenefitID&gt;1&lt;/BenefitID&gt;
                 &lt;/BenefitIDClass&gt;
              &lt;/BenefitID&gt;
              &lt;BilledAmount&gt;
                 &lt;BilledAmountClass&gt;
                    &lt;BilledAmount&gt;0&lt;/BilledAmount&gt;
                 &lt;/BilledAmountClass&gt;
              &lt;/BilledAmount&gt;
              &lt;ApprovedAmount&gt;
                 &lt;ApprovedAmountClass&gt;
                    &lt;ApprovedAmount&gt;0&lt;/ApprovedAmount&gt;
                 &lt;/ApprovedAmountClass&gt;
              &lt;/ApprovedAmount&gt;
              &lt;ExcessAmount&gt;
                 &lt;ExcessAmountClass&gt;
                    &lt;ExcessAmount&gt;0&lt;/ExcessAmount&gt;
                 &lt;/ExcessAmountClass&gt;
              &lt;/ExcessAmount&gt;
              &lt;CashMember&gt;
                 &lt;CashMemberClass&gt;
                    &lt;CashMember&gt;0&lt;/CashMember&gt;
                 &lt;/CashMemberClass&gt;
              &lt;/CashMember&gt;
              &lt;Quantity&gt;
                 &lt;QuantityClass&gt;
                    &lt;Quantity&gt;1&lt;/Quantity&gt;
                 &lt;/QuantityClass&gt;
              &lt;/Quantity&gt;
              &lt;CReason&gt;
                 &lt;ReasonClass&gt;
                    &lt;CReason&gt;?&lt;/CReason&gt;
                 &lt;/ReasonClass&gt;
              &lt;/CReason&gt;
              &lt;BenefitLimit/&gt;
              &lt;ClaimNo&gt;2201010893&lt;/ClaimNo&gt;
              &lt;PolicyNo&gt;M00113041900085&lt;/PolicyNo&gt;
              &lt;TransmissionDate&gt;2021-11-30T00:00:00&lt;/TransmissionDate&gt;
              &lt;ProcessingDate&gt;2021-11-30T00:00:00&lt;/ProcessingDate&gt;
              &lt;ProcessingTime&gt;10:29&lt;/ProcessingTime&gt;
              &lt;ResponseCode&gt;00&lt;/ResponseCode&gt;
              &lt;TID&gt;58&lt;/TID&gt;
              &lt;MID/&gt;
              &lt;CardNo&gt;3&lt;/CardNo&gt;
              &lt;TraceNumber&gt;?&lt;/TraceNumber&gt;
              &lt;DiagnosticNo&gt;00&lt;/DiagnosticNo&gt;
              &lt;DiagnosticNo1/&gt;
              &lt;DiagnosticNo2/&gt;
              &lt;Remarks&gt;PT. International &lt;/Remarks&gt;
              &lt;TotalBilled&gt;100000&lt;/TotalBilled&gt;
              &lt;ClaimDocument&gt;?&lt;/ClaimDocument&gt;
              &lt;FileName&gt;Foto&lt;/FileName&gt;
              &lt;TmpFile&gt;D:\Mailbox\Detail.png&lt;/TmpFile&gt;
              &lt;DocumentID&gt;D001&lt;/DocumentID&gt;
              &lt;MIME&gt;image/png&lt;/MIME&gt;
              &lt;ErrorMessage&gt;Process Success&lt;/ErrorMessage&gt;
              &lt;ClaimType&gt;GL&lt;/ClaimType&gt;
              &lt;ReimbursementF&gt;true&lt;/ReimbursementF&gt;
              &lt;Start&gt;2022-01-9&lt;/Start&gt;
              &lt;Finish&gt;1/9/2022&lt;/Finish&gt;
              &lt;OverallLimitAmount&gt;2000000&lt;/OverallLimitAmount&gt;
              &lt;RemainingLimit&gt;2000000&lt;/RemainingLimit&gt;
              &lt;BilledAmountTotal&gt;0&lt;/BilledAmountTotal&gt;
              &lt;ApprovedAmountTotal&gt;0&lt;/ApprovedAmountTotal&gt;
              &lt;ExcessAmountTotal&gt;0&lt;/ExcessAmountTotal&gt;
              &lt;CashMemberTotal&gt;0&lt;/CashMemberTotal&gt;
              &lt;ExcessPayOnSpotF&gt;false&lt;/ExcessPayOnSpotF&gt;
           &lt;/EDCData&gt;
           &lt;EDCMemberData&gt;
              &lt;Name&gt;JESSTY&lt;/Name&gt;
              &lt;Sex&gt;F&lt;/Sex&gt;
              &lt;MaritalStatus&gt;M&lt;/MaritalStatus&gt;
              &lt;BirthDate&gt;85/03/28&lt;/BirthDate&gt;
              &lt;Address/&gt;
              &lt;MemberClass&gt;Class 6&lt;/MemberClass&gt;
              &lt;MemberStatus&gt;Active&lt;/MemberStatus&gt;
              &lt;StartDate&gt;21/09/01&lt;/StartDate&gt;
              &lt;EndDate&gt;22/08/31&lt;/EndDate&gt;
           &lt;/EDCMemberData&gt;
           &lt;ErrMsg/&gt;
        &lt;/EDCDataCheckInResponse&gt;
     &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>