SOAP Protocol

280

Solutions

418

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

MS Access VBA modules to Create, Read, Update, Delete (CRUD) using API (Web Service) via odata or SOAP protocol. This project is particularly consuming an MSD (Microsoft Dynamics) APIs.
0
Amazon Web Services
LVL 19
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

pagination iteration...

I have a SOAP web service that has a pagination limit of 10000 and a dateinterval input.  how do I iterate through in c# to collect all rows rather than just 10000?
0
Hi Experts,

I am using soap webservices  to communicate to other application.
To connect soap webservice i have a Endpoint url.
i have to download the certificate from the EPUrl.

can some one suggest how to download the certificate from the browser.
0
Hello,

To begin with, I am new entrant into Oracle SOA technology.

In the current SOA 12c production environment hosted on Windows server we have 2 node configured with High availability. Architecture looks like

Admin Server DHQAPP132
soa_server1 DHQAPP132  Listen Address DHQAPP132
soa_server2 DHQAPP129  Listen Address DHQAPP129

I could see there is Oracle SOA installation on both servers hosted on the D drive of app132 and app129

Requirement : Add one more soa server into the mix with high availability. i.e soa_server3.
We are planning to first test this in lower environment.

As I am new into this technology, can your advise the following
a) Configuration steps to extend another server

Regards
Thomas
0
How do you add a service reference for a secure web service in Visual studio 2019...

I can view WSDL in browser as the browser asks for the certificate but VS just says can not establish secure ssl/tls.

I have the very in the trusted root store and have given account access unless VS runs under a different account?
0
We are getting an error running a SOAP request on a particular machine:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Opening the URL up in a browser the page appears fine - it provides the usual wsdl definitions of the service.

URL: https://myswebservice/MembershipWebService.asmx?wsdl

The code is actually some VB script

set ws = CreateObject("MSSOAP.SoapClient30")
url = "https://myswebservice/MembershipWebService.asmx?wsdl"
ws.MSSoapInit(url)

Open in new window


I've run Wireshark on it to see if it gave any clue as to what the issue is - the same script works fine on other machines, there is clearly something about this setup that - I've attached the Wireshark results, I'm no network expert so I didn't get much from the report but maybe someone will be able to help?
0

STORY:


I need to create a SOAP Envelop with C#.NET to consume a Java-based web service

I can use SoapUI for testing and it works properly.

now I need to create a C#.NET console app to consume this web service.

I was able to compute the <ds:DigestValue> but I couldn't' compute the SignatureValue.

note the "ds" prefix which is required for the Java-based web service and I don't have control over it.

I have tried tens of solutions from the internet and none works.

QUESTION:


How to compute <ds:SignatureValue> base on the node <ds:SignedInfo>, it could be in C#, or any another library like OpenSSL


<ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
        <ec:InclusiveNamespaces PrefixList="#default"
            xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" />
        </ds:CanonicalizationMethod>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
        <ds:Reference URI="#id-2">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                    <ec:InclusiveNamespaces PrefixList=""
                        xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" />
                    </ds:Transform>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                

Open in new window

0
Hi Experts,

I want to generate client stub using soap wsdl.
i am using Ant build.
can some help me how to generate clientstub for real time environments using Ant project.

Thanks,
0
I am facing Problem when converting xml file to soap message for making a call to web service attaching my code and request  

following is the error

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:wsdl="http://xmlns.qtel.com.qa/B2B/WSDL" 
xmlns:par="http://www.tibco.com/namespaces/bc/2002/04/partyinfo.xsd">
   
   <soapenv:Header>
      <wsdl:TxInfo>
         <wsdl:Created>2018-06-10T11:07:20.953+03:00</wsdl:Created>
         <wsdl:Source>POS101</wsdl:Source>
         <wsdl:Lang>EN</wsdl:Lang>
      </wsdl:TxInfo>
      <par:PartyInfo>
         <from>
            <name>RQ</name>
         </from>
         <to>
            <name>Qtel</name>
         </to>
         <operationID>Qtel.Gateway/1.0/CheckLineStatus</operationID>
         <operationType>syncRequestResponse</operationType>
         <transactionID>RQJAV270220190000000010</transactionID>
      </par:PartyInfo>
   </soapenv:Header>


   <soapenv:Body>
      <wsdl:CheckLineStatusRequest>
         <wsdl:Request>RQ</wsdl:Request>
      </wsdl:CheckLineStatusRequest>
   </soapenv:Body>
</soapenv:Envelope>
ContentDescription >> null
Soap Header        >> [soapenv:Header: null]
Soap Part          >> com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl@37f8bb67
SOAP Body          >> [soapenv:Body: null]

Open in new window

SoapEnv.java
sample_rq.xml
0
I've a problem connecting via an MSSOAP.SoapClient to a web service.

The exact same call works on a different client.

Here is the code - this is in a VBS file:

set h = CreateObject("MSSOAP.SoapClient30")
h.ClientProperty("ServerHTTPRequest") = True 
url = "https://(myserver)/WebService.asmx?wsdl"
h.MSSoapInit(url)

Open in new window


This gets an error:

WSDLReader: WSDLReader:XML Parser failed at linenumber
0, lineposition 0, reason is: The system cannot locate the resource specified.
HRESULT=0x1: Incorrect function.
- WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: The parameter is incorrect.
- Client:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.

The same URL loads fine in the browser.

There is a very similar issue described here:
https://stackoverflow.com/questions/3374573/why-can-i-access-a-wsdl-file-from-a-browser-but-not-from-application 

In which the suggested resolution is to compare the traffic between the browser and the app using Fiddler.

However I can't seem to get Fiddler to intercept the traffic.

I've tried with and without this line:
h.ClientProperty("ServerHTTPRequest") = True


I'm on Windows Server 2008 R2
1
Introduction to R
LVL 19
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

I have a strange SoapHeader issue, which requires me to show the actor and mustUnderstand in a security header which is part of my SoapHeader. I have 2 questions, how can i set the value of these 2 attributes and how can i place them in my Security Element which is part of the SoapHeader.

This is what it should look like
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
    <Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext" soapenv:actor="" soapenv:mustUnderstand="0">
          <UsernameToken>
              <Username>user</wsse:Username>
              <Password>password</wsse:Password>
          </UsernameToken>
    </Security>
</soapenv:Header> 

Open in new window

0
I'm using EncryptedXML to decrypt a SOAP message.  I'm loading the certificate manually and trying to decrypt the message.  But I'm getting the following error:

Unable to retrieve the decryption key.

Open in new window


Here is my code:
stream.Position = 0;
var doc = new XmlDocument();
doc.PreserveWhitespace = true;
doc.Load(stream);

var clientCertEnc = new X509Certificate2(@"C:\certificates\xxxxxt.pfx", "xxxxxx");
var privateKeyRSAA = (RSACryptoServiceProvider)clientCertEnc.PrivateKey;

var exml = new EncryptedXml(doc);
exml.AddKeyNameMapping("KeyIdentifier", privateKeyRSAA);
exml.DecryptDocument();

Open in new window


Here is my xml:
<s:Envelope 
        xmlns:s="http://www.w3.org/2003/05/soap-envelope" 
        xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <s:Header>
            <VsDebuggerCausalityData 
                xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo4tYpt6X40FEk+VSAe5mc8MAAAAAP497cBuXfk+uFIOY80O0iuLtIW56q7hLktgVYPhbnHMACQAA
            </VsDebuggerCausalityData>
            <o:Security s:mustUnderstand="1" 
                xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                <o:BinarySecurityToken u:Id="uuid-10490fb0-8ee0-4a4c-a8db-77242c9a3b7f-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" 

Open in new window

0
Hi,

I'm in the process of developing an eBay application in Microsoft Access 2016. So far my project has been fine and the API calls I have made have been successful but I have now come to a stumbling block that I need some help with.

The API calls I have used so far are all for single listings so this is easy and I just pass the XML through an HTTP request. I want to make this much more efficient and use eBay's File Transfer API where I can send more than 1 call at a time but I'm really struggling on trying to understand how to build the call.

The data has to be sent as Binary Base64 which I have a converter to do this. I can build the XML that needs to be sent but I just don't understand how to send the XML from a string as apposed to a physical file.

I've read loads on the internet about having to create it as a multipart request with boundaries but really not sure how to start building that. I can provide code if need be so you can see where I am at.

I hope this makes sense.
0
I'm trying to figure out why I can't seem to decrypt an encrypted key from .NET with a X509 Certificate.  

.NET Code
encryptedKey = "jW3VDsUZWIdzfZ1bPN3iKI2Pf9u22kUax0DFnF3A9H+nvcBQuVC2efw1FYGm5/AvnN27kXqA4PyCqcQLp/tguVqHtzdR7mJtkTCyY8TUoAej2Mqzv2uiEKULB/8rlPDl2DOkSMGJqieenAG/7gZjWhlU0eYrlcMi5dtAnPFTfy+LvtJ6bbGEDgy4FhoT49T6sO0kjBJHp5YI0p/CeEuc+WMT/BMGG1YuDPswltj0VzeaE3KbHSLvJPjGCQ3U0YkUWm8h9zM22S/mRvfMhEu1aRdQpojGUiSLKUJyotNu8fRulKeB1TVuE7AlDGrbAUsRtU+y6PdLMcEHW+BRq5Uouw==";

var encryptedKeyByte = Convert.FromBase64String(encryptedKey);

var clientCert = new X509Certificate2(@"C:\certificates\xxxxx.pfx", "xxxx");
var rsa = (RSACryptoServiceProvider)clientCert.PrivateKey;
byte[] key = rsa.Decrypt(encryptedKeyByte, false);

Open in new window


The error I get when I try to run the last line of the code rsa.Decrypt(encryptedKeyByte, false)
The parameter is incorrect.


In SOAP UI the decryption works where I use the same certificate.  I just had to convert the file pfx to a jks file to get it working in SOAP UI.  But other than that the settings look the same to me.
Here is a screen shot of the SOAP UI settings.  I'm guessing the Signature Keystore in the SOAP UI seetings is not used for the decryption process.  The Decrypt Keystore settings in SOAP UI is the one I'm using in .NET.  Only in .NET its a pfx file.  
SOAP UI Settings
I also imported the certificate to my local box to see some of the details.  Here is what I see:
Certificate seen in MMCcertificate_properties_in_mmc_2.pngCertificate seen in MMC
Please let me know if you need me to provide any other information or need me to test something out.  Thanks in advance for your help.
0
I have a soap message that is signed with a x509 Certificate. How do I manually decrypt it. I would think this would be easy but I can't seem to figure it out.

I tried this example but it did not work for me.
https://stackoverflow.com/questions/20743256/how-to-decrypt-raw-soap-response-encrypted-with-x509
0
I'm using C# to call a Java Webservice.  Fiddler gives me a status of 200. So my call to the service is good.  But something in the .NET does not like my MTOM message.  Any ideas?  Here are all the details.  

I'm getting this error:
MTOM messages must have type 'application/xop+xml'.

Open in new window


The stack trace says:
Server stack trace: 
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
   at System.ServiceModel.Channels.BufferedMessageData.GetMessageReader()
   at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
   at System.ServiceModel.Channels.MtomMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
   at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at 

Open in new window

0
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.

private void SendXmlToWebService()
        {            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(@"C:\inetpub\wwwroot\WsSAt\XmlPeticion.xml");
            StringBuilder rawXml = new StringBuilder();
            rawXml.Append(GetXmlString(xmlDoc));
            PostXml("http://10.181.236.3:9094/axis2/services/SISE_IDC?wsdl", rawXml.ToString());
        }

        static string GetXmlString(XmlDocument xmlDoc)
        {
            StringWriter sw = new StringWriter();
            XmlTextWriter xw = new XmlTextWriter(sw);
            xmlDoc.WriteTo(xw);
            return sw.ToString();
        }

        public void PostXml(string url, string xml)
        {
            byte[] bytes = Encoding.UTF8.GetBytes(xml);
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "POST";
            request.ContentLength = bytes.Length;
            request.ContentType = "text/xml; charset=utf-8";
            request.Host = "10.181.236.3:9094";
            request.Accept = "gzip,deflate";

            using (Stream requestStream =
0
hi,
Is it possible, in Embarcadero delphi, to be connected to a WEB-Services SOAP (imported with WSDL-Import and with THTTPRIO component ) with a https connection and where the WebServices need a Certificate? How set the certificate?
I need an example.
Thanks,
0
Consuming ASPNET WSDL service using PHP
Hi Experts,
having some serious issues getting this one right. I am writing a PHP web app that needs to post an xml to an ASPNET WSDL service. Upon submitting data via PHP service it gives me an error "SoapFault exception: [s:Client] An error has occurred during service execution halting any further processing."
I then decided to use ReadyAPI and the error it gives is "HTTP/1.1 415 Cannot process the message because the content type 'multipart/related; type="text/xml"; start="<rootpart@soapui.org>"; boundary="----=_Part_0_2905742.1520010170903"' was not the expected type 'text/xml; charset=utf-8'."

Really baffled with this one. Have tried so many different soap codes to submit data and same response. any suggestions?
0
CompTIA Cloud+
LVL 19
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

any one can help me for this php code
soap.php
0
I have a username and password for the real estates agent theysaid I have to call the web service and get a response but
How can I integrate to my theme in wordpress if u want to help me will be good or I can hire you too but I like to learn anny I wait for your answer guys thank you
0
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
I had this question after viewing New to SOAP and need some direction.
0
I need a step by step instruction how to build a soap web service using PowerBuilder 12.6 or 2017 in Classic.
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

SOAP Protocol

280

Solutions

418

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!