Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a full working example :</p> <pre><code>import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.util.EntityUtils; public void callWebService(String soapAction, String soapEnvBody) { // Create a StringEntity for the SOAP XML. String body ="&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"http://example.com/v1.0/Records\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"&gt;&lt;SOAP-ENV:Body&gt;"+soapEnvBody+"&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;"; StringEntity stringEntity = new StringEntity(body, "UTF-8"); stringEntity.setChunked(true); // Request parameters and other properties. HttpPost httpPost = new HttpPost("http://example.com?soapservice"); httpPost.setEntity(stringEntity); httpPost.addHeader("Accept", "text/xml"); httpPost.addHeader("SOAPAction", soapAction); // Execute and get the response. HttpClient httpClient = new DefaultHttpClient(); HttpResponse response = httpClient.execute(httpPost); HttpEntity entity = response.getEntity(); String strResponse = null; if (entity != null) { strResponse = EntityUtils.toString(entity); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload