<p>What is the simplest SOAP example using Javascript?</p>

<p>To be as useful as possible, the answer should:</p>

<ul>
<li>Be functional (in other words actually work)</li>
<li>Send at least one parameter that can be set elsewhere in the code</li>
<li>Process at least one result value that can be read elsewhere in the code</li>
<li>Work with most modern browser versions</li>
<li>Be as clear and as short as possible, without using an external library</li>
</ul>

Simplest example would consist of:
Getting user input.
Composing XML SOAP message similar to this
```
```
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetInfoByZIP xmlns="http://www.webserviceX.NET">
      <USZip>string</USZip>
    </GetInfoByZIP>
  </soap:Body>
</soap:Envelope>
```
```
POSTing message to webservice url using XHR
Parsing webservice's XML SOAP response similar to this
```
```
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <soap:Body>
  <GetInfoByZIPResponse xmlns="http://www.webserviceX.NET">
   <GetInfoByZIPResult>
    <NewDataSet xmlns="">
     <Table>
      <CITY>...</CITY>
      <STATE>...</STATE>
      <ZIP>...</ZIP>
      <AREA_CODE>...</AREA_CODE>
      <TIME_ZONE>...</TIME_ZONE>
     </Table>
    </NewDataSet>
   </GetInfoByZIPResult>
  </GetInfoByZIPResponse>
 </soap:Body>
</soap:Envelope>
```
```
Presenting results to user.
But it's a lot of hassle without external JavaScript libraries.