[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

2.)Delphi Soap: how to

Posted on 2013-06-10
3
Medium Priority
?
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
Sinisa Vuk earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

649 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