Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

SOAP Protocol

253

Solutions

369

Contributors

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.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi my soap client is not sending any xml request to the soap server. I tried sending data with wsdl link.

require_once('../libs/nusoap.php');
$client = new nusoap_client('http://url.com/wsdlfilelink', 'wsdl');

....

$merchantIDStruct = new stdClass();
$merchantIDStruct->name = 'merchant_id';
$merchantIDStruct->value = '1234567';

$detailArray = new stdClass();
$detailArray->item = $merchantIDStruct;

$parameters = new stdClass();
$parameters->details = $detailArray;
$parameters->billerRef = "RB_C1_RECO";
$parameters->payinstrRef = "RB_C1_RECO";

//$param_merchant_id = array( "merchant_id" => "5235437" );
//$parameters = array("Request" => $param_Request, "merchant_id" => $param_merchant_id);
$query = 'php';
 /* create the proxy object */
$proxyclientwsdl = $client->getProxy();
$result = $proxyclientwsdl->RECOstep1($parameters);


WSDL:

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:typens="urn:PaymentServer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="RECOstep1" targetNamespace="urn:PaymentServer">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:p="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="urn:PaymentServer">
<xsd:element name="Request">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="billerRef" minOccurs="1" maxOccurs="1">
<xsd:simpleType>
0
Free Tool: IP Lookup
LVL 10
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I had this question after viewing New to SOAP and need some direction.
0
I am part of a development for a SOAP web services client on WCF/.NET. After a session of sending request, team for server side left feedback "extend someAction from schema i am mentioning below", and mentioned an URL. In this context, what does it mean to extend from schema?
0
Working with a web service and a little out of my depth.  The example that I have been given asks for my cert with my private key as an option in stream_context_set_option.  Could this expose the private key unnecessarily / does this actually submit to the service?
0
I need a step by step instruction how to build a soap web service using PowerBuilder 12.6 or 2017 in Classic.
0
Hi,
I'm trying to use a webservice (.net if it matters).
Using the code directly below I get a response.
$options = array(
	'username' => "myusername",
	'password' => "mypassword"

);

$url = "https://service.mydomain.com/soap12";

$client = new SoapClient($url);
$client->__soapCall('login',$options);
$fcs = $client->__getFunctions();
dd($fcs);

Open in new window


I get a return so thinking something is working (shortened below):
array:145 [▼
  0 => "UNKNOWN ActivityChange(UNKNOWN $par)"
  1 => "UNKNOWN Admin(UNKNOWN $par)"
  2 => "UNKNOWN DirectIntefaceTest3(UNKNOWN $par)"
  3 => "UNKNOWN DirectIntefaceTest(UNKNOWN $par)"
  4 => "UNKNOWN LogEntryGet(UNKNOWN $par)"
  5 => "UNKNOWN LogEntryDetails(UNKNOWN $par)"
  6 => "UNKNOWN SystemUploads(UNKNOWN $par)"
  7 => "UNKNOWN TestUpload(UNKNOWN $par)"
  8 => "UNKNOWN AppointmentGet(UNKNOWN $par)"
]

Open in new window


I'm trying to use the AppointmentGet. Trying below:
$params = array(
	'AppointmentSince'  =>'2017-07-11T07:00:00',
	'AppointmentUntil'  =>'2017-07-11T012:00:00',
	'SerialNumber'		=> '9999'
);

$response = $client->__soapCall('AppointmentGet', $params);
also:
$response = $client->AppointmentGet($params);

Open in new window

Regardless same error:

SoapFault in TestController.php line 70: Internal Server Error
(line 70 being the $response line)

The company that provides the service has some documentation:
https://partnerhub.pbsdealers.com/soap12/metadata?op=AppointmentGet

Any ideas?
0
Trying to consume webservice using wcf client, getting following error

The content type multipart/related; boundary=MIMEBoundaryurn_uuid_B50EC784A204DC07C91495512014914; type="text/xml"; start="<0.urn:uuid:B50EC784A204DC07C91495512014915@apache.org>"; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the  . The first 1024 bytes of the response were ...

Fiddler is showing the complete response but wcf is not able to deserialize the complete response. Response contains Japanese characters.
0
Example for WinRM  API using SOAP
0
Hi,
we are in need of technical help to achieve secure comms using secure Soap (certificated) to a government web-service.
We have to send and receive encrypted SHA256 xml content as the payload using SSL transport.
Is this an area in which you have expertise?
If so, we are prepared to pay for consulting/help if a working result can be achieved.
If you have expertise here, and are able to offer guidance, then we can send real code and proper full description of our problems.
Thanks,
Justin Graham.
New Zealand (GMT + 12)
0
How do I retrieve the values of the SOAP Fault message to display to the user by using classical asp?
I am sending an xml document and they use SOAP authentication.
I have attached a snapshot of the message, and its a valid error message.
 I just need to retrieve and display the SOAP FAULT values.

