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

x
?
Solved

Delphi Soap: how to

Posted on 2013-05-23
1
Medium Priority
?
980 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
[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
1 Comment
 
LVL 27

Accepted Solution

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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

688 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