Solved

Delphi Soap: how to

Posted on 2013-05-23
1
826 Views
Last Modified: 2016-09-30
Hello,

I need to send xml-s and receive answers using Soap.

The Xml is quite special, so it is best for me to build the xml like this:

result.WriteString('<?xml version="1.0" encoding="UTF-8"?>' + sLineBreak);
      result.WriteString('<SOAP-ENV:Envelope' + sLineBreak);
      result.WriteString('	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"' + sLineBreak);
...

Open in new window


How can I make some Soap component send it? (I mean the xml generated by me)

Thank you
0
Comment
Question by:starhu
1 Comment
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 39192593
You don't need soap if you already have soap xml ('<SOAP-ENV:Envelope ....'). You need just transport to send this. I'm send soap messages using THTTPReqResp. It can be send using Indy too.
...
Msg: TStringStream; //to receive incoming xml
SoapClient: THTTPReqResp; //transport
...
SoapClient:= THTTPReqResp.Create(nil);
  try
          SoapClient.UseUTF8InHeader := True;
          SoapClient.Connect(False);
          SoapClient.URL := ...
          SoapClient.InvokeOptions := [soNoValueForEmptySOAPAction];
          SoapClient.Execute(sXmlMsg, Msg);

          Msg.Position := 0;   //!!!
          sResult := Msg.ReadString(Msg.Size);
...

Open in new window

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Syntax Check Delphi Seattle IOS app without MAC ? 1 97
Run video youtube webbrowse 10 61
LAN or WAN ? 11 90
Wincontrol not (correctly) drawn 15 37
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question