Talk:Processing Headers in Client Applications
Example using Authentication
This example is for the zip code lookup service at http://codebump.com/zipcode/.
procedure TForm1.Button1Click(Sender: TObject);
var
WS: GeoPlacesSoap; // web service interface; uses placelookup Token: AuthenticationHeader; // soap header
begin
Token := nil; WS := GetGeoPlacesSoap; try Token := AuthenticationHeader.Create; Token.SessionID := 'myregistrationidentifier'; (WS as ISOAPHeaders).Send(Token); WS.GetPlacesWithin('94558', 'CA', 25, City); finally FreeAndNil(Token); end;
end;
For explanations and more detailed source code, see: Bob Swart article #124, Web Services And Security.
http://edn.embarcadero.com/article/41013 - "Delphi SOAP Web Services and Security"
Response
We have incorporated your contributed code example and reference. Many thanks for your interest in the docwiki!
KrisHouser 09:13, 9 April 2012 (PDT)
Lead Writer, RAD Studio
RAD-10721