We help IT Professionals succeed at work.

SOAP Protocol





Simple Object Access Protocol (SOAP) is a protocol specification for exchanging structured information in the implementation of web services. It uses the XML Information Set for its message format and uses other protocols, notably Hypertext Transfer Protocol (HTTP) and the Simple Mail Transfer Protocol (SMTP) for message transmission.

hi my wsdl is not loading in spring boot
Hi Experts,

Firstly thank you for taking a look at my question!

Using PHP i need to access the xml body inside a soap packet.

the soap response looks like this:
<?xml version="1.0" encoding="utf-8"?>
<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/">
        <Response   Version="1.0" Environment="T" xmlns="http://www.dnb.com.au/Schema/CCB/1.0">
            <ConsumerHeader SegId="ERHD01" InternalReference="M20190912095903-023-000238" EnquiryType="1" UniqueCustomerReference="Test" ConsumerId="2190130" Country="AU" ProductCode="AMD3" NewFileCreated="0" IsMinor="0" HasSummary="1" HasJudgment="1" HasBankruptcy="1" HasSummons="1" HasOtherPublicRecord="0" HasDirector="0" HasFileNote="0" HasDefault="1" HasEnquiry="1" HasError="0" HasWarning="0">
                <EnquiryDate Year="2019" Month="9" Day="12" />
            <BestMatch MatchScore="768">
                <IndividualDetail SegId="ERID01">
                    <DateFirstRecorded Year="2003" Month="6" Day="10" />
                    <Person Sex="U">

Open in new window

Hi Experts,

I am facing the below issue.
teamjavax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name

i have migrated from 1.5 to 1.7 while calling the webservice facing the this issue,it is working with java 1.5 version.

can suggest how to resolve this issue.
What are some of the good web service testing application I can use? I would like to use a tool to test web services before I start any development work.
I am trying to traverse xml returned from fedex's api to get a specific value.

i successfully make my call and get my response but i keep getting "PHP Notice: Trying to get property 'StatusDetail' (or 'Code') of non object in /myfile/"

this is how i try to access the returned data from fedex:


       $response = curl_exec($ch);
        $responseXml = simplexml_load_string($response);
// i even tried $responseXml = new SimpleXMLElement($response);
        $deliveryStatus = (string) $responseXml->CompletedTrackDetails->TrackDetails->StatusDetail->Code;

Open in new window

this is the xml:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header />
      <TrackReply xmlns="http://fedex.com/ws/track/v16">
            <Message>Request was successfully processed.</Message>
            <LocalizedMessage>Request was successfully processed.</LocalizedMessage>
            <CustomerTransactionId>Track By Number_v16</CustomerTransactionId>

Open in new window

Hi Guys,

I'm having good fun doing my first web services and learning java, but I need your help ( again ).

Just to recap what I've done so far
1. using eclipse java ee I created Dynamic Web Project
2. I imported  a wsdl file to the project and generated web services (Top down Java bean ones)
3. I can take parameters from received requests and loaded them to Oracle database, which connection details are stored in config.properties file ( this pretty much works :) )

I've just been asked if it would be possible to grab a SOAP body and load it to an oracle table.

This is my class where web services requests are being consumed

 * BasicHttpBinding_MS_aaa_WMS_ServicesImpl.java
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.

package com.bbb.WebServices;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.Statement;

import org.datacontract.schemas._2004._07.Dft_aaa_WebService.WMS_RequestData;
import org.datacontract.schemas._2004._07.Dft_aaa_WebService.WMS_RequestInfo;

public class BasicHttpBinding_MS_aaa_WMS_ServicesImpl implements com.bbb.WebServices.MS_aaa_WMS_Services{
    public com.bbb.WebServices.SendPing_WMSResponse sendPing_WMS(com.bbb.WebServices.SendPing_WMS parameters) throws java.rmi.RemoteException {
try {
			Connection con = null;

Open in new window


I generated soap web services using Eclipse JEE, which then I deployed ( .war) on Tomcat 7.0 on Centos 7 -  this works fine.
The aim is to insert a data received in an xml and insert it to an Oracle table.

I've added the below code to a java class file, which meant to do some insert statement ( which is valid ) , with hardcoded values, just to prove I can do it.

    public void InsertValue(String MessageId, String value){

    	Connection con=null;

    	con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xxx", "xxx","xxx");
    	Statement s = con.createStatement();

    	s.execute("INSERT INTO ping_message (message_id,dstamp) VALUES ('1',To_char(SYSDATE))");
    	}catch(Exception e){
    	System.out.println("ERROR: "+e.getMessage());

Open in new window

Unfortunately, this does not work. I wonder if this is because of the java code or Tomcat needs some db drivers in order to establish a connection the database ?

btw, my java skills are being developed as I type this :)
Hi all, hoping one of you Gurus can assist please.

I have been using a payment system for many years but they have now changed one of their SOAP calls to an external URL. For the life of me I'm unable to connect without the following error:

"cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). "

these are the binding info from their App.config file if it helps
        <binding name="BasicHttpBinding_IPortalService">
          <!-- Transport security is only required when the portal service is running under https, for http this should be set to None -->
          <security mode="Transport" />

Open in new window

I'm using PHP7 and have free run on the server to implement any of your suggestions. Previously I used cURL to simply create the SOAP XML, post if off and grab the response but having no luck here.

I cant post all the login details etc as it's payment and site specific but I'm after being initially able to at least connect to the SOAP URL below, and get a more valid error (for example, invalid user logon) etc.

Ok, here's the details:


Action required is "Invoke" for which I believe the following should be the right XML to be sent:

Open in new window

Hi Guys,

I wonder if anyone has any experience in calling an oracle procedure/function using APIs ?
I've been reading about JDeveloper, APEX and Oracle App server and I'm a little bit confused with all my findings and the best approach.
What I need is
1. receive a SOAP API call
2. Trigger an oracle function
3. Send a response back

I have already a web server running ( hosted web app - Apache-HttpClient). However, an oracle is on a different box.
I was sending XML in SOAP envelope to a web consuming server here at Lone Star. The Web consuming service has now switched from XML to JSON. Does the SOAP envelope change? If so in what way? I'm attaching the actual output to the Web Service. Using Krengeltech's RPG-XML to generate the XML data formatted and wrapping it in the SOAP envelope. Krengeltech also has a JSON api to perform the data mapping in JSON instead of XML. I need help creating the 'wrapped' soap statements

Given the below soapclient - how can I a) check the version of tls that it is using, and b set it to 1.2 if it is not using that already?  I had assumed the browser I was using would control that side of things, but just want to double check!

$url = "https://www.SOMEURL/interface/api/report.asmx?wsdl";
//Create the client
$client = new SoapClient($url);
$datetimestamp = date("YmdHis");
$reportname = "report".$datetimestamp;

Open in new window

your help is very much appreciated!

In attempting to consume a PHP Zend AutoDiscover SOAP Service in a .Net client using a WebRequest, I'm getting this error:

    Procedure 'ProAddRq' not present

    class Program
        static void Main(string[] args)
            FileStream fileStream = new FileStream(@"C:\wamp\www\PT\Request.xml", FileMode.Open, FileAccess.Read);
            byte[] buffer = new byte[fileStream.Length];
            int count = fileStream.Read(buffer, 0, buffer.Length);
            WebRequest myWebRequest = WebRequest.Create(@"http://localhost/PT/PTradersvc.php#ProAddRq");
            // If I change the request URL to this, I get the same error
            // WebRequest myWebRequest = WebRequest.Create(@"http://localhost/PT/PTradersvc.php");
            // If I change the request URL to this, I get the WSDL returned
            // and no error.
            // WebRequest myWebRequest = WebRequest.Create(@"http://localhost/PT/PTradersvc.php?wsdl");
            myWebRequest.ContentLength = buffer.Length;
            myWebRequest.ContentType = "application/xml";
            myWebRequest.Method = "POST";

            Stream stream = 

Open in new window

I am making SOAP request with POST method which is having authentication added in the request header and request payload is being passed as XML String.

Below is the reference code:

package org.test.integration;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

import javax.net.ssl.HttpsURLConnection;

import org.apache.commons.io.IOUtils;

public class SoapRequestTest2 {
    public static void main(String args[]) throws MalformedURLException,
    IOException {

    //Code to make a webservice HTTP request
    String responseString = "";
    String outputString = "";
    String wsURL = "https://example.com:443/fscmService/ItemServiceV2";
    URL url = new URL(wsURL);
    URLConnection connection = url.openConnection();
    HttpsURLConnection httpConn = (HttpsURLConnection)connection;
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    String xmlInput =
            "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
                     +"<ns1:findItem xmlns:ns1=\"http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2/types/\">"
                     + "<ns1:findCriteria xmlns:ns2=\"http://xmlns.oracle.com/adf/svc/types/\">"

Open in new window

I have a Zend SOAP server and in my client, I set the version using this code:
    $options = array();
    $options['cache_wsdl'] = false;
    $options['soap_version'] = SOAP_1_2;
    $client = new Zend\Soap\Client("http://example.com/mysvc.php?wsdl", $options);

Open in new window

I get this exception:    
SoapFault exception: [VersionMismatch] Wrong Version

I have tried with SOAP_1_1 and SOAP_1_2 and still get the same exception.
What am I missing here?

The service is installed on a CentOS 6.9 VirtualBox with PHP 5.6.36 installed to mock our production environment. Please do not suggest that I update to PHP7+, I have no control over the production server, I'm just building a mockup for testing.

From my PHP.ini:
    Soap Client                  enabled
    Soap Server                  enabled
    Directive                    Local Value                Master Value
    soap.wsdl_cache                    1                        1
    soap.wsdl_cache_dir          /var/lib/php/wsdlcache        /tmp
    soap.wsdl_cache_enabled            1                        1
    soap.wsdl_cache_limit              5                        5
    soap.wsdl_cache_ttl             86400                     86400

Open in new window

I'm trying to make a SOAP connection to a remote server that is enforcing TLS 1.2.  I'm getting a "SECURITY VIOLATION" error, which is due to the connection not going over TLS (according to the remote host).  

I tried adding SSLContext, but that doesn't seem to do the trick.  Can anyone point me in the right direction?

    private static void callSoapWebService(String soapEndpointUrl, String soapAction) {
        try {
            SSLContext sc = SSLContext.getInstance("TLSv1.2");
            sc.init(null, null, new java.security.SecureRandom());
            // Create SOAP Connection
            SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
            SOAPConnection soapConnection = soapConnectionFactory.createConnection();

            // Send SOAP Message to SOAP Server
            SOAPMessage soapResponse = soapConnection.call(createSOAPRequest(soapAction), soapEndpointUrl);

            // Print the SOAP Response
            System.out.println("Response SOAP Message:");

        } catch (Exception e) {
            System.err.println("\nError occurred while sending SOAP Request to Server!\nMake sure you have the correct endpoint URL and SOAPAction!\n");
When communicating with SSAS msmdpump via SOAP requests Analysis services returns with Content-Types that are compressed and in binary XML (Content_type: xs+xpress).

We would like to include an extra layer of abstraction between the client and Analysis services and would like to know if there is a way to have Analysis services send back plain XML or how to read the xs+xpress content-types.

I need to use a SOAP interface of the Dogana in Italy.
I develop some code in delphi (berlin) using SOAPHTTPClient, but i become always this error:

"Impossibile passare dalla codifica corrente a quella specificata.
Line: 1
<?xml version="1.0" encoding="utf-8"?><s."

I try
HTTPRIO.Converter.Encoding := 'UTF-8';

Thank you for the help.

I'm trying to build a server for another soap server to call and give back a soap response in PHP and NuSoap.

The soap service that will be sending the request is here https://supplieruatsp.testpartstrader.us.com/v2.0/services/InventoryOptionsService.svc
Now, this service will send me a request that I'm supposed to parse, then query some data and send back a response.

I have built a simple server and client for testing but I'm getting nowhere, nothing but errors from NuSoap. I am also seeing this as an error:
wsdl error: Bad path to WSDL file ://IBMSSimpleTypes.xsd

I cannot find IBMSSimpleTypes in any file on my local web server.

Not sure what the problem is as I have never written this in PHP before.

Can anyone help out here?

require_once "./lib/nusoap.php";

$server = new soap_server('InventoryOptionsService.wsdl'); // contains a local copy of the wsdl from the service


    function SubmitInventory($request) {
        echo $request;

Open in new window

require_once "./lib/nusoap.php";
$client = new nusoap_client("InventoryOptionsService.wsdl", true);

$error = $client->getError();
if ($error) {
    echo "<h2>Constructor error</h2><pre>" . $error . "</pre>";
$request = file_get_contents("RequestExample.xml");

$result = $client->call("SubmitInventory", $request);

if ($client->fault) {
    echo "<h2>Fault</h2><pre>";

Open in new window

I have the following JavaScript making a call to a PHP page:

	function callPhpAPI(youdata) {
		$.post( "http://www.utahkidsfoundation.com/recsoap.php", { mes: youdata } );

Open in new window

PHP page:



    $emailto = 'xxx@gmail.com';
    $toname = 'Tom';
    $emailfrom = 'xxxr@xxx.com';
    $fromname = 'xxx';
    $subject = 'activity on xxx detected:  ' + $mes;
    $messagebody = 'There was a page hit on xxx:  ' + $mes;
    $headers = 
        'Return-Path: ' . $emailfrom . "\r\n" . 
        'From: ' . $fromname . ' <' . $emailfrom . '>' . "\r\n" . 
        'X-Priority: 3' . "\r\n" . 
        'X-Mailer: PHP ' . phpversion() .  "\r\n" . 
        'Reply-To: ' . $fromname . ' <' . $emailfrom . '>' . "\r\n" .
        'MIME-Version: 1.0' . "\r\n" . 
        'Content-Transfer-Encoding: 8bit' . "\r\n" . 
        'Content-Type: text/plain; charset=UTF-8' . "\r\n";
    $params = '-f ' . $emailfrom;
    $test = mail($emailto, $subject, $messagebody, $headers, $params);
    // $test should be TRUE if the mail function is called correctly

    header("Location: http://xxx.com");


Open in new window

The email IS being sent, but the PHP variable $mes that I am attempting to make use of has a problem.

The email when it arrives looks like this:


What I expected was to see the following subject and message body:

subject: 'activity on xxx detected:  content of param passed in
message body: 'There was a page hit on xxx:  content of param passed in

If I remove the $mes PHP variable I am trying to append to the end of the subject and message body (above) -- the subject and message body come through GREAT, minus the custom message(which is the entire point of all this)

I am requesting a web service through an xml, I verify the answer with the Fiddler tool and it returns an Http 200, but the answer as such does not return the information that the web service should send me but it returns the wsdl of the same. I do not know if you are making any mistakes in the programming, please help me.
Our company is moving some components to our internal cloud and I am working in a project and one of the task is to expose an existing legacy java class as soap web service. Can anyone please help me stir in the right direction? How can  I write a soap Producer on existing new class and methods? Should I write a new class and extend this class or should I write a subclass? What is the best  way  to approach  this?I  am new  to integration projects. The company is using  Mule  Esb as an integration solution? Also how Mule esb fitst together  with all this?I am new to  Mule  esb.
with the help of experts on this exchange i managed to cobble together this code
it does work almost, but it produces a text file and not an xml document file, or i am not smart enough to load the xml document.
So any help would be appreciated

Sub plireader()
'On Error Resume Next

'CEMgetattendance -  CLETracker
'DEV_getattendance -152413

Dim strrequest As String
Dim objhttp As Object
    strXmlToSend = "<company>CLETracker</company>"
    '    strXmlToSend = "<company>CLETracker</company>"

webserviceurl = "https://www.pli.edu/public/CEM/Service.asmx"

 Set objhttp = CreateObject("Msxml2.XMLHTTP.6.0")
MsgBox "send now"
  strrequest = "<?xml version=""1.0"" encoding=""utf-8""?>" _
               & "<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>" _
               & "<CEMgetAttendence xmlns=""http://www.pli.edu/public/CEM/"">" _
               & "<company>CLETracker</company>" _
               & "</CEMgetAttendence>" _
               & "</soap:Body>" _
               & "</soap:Envelope>"
Dim resp As String

MsgBox strrequest
objhttp.Open "POST", webserviceurl, False
objhttp.setRequestHeader "SOAPAction", "http://www.pli.edu/public/CEM/Service.asmx?op=CEMgetAttendence"

objhttp.setRequestHeader "Content-Type", "text/xml"
objhttp.send (strrequest)
  ' resp = http.HttpGetText(url)
I am trying to get XML validation working for a SOAP server but I've run into a couple of issues.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://p2p.thalesgroup.com/wsdl/status/xsd"
  <xsd:element name="Alive">
          - Alive is sent periodically to verify the connection status

Open in new window

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap-enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Open in new window

First Issue:
SOAP elements are not being recognized.
Validator Output: Cannot Find The Declaration Of Element 'soap:Envelope'., Line '1', Column '225'.
I found a Stack Overflow thread describing the same issue but the described solutions do not work for me.

Second Issue:
Even if I remove the SOAP elements, I still have a namespace issue.
Validator Output: Cannot Find The Declaration Of Element 'Event'., Line '1', Column '8'.

I have a webservice that I,m trying to apply a custome security, when I try to call the service it display the following error:


At least one security token in the message could not be validated.

To add the security I modify the service config file:

[b][b]<services> <service name = "WcfService1.Service1"> <endpoint address="" binding="customBinding" bindingConfiguration="customBindingOasis" contract="WcfService1.IService1"> <headers> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>USERNAME</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password> </wsse:UsernameToken> </wsse:Security> </headers> </endpoint> </service> </services> <bindings> <customBinding> <binding name ="customBindingOasis"> <security authenticationMode="UserNameOverTransport" includeTimestamp="false" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> <secureConversationBootstrap /> </security> <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12" writeEncoding="utf-8"> <readerQuotas maxDepth="32"

I have this WCF service that works fine using soap1. I'm trying to change it to run in soap1.2 but I have not been able.

I have try changin diferents things in the webconfig.

First I change the basicHttpBinding for wsHttpBinding.  I also change the protocol , remove the soap1.1 and add the soap 1.2

How I can made that my WCF web service run in soap1.2?

SOAP Protocol





Simple Object Access Protocol (SOAP) is a protocol specification for exchanging structured information in the implementation of web services. It uses the XML Information Set for its message format and uses other protocols, notably Hypertext Transfer Protocol (HTTP) and the Simple Mail Transfer Protocol (SMTP) for message transmission.

Top Experts In
SOAP Protocol

No Top Experts for this time period. Answer questions to earn the title!