title: Java class to call a SOAP - Web service
body: <p>I have a SOAP that i need to call from Oracle and i have heard that the only way to work it out is through a Java class , Unfortunately im not familiar with Java as i'm an Oracle developer ( Oracle Forms ) I really appreciated it if someone can help me creating a class calling this SOAP so that i can build it on my Oracle database and call it from Oracle forms builder the way i call a function .</p>
  
  <p>There are two SOAPs (1.1 nd 1.2 ) , both of any can work :</p>
  
  <p><strong>*</strong> SOAP 1.1 </p>
  
  <p>The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.</p>
  
  <pre><code>POST /gmgwebservice/service.asmx HTTP/1.1
  Host: 212.35.66.180
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://tempuri.org/SendSMS"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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/"&gt;
    &lt;soap:Body&gt;
      &lt;SendSMS xmlns="http://tempuri.org/"&gt;
        &lt;UserName&gt;string&lt;/UserName&gt;
        &lt;Password&gt;string&lt;/Password&gt;
        &lt;MessageBody&gt;string&lt;/MessageBody&gt;
        &lt;Sender&gt;string&lt;/Sender&gt;
        &lt;Destination&gt;string&lt;/Destination&gt;
      &lt;/SendSMS&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  HTTP/1.1 200 OK
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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/"&gt;
    &lt;soap:Body&gt;
      &lt;SendSMSResponse xmlns="http://tempuri.org/"&gt;
        &lt;SendSMSResult&gt;string&lt;/SendSMSResult&gt;
      &lt;/SendSMSResponse&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p><strong>*</strong>*SOAP 1.2</p>
  
  <p>The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.</p>
  
  <pre><code>POST /gmgwebservice/service.asmx HTTP/1.1
  Host: 212.35.66.180
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Body&gt;
      &lt;SendSMS xmlns="http://tempuri.org/"&gt;
        &lt;UserName&gt;string&lt;/UserName&gt;
        &lt;Password&gt;string&lt;/Password&gt;
        &lt;MessageBody&gt;string&lt;/MessageBody&gt;
        &lt;Sender&gt;string&lt;/Sender&gt;
        &lt;Destination&gt;string&lt;/Destination&gt;
      &lt;/SendSMS&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  HTTP/1.1 200 OK
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Body&gt;
      &lt;SendSMSResponse xmlns="http://tempuri.org/"&gt;
        &lt;SendSMSResult&gt;string&lt;/SendSMSResult&gt;
      &lt;/SendSMSResponse&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  </code></pre>