Groups > Borland > Dellphi web services soap > Re: SOAP newbie




SOAP newbie

SOAP newbie
Tue, 18 Mar 2008 19:27:41 -040
Hi everyone, my name is Luc and I've been a delphi programmer for many years 
but I'm really new to this SOAP thing and I'm having a hard time trying to 
find the right tools and information.

Basically, what I need to do is send a SOAP file to a secure URL and get the 
answer file (SOAP) which is going to be sent back automatically somehow.

I have a basic understanding on how to create the SOAP file but I'm totally 
lost when it comes to send this to an URL and read the answer.   I'm using 
Delphi 5 (yeah, I know, long story).   Can someone point me in the right 
direction (on Delphi5 or 2007 as a last resort)?

I've been searching for many weeks now and tried a dozen different 
components, I really need help to solve this matter.   I have no idea which 
component to use and I'm badly in need of a code sample on the internet. 

Post Reply
Re: SOAP newbie
Wed, 19 Mar 2008 13:26:04 -080
Hello,

If the SOAP service you're communicating with is rather simple, you don't
need any fancy logic to serialize objects into XML. It's perfectly fine to
have a predefined string/file that you 'format' before sending. To send the
data I would recommend using either Indy or WinInet. Matter of fact, you
could probably use the SOAP component that handles the posting of XML data
and reads back the response. It's the SOAPHTTPTrans.pas unit and I'll be
happy to email you a copy if you'd like to use it as a starting point. It
might not readily compile under D5 but it should be pretty easy to modify it
to compile there.

If you opt to go with INDY, take a look at the TIDHttp component. It allows
you to POST a stream (see the .Post(...) method).

Cheers,

Bruneau.

Post Reply
Re: SOAP newbie
Thu, 20 Mar 2008 13:04:45 +010
On Wed, 19 Mar 2008 00:27:41 +0100, DelphiGuy <luc.co@sympatico.ca>
wrote:

> I have a basic understanding on how to create the SOAP file but I'm  
> totally
> lost when it comes to send this to an URL and read the answer.   I'm  
> using
> Delphi 5 (yeah, I know, long story).   Can someone point me in the right
> direction (on Delphi5 or 2007 as a last resort)?

Well, if the service is simple, you might just parse the results manually.  
If necessary, just with Pos(). And the sending part can be done with a  
string or whatever, just as Jean-Marie mentioned.

If it gets more complicated, you *might* be happy with D2005 or even more  
recent version of Delphi. We're doing this at work: D5 application and a  
D2005 DLL. Using ShareMem (and borlandmm.dll), you can pass objects  
through this interface quite well. But there are shortcomings in Delphi's  
implementation of WSDL/XSD. So you might still run into troubles.

If it wasn't for Jean-Marie, I would never have come as far as I did.

Post Reply
about | contact