After researching, I know I need to extract the child nodes but I can not quite it right.
I know its XML and I should be able to extract the fault string, actor and message I couldn't find what was the best way .
I am thinking in the savdoc I should  try to extract the  child node <faultstring>.
Any help appreciated.
Below is my code for sending/receiving XML etc. It works fine.
    url = "http://ws.mysite.com/test/Gateway.asmx"
    Set objXMLHTTP = server.Createobject("MSXML2.ServerXMLHTTP")
    objXMLHTTP.Open "POST", url, false
    objXMLHTTP.setRequestHeader "Content-Type", "text/xml" 
    objXMLHTTP.send xmlmsg

'get any XMLHTTP MESSAGES
   strResult= objXMLHTTP.ResponseText
   strStatus = objXMLHTTP.StatusText
   savdoc = objXMLHTTP.ResponseText

'get any SOAP FAULT MESSAGES IF THEY EXISTS AND DISPLAY TO USER

Open in new window

SoapFaultMessage.JPG
0
Free Tool: SSL Checker
LVL 10
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


There is also helpful tutorials on BlazeMeter.com for JMeter, you don't have to use BlazeMeter but they do allow you to import your JMeter .jmx file and run tests if that is a route you want to go.

I am reading as above. I wonder what are difference between JMeter Vs BlazeMeter, advantages, disadvantages, practical uses.Please advise
0
If you're using SOAP to send authentication (username and password) and data from one site to another, is the authentication details secure? Can it be intercepted? In particular I'm authenticating and sending the data to SharePoint 2013.
0
Hi,

I am going through below link
https://www.ibm.com/developerworks/library/ws-whichwsdl.
which wsdl binding style to use which time. i wonder which wsdl element wraps all operations?
 Please advise
0
Hi I wonder if you gurus can assist please.

I have a really simply SOAP server in PHP that at present I just need to send back a valid XML string for. All works ok from the request side but my response seems to be altering the < & > to &lt; / &gt;

Here is my basic SOAP Server:
<?php 

require "functions/getProperties.function.php";

$options = array(
	'uri' => 'http://s3052/webServices/ShepwayWebService',
    'location' => 'http://s3052/webServices/ShepwayWebService.php',
    'trace' => true
);

$server = new SOAPServer(null, $options);

$server->addFunction("GetProperties");

$server->handle();

?>

Open in new window


Any my functions file:
<?php

function GetProperties($strSearch){	

	// required classes
	require_once("config.php");	
	
	$response = '<GetPropertiesResponse xmlns="http://www.mvm.co.uk/webservices/M3PP"><GetPropertiesResult><MVM xmlns="http://www.mvm.co.uk"><mvm:PUBLICPROTECTION xmlns:mvm="http://www.mvm.co.uk"><M3PPPROPERTIES xmlns="http://www.mvm.co.uk"><SUBUPRN>50028034</SUBUPRN><UKEY>PI/000025895</UKEY><ADDRESS>1 Trimworth Road, Folkestone, Kent, CT19 4EJ</ADDRESS><SEARCH>TRIMWORTH ROAD</SEARCH><BUILDING_NUMBER>1</BUILDING_NUMBER><CLOSED>N</CLOSED><OUT_OF_AREA>N</OUT_OF_AREA></M3PPPROPERTIES></mvm:PUBLICPROTECTION><RESULTS><RESULT><RESULTCODE>0</RESULTCODE><RESULTDESC>Successful</RESULTDESC></RESULT></RESULTS></MVM></GetPropertiesResult></GetPropertiesResponse>';
		
	return $response;

}

?>

Open in new window


Now, If I run a test using the following code and look at the source code it works fine:
<?php 

$pf_payload  = '<GetProperties><strSearch>Trimworth Road</strSearch><strBuilding_Number/></GetProperties>';

// make the SOAP call
$options = array(    
	'uri' => 'http://s3052/webServices/ShepwayWebService',
    'location' => 'http://s3052/webServices/ShepwayWebService.php',
	'trace' => 1
);

$stub = new SoapClient(null,$options);

try { 
	echo $stub->GetProperties($pf_payload);
} catch (SoapFault $exception) { 
	error_log("\n## SOAP call exception \n: " . $exception);       
} 

error_log("\n## request : \n" . htmlspecialchars_decode($stub->__getLastRequest()));
error_log("\n## response : \n" . htmlspecialchars_decode($stub->__getLastResponse()));

?>

Open in new window


This reply "SEEMS" correct:

Open in new window

0
Here is my code :


import java.io.StringReader;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.springframework.ws.client.WebServiceIOException;
import org.springframework.ws.client.core.WebServiceTemplate;
import org.springframework.ws.soap.client.SoapFaultClientException;
import org.springframework.ws.soap.client.core.SoapActionCallback;

public class SpringWSClientSample {

      private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope\" xmlns:web=\"http://www.webserviceX.NET\">"
                  + "<soapenv:Header>"
                  + "</soapenv:Header>"
                  + "<soapenv:Body>"
                  + "<web:ChangeMetricWeightUnit>"
                  + "<web:MetricWeightValue>40000</web:MetricWeightValue>"
                  + "<web:fromMetricWeightUnit>milligram</web:fromMetricWeightUnit>"
                  + "<web:toMetricWeightUnit>gram</web:toMetricWeightUnit>"
                  + "</web:ChangeMetricWeightUnit>"
                  + "</soapenv:Body>"
                  + "</soapenv:Envelope>";

      private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();

      public static void main(String[] args) throws Exception {

            SpringWSClientSample client = new SpringWSClientSample();
            client.simpleSendAndReceive();
      }

      public void simpleSendAndReceive() {
            try {
                  StreamSource source = new StreamSource(new StringReader(
                              MESSAGE.toString()));
                  StreamResult result = new StreamResult(System.out);
                  
0
We have created a stored procedure and it is sitting on the db server.  We have tested the server locally and against the server directly using the same data as we are sending in the API and the data loads correctly.  When we use the API nothing is being loaded.  Our parameter in the SP is a XML parameter.  We are not getting any errors returned.  We have try and catches, begins and ends in the SP and it's getting to the return without issue.  But like I said nothing is being loaded.  Are we missing something?
singlerow.txt
0
Does anyone know how to gather the SOAP call and response for a specific website, using an API?
0
Hi;

My question is simple; i am gonna to call below service :

http://www.webservicex.com/globalweather.asmx?op=GetWeather

But; something is wrong, it is returning to me Data Not Found. How can i fire it? My c# code is :

  myService.GlobalWeatherSoapClient client = new myService.GlobalWeatherSoapClient();
            Console.WriteLine(client.GetWeather("Stockholm", "Sweden"));
            Console.WriteLine(client.GetWeather("Berlin", "Germany"));

Open in new window

0
I need to know the correct XPATH query to pull O_CaseID out of this SOAP response.


<?xml version="1.0" encoding="utf-8"?><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><UTP_GetUpdatedJobsResponse xmlns="http://services.pststatus.net/"><UTP_GetUpdatedJobsResult>Success</UTP_GetUpdatedJobsResult><xmlString><?xml version="1.0" encoding="utf-8"?>
<TRANSACTION TRANSACTION_TYPE="UPDATED_JOBS" TRANSACTION_DATE="01/25/2017" DOCUMENT_VERSION="1.0" COMPANY_CODE="PM1">
<Job ChangeNumber="58333">
<O_ID>PM2</O_ID>
<S_ID>PM1</S_ID>
<O_JobID>2017000002</O_JobID>
<S_JobID />
<DocumentsToBeServed>Subpoena for Hearing</DocumentsToBeServed>
<CourtDate>01/24/2017</CourtDate>
<CourtTime>2:00 PM</CourtTime>
<JobExpirationDate>01/25/2017</JobExpirationDate>
<Case>
<O_CaseID>2</O_CaseID>
<S_CaseID />
<CaseNumber>124125125</CaseNumber>
<PlaintiffTitle>Plaintiff</PlaintiffTitle>
<Plaintiff>Test Plaintiff</Plaintiff>
<DefendantTitle>Defendant</DefendantTitle>
<Defendant>Test Defendant</Defendant>
<DateFiled>01/24/2017</DateFiled>
<TypeCourt>Family Court</TypeCourt>
<County>Oneida</County>
<State>New York</State>
<JudgeName>Jude Test Mr</JudgeName>
<ClientReferenceNumber>919491294</ClientReferenceNumber>
</Case>
<Comment>
<O_CommentSeqNum>1</O_CommentSeqNum>
<S_CommentSeqNum />
<CommentText>Test comment</CommentText>
0
Free Tool: Subnet Calculator
LVL 10
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hi Experts,
I just inherited a SOAP Web Service App (.Net) that connects to a SQL Server application.
It has been a while since I worked on a SOAP Web Services.  How do I find the connection string on the web service?  I have been looking and can't find it anywhere.  

Thank you in advance.
mrotor
0
We have a highly customized CRM 2011 system that has two quotes with the same quote id and the same quote number in FILTEREDQUOTECLOSE table on our Production system.

We are trying to replicate this in our TEST environment to determine how it occurred

Thanks
0
I need to connect to a SOAP server using a client SSL certificate. It can be self signed and I believe I have created a valid certificate. I have imported the provided WSDL into Rad Studio.

From what I have found, I need to pass an THTTPRio object in, on create, that has the certificate added to it's HTTPWebNode. For whatever reason, my certificate and in fact, no certificates are found by the IDE. I have added the certificate to the windows cert store through the certutil command and using Firefox.
0
We are trying to post the xml input of a successful SoapUI call to the same endpoint, via XML.  The endpoint is a NTLM authenticated .net service.  We are successfully logging into this from PHP but we cannot send an object based on valid xml from SoapUI via a PHP xml object.

So

1)    Should we be able to post the xml directly to this service from PHP?
2)    If not, can we generate valid paramaters for the soap function from our valid xml?

A sample snippet of xml is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spo="urn:xxxxx" xmlns:sal="urn:xxxx" xmlns:val="spoint/edi/validationresults">
   <soapenv:Header/>
   <soapenv:Body>
      <spo:SendSalesDocument>
         <spo:document>
            <sal:ProcessorCode>INBOUND</sal:ProcessorCode>
            <sal:HandlerCode>MAG.SALES.ORDER</sal:HandlerCode>
            <sal:ReferenceNo>TEST</sal:ReferenceNo>
            <sal:DocumentType>ORDER</sal:DocumentType>
            <sal:SellToCustomer>
               <sal:CustomerNo>10002</sal:CustomerNo>
               <sal:Name>Sample Magento Sale</sal:Name>
               <sal:Address>Sample Address 1</sal:Address>
               <sal:Address2>Sample Address 2</sal:Address2>
               <sal:City>Sydney</sal:City>
               <sal:PostCode>2000</sal:PostCode>
               <sal:County>NSW</sal:County>
               <sal:CountryCode>AU</sal:CountryCode>
            </sal:SellToCustomer>
            

Open in new window

0
Good afternoon all,

Any help here would be greatly appreciated.  I have a web service that is located on a production server that has load balancing.  Server xx1 and xx2.   This is a public facing web server that used to be reachable via http.  Now we are required to use secure http.  Our webmaster has set up a redirect from http to https that JAX does not seem to like.  

When I run the webservice locally the schemaLocation that is inside the xsd:schema is http://localhost...?xsd=1  When I copy this exact same code to our staging area the schemaLocation becomes https://stagingserver...?xsd=1.  For some reason when it is copied to the production server the schemaLocation becomes http://productionwebaddress...?xsd=1.  I need to know what I need to configure to get this to be https://productionwebaddress...?xsd=1.

It is a linux, RH7, server running Tomcat V8.  I am merely a software developer so if you need more info then ask away and I will try and get the answers.  I don't know everything that I should post.

The full error is:  com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 302: Found
0
I am new to SOAP (no jokes) and need some direction. I have a physical access control system (PAC) that allows SOAP calls to manage it. I am hoping to get some direction on interfacing a web service using SOAP requests.

The system is an Axis Control System (A1001). I have reviewed their VAPIX documentation and all they show me is the following, but, again, I'm new to SOAP and don't know what I should do for the rest of this command:

For example, for setting a new user they show this:
<axudb:SetUser>
  <axudb:User token="user_token1">
    <axudb:Name>Name, User</axudb:Name>
    <axudb:Description>User description</axudb:Description>
    <axudb:Attribute type="string" Name="First name" Value="User"/>
    <axudb:Attribute type="string" Name="Last name" Value="Name"/>
  </axudb:User>
</axudb:SetUser>

Open in new window


The device's IP address on the inside is 172.16.254.45.  Following is what their documentation shows as a path for namespace:
Identification

Use VAPIX® Entry Service API to check if the API is supported. Services and namespaces are listed in the following table.
[Supported services and namespaces] 
Service-----Namespace-----Placeholder
User -----http://www.axis.com/vapix/ws/user-----axudb

Open in new window


Here is what I have tried, but I keep getting "Bad Request" back from the service:
PACS Class
using System;
using System.IO;
using System.Net;
using System.Xml;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using 

Open in new window

0

SOAP Protocol

253

Solutions

369

Contributors

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
<
Monthly
>

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