Hello everyone,

After some diy, here is the code.

var
  varHTTPRIO: THTTPRIO;
begin
  varHTTPRIO := THTTPRIO.Create(nil);
  varHTTPRIO.HTTPWebNode.UserName := 'xxx';
  varHTTPRIO.HTTPWebNode.Password := 'xxx';

  try
    GetOrderWS(False, 'http://' + TEST_WEB_SERVICE_SERVER + '/' +
TEST_WEB_SERVICE_APPLICATION + '/' + TEST_WEB_SERVICE_URL,
varHTTPRIO).createOrder('');
  except
    on E: ERemotableException do
    begin
    end;
  end;
end;

Regards
Leigh

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Leigh Wanstead
Sent: Wednesday, 14 September 2005 1:48 p.m.
To: Rohit Gupta; [email protected]
Subject: RE: [DUG] web service


Hi Rohit,

Is it possible to do following code like .net but in Delphi?

        NetworkCredential cred = new NetworkCredential(aUserName, aPassword);
      webService.Credentials = cred;

TIA

Regards
Leigh





-----Original Message-----
From: Rohit Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 14 September 2005 1:31 p.m.
To: [EMAIL PROTECTED]; NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] web service


When you design the webservice end, you build in the username and
password to each function as its a stateless beast.  So your call will
be hello (username, password,arguments).  And you handle the username
and password yourself.

If you are talking about the initial access to the webservice, that is
controlled by the IIS (etc) running on that server.  That is, its a
windows access issue.  Either you use Certificates to control access or
you open selected ports fully or you have windows login.

Leigh Wanstead wrote:

>Hello everyone,
>
>I use THTTPRIO and here is the test code.
>
>var
>  varHTTPRIO: THTTPRIO;
>begin
>  varHTTPRIO := THTTPRIO.Create(nil);
>  try
>    varHTTPRIO.URL := 'http://localhost/Service';
>    (varHTTPRIO as ServiceWS).hello('');
>  finally
>    FreeAndNil(varHTTPRIO);
>  end;
>end;
>
>May I ask how to supply user name and password without bring Windows login
>dialog?
>
>TIA
>
>Regards
>Leigh
>
>
>_______________________________________________
>Delphi mailing list
>[email protected]
>http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>


_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to