Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2008, 01:39 PM
jtaylor jtaylor is offline
Member
 
Join Date: Mar 2005
Posts: 76
Default delphi 7 call web service with userid/passward

hi,

I have never called a web service before. Does anyone know of a good example of calling a web service and performing authenticating on a userid/password. I am using delphi 7.

thanks
Reply With Quote
  #2  
Old 04-23-2008, 12:49 AM
mshkolnik mshkolnik is offline
Senior Member
 
Join Date: Jul 2001
Posts: 4,195
Default RE: delphi 7 call web service with userid/passward

Check this topic:
http://delphi.newswhat.com/geoxml/fo...ps.borland.com

With best regards, Mike Shkolnik
http://www.scalabium.com
Reply With Quote
  #3  
Old 04-23-2008, 02:27 AM
jtaylor jtaylor is offline
Member
 
Join Date: Mar 2005
Posts: 76
Default RE: delphi 7 call web service with userid/passward

I tried to download the examples but you have to have a member of the magazine.

Do you know of an example anywhere that uses TSOAPHEADER.

thanks
Reply With Quote
  #4  
Old 04-23-2008, 03:15 AM
mshkolnik mshkolnik is offline
Senior Member
 
Join Date: Jul 2001
Posts: 4,195
Default RE: delphi 7 call web service with userid/passward

http://www.agnisoft.com/white_papers...ws/default.asp

With best regards, Mike Shkolnik
http://www.scalabium.com
Reply With Quote
  #5  
Old 04-23-2008, 03:17 PM
jtaylor jtaylor is offline
Member
 
Join Date: Mar 2005
Posts: 76
Default RE: delphi 7 call web service with userid/passward

I think I have the jest of it but I have a question about
when I call the send in the ISoapHeader. The send adds a header (i am assuming the ISoapheader) to the dtobj.

so when I call a function in the dtObj the header will go with it. Correct?

It looks

( dtObj as ISoapHeaders ).Send( connection );


test code
var

connection : WSAuthenticate2; // TSOAPHEADER IN WSDL

dtObj : DataTimetableToolKitServicesSoap; // Interface in WSDL

stations_xml: widestring;
Headers: ISOAPHeaders;
begin

connection := WSAuthenticate2.create;
try

connection.Password := 'password';

dtObj := GetDataTimetableToolKitServicesSoap(true);

( dtObj as ISoapHeaders ).Send( connection );

stations_xml := dtObj.GetStationList('test');

except

on E: Exception do showmessage(E.Message + ' ' + inttostr(E.HelpContext));

end;
Reply With Quote
  #6  
Old 04-24-2008, 05:49 AM
jtaylor jtaylor is offline
Member
 
Join Date: Mar 2005
Posts: 76
Default RE: delphi 7 call web service with userid/passward

I must be doing something wrong.

Do you use soap headers to do authentication to a web services? Or is there another way.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 08:46 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.