title: Post soap envelope from bash script
body: <p>How would I post the following soap envelope via a bash script.</p>
  
  <p>In PHP I would post using cURL but don't know how to translate into bash?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;env:Header&gt;
      &lt;n:Request xmlns:n="http://www.****.com/iprs/soap" env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" env:mustUnderstand="true"&gt;UserMod&lt;/n:Request&gt;
    &lt;/env:Header&gt;
    &lt;env:Body&gt;
      &lt;n:RequestUserMod xmlns:n="http://www.****.com/iprs/soap"&gt;
        &lt;n:UserID&gt;****&lt;/n:UserID&gt;
        &lt;n:UserData &gt;
          &lt;n:SystemName&gt;****&lt;/n:SystemName&gt;
          &lt;n:AdminState&gt;enabled&lt;/n:AdminState&gt;
          &lt;n:CategoryTypeID&gt;****&lt;/n:CategoryTypeID&gt;
          &lt;n:Permissions&gt;****&lt;/n:Permissions&gt;
          &lt;n:BillingProgID&gt;****&lt;/n:BillingProgID&gt;
          &lt;n:DefaultGroupID&gt;****&lt;/n:DefaultGroupID&gt;
          &lt;n:PrimarySiteID&gt;****&lt;/n:PrimarySiteID&gt;
          &lt;n:SecondarySiteID&gt;****&lt;/n:SecondarySiteID&gt;
          &lt;n:ContactInfo&gt;&lt;/n:ContactInfo&gt;
          &lt;n:Password&gt;****&lt;/n:Password&gt;
        &lt;/n:UserData&gt;
      &lt;/n:RequestUserMod&gt;
    &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
  </code></pre>
  
  <p>If possible I would also like to detect the response, which should be:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Type:application/soap+xml; charset="utf-8"
  Content-Length:509
  
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"&gt;&lt;env:Header&gt;
  &lt;n:Response xmlns:n="http://www.*****.com/iprs/soap" env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" env:mustUnderstand="true"&gt;UserMod&lt;/n:Response&gt;
  &lt;/env:Header&gt;
  &lt;env:Body&gt;
  &lt;n:ResponseUserMod xmlns:n="http://www.*****.com/iprs/soap"&gt;
  &lt;n:StatusReport&gt;
  &lt;n:Code&gt;ok&lt;/n:Code&gt;
  &lt;n:SubCode&gt;0&lt;/n:SubCode&gt;
  &lt;/n:StatusReport&gt;
  &lt;/n:ResponseUserMod&gt;
  &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
  </code></pre>