Solved

2.)Delphi Soap: how to

Posted on 2013-06-10
3
438 Views
Last Modified: 2016-02-10
Hello,

In the question http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_28137065.html I got the answer how to build a Soap request so I could call with it the following soap function:
public XmlDocument setProduct (array auth, array params);
Here I generated the Xml document in sXmlMsg TStringStream and I used SoapClient.Execute(sXmlMsg, Msg);    //the  SoapClient here is THTTPReqResp object

Now I need to call public XmlDocument setProductXML (array auth, XmlDocument XML);

The problem here is that there are two parameters (and the second is a separate Xml document). How can I build and send it with one SoapClient.Execute call?

Thank you
0
Comment
Question by:starhu
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 39234822
Generating xmldocument is easy. look here:
http://stackoverflow.com/questions/8354658/how-to-create-xml-file-in-delphi
https://forums.embarcadero.com/thread.jspa?threadID=81646
http://docwiki.embarcadero.com/CodeSamples/en/TXMLDocument_use_case_%28Delphi%29

var
   XMLDoc: IXMLDocument;
.
.
   XMLDoc := TXMLDocument.Create(nil);
   XMLDoc.Active := True;
// create nodes here
  ...
//pass to ...
setProductXML (auth, XMLDoc);
...
//add soap envelope to xml and send
xml_txt := XMLDoc.XML.Text;
...
//send
...

Open in new window

0
 

Author Comment

by:starhu
ID: 39344860
I will check it. Sorry for the late reply I was on holiday
0
 

Author Comment

by:starhu
ID: 39351339
Hello,

It is not clear to me how to send the xml file.

Let's say I have this

   XMLDoc := TXMLDocument.Create(nil);
   XMLDoc.Active := True;
   XMLDoc.LoadFromFile('setProductXMLRequest.xml');

Open in new window


Then how can I send the Xml to the server which waits for such a request:
public XmlDocument setProductXML (array auth, XmlDocument XML);

The setProductXML is not a Delphi procedure but a server side procedure.

Previusly (when I used *only* Xml message) I used SoapClient.Execute(sXmlMsg, Msg); where the sXmlMsg was the Xml message (as TStringStream).

But now I need to send not one but two parameteres:
- array auth (authentication array)
- and the Xml itself

The SoapClient.Execute has only one input parameter, how can I send two?

procedure Execute(const Request: TStream; Response: TStream);

Thank you!
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 60
find a node in VST 2 68
Working with hours 3 58
Dev Express grid collapse 2 45
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

777 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