logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Basic Authentication (done w/out nusoap): msg#00069

Subject: Re: Basic Authentication (done w/out nusoap)
Hi,

I have managed to login with basic Auth using php soap
ext "php_soap.dll" and the built-in soap functions:
################
$login = array ('login' => $pdov_auth_user, 'password'
=> $pdov_auth_pass);
$client = new soapclient($wsdl,$login);
################
But I still prefer nuSOAP functions which are far
better for variable handling. 
If you can still provide for some help, i'd
apreciatte.

Thanks,
Fred


--- fred lixo <radiolixo@xxxxxxxxx> wrote:

> Indeed that was a basic test I didn't do. Anyway,
> the
> access method
>
"http://user:pass@xxxxxxxxxxxxxx/HelloWorldBA.asmx?WSDL";
> results in "The page cannot be displayed". 
> 
> I've spoke with the ws manager and he says I should
> probably use HTTP headers for basic encryption. (He
> is
> not sure aswell). Although they are working with
> .NET
> he has confirmed that basic auth is ON. NTLM auth is
> being used in a completely diferent script.
> 
> I have no clue on what php header() arguments I must
> use to send username and password. I've check
> HTTP1.1
> specs and nothing..
> 
> Anyway shouldn't the ..
>
$client->setCredentials($auth_user,$auth_pass,'basic');
> .. be doing the job in some way? The way I see it
> the
> credentials should be sent before the client request
> but it seems soap doesn't work like that.
> Authentication before using the WS.. that makes
> sense.
> 
> Thanks,
> Fred
> 
> --- Scott Nichol <snicholnews@xxxxxxxxxxxxxxx>
> wrote:
> 
> > To be sure I have this straight...
> > 
> > When you point your browser at 
> > http://somedomain.org/HelloWorldBA.asmx?WSDL, it
> > prompts you for a 
> > username and password, and you see the WSDL.  When
> > you use 
> >
>
http://$auth_user:$auth_pass@xxxxxxxxxxxxxx/HelloWorldBA.asmx?WSDL
> > with 
> > that username and password from PHP, it fails.
> > 
> > If you point your browser to 
> >
>
http://user:pass@xxxxxxxxxxxxxx/HelloWorldBA.asmx?WSDL,
> > do you see the 
> > WSDL without being prompted?  Make sure the
> > user/pass is not cached by 
> > restarting your browser first.
> > 
> > Are you sure the site uses basic authentication? 
> > Since it is 
> > implemented on .NET, NTLM authentication may be
> what
> > it is actually 
> > using.
> > 
> > Scott Nichol
> > 
> > ----- Original Message ----- 
> > From: "fred lixo" <radiolixo@xxxxxxxxx>
> > To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
> > Sent: Thursday, March 29, 2007 12:36 PM
> > Subject: [Nusoap-general] Basic Authentication
> > 
> > 
> > > Hello,
> > >
> > > I was not sure if I should post this message in
> a
> > php
> > > forum rather than here but hope some of you can
> > help
> > > allthesame.
> > >
> > > I looked for Basic Authentication code snippets
> > and
> > > nusoap docs and I'm trying to consume a WS like
> > below.
> > > If I access the wsdl link directly I get
> prompted
> > for
> > > user and pass and I can view the contents. Using
> > the
> > > script I'm getting the error at msg bottom. I
> > can't
> > > figure out what is wrong. Help?
> > >
> > > Finally but not least, thank you Scott for the
> iwa
> > > subject answer.
> > >
> > > Best Regards,
> > > Fred
> > >
> > > ------------------
> > > #### PHP Code ####
> > > ------------------
> > > <?php
> > > require_once("nusoap/nusoap.php");
> > > $auth_user = "some_user";
> > > $auth_pass = "some_pass";
> > >
> > > // also tried
> > > //
> > >
> >
>
$wsdl="http://$auth_user:$auth_pass@xxxxxxxxxxxxxx/HelloWorldBA.asmx?WSDL";;
> > > // but does not work
> > >
> >
>
$wsdl="http://somedomain.org/HelloWorldBA.asmx?WSDL";;
> > >
> > > $client = new soapclient($wsdl,'wsdl');
> > > print $client->getError();
> > >
> >
>
$client->setCredentials($auth_user,$auth_pass,'basic');
> > > $proxy  = $client->getProxy();
> > > ?>
> > >
> > > ------------------------
> > > #### ERROR MESSAGES ####
> > > ------------------------
> > > wsdl error: HTTP ERROR: HTTP authentication
> failed
> > >
> > > Parse error: syntax error, unexpected T_STRING
> in
> > > D:\files\nusoap\nusoap.php(6983) : eval()'d code
> > on
> > > line 1
> > >
> > > Fatal error: Class 'soap_proxy_14521' not found
> in
> > > D:\files\nusoap\nusoap.php(6985) : eval()'d code
> > on
> > > line 1
> > >
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > The fish are biting.
> > > Get more visitors on your site using Yahoo!
> Search
> > Marketing.
> > >
> >
>
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> > >
> > >
> >
>
-------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of
> > IT
> > > Join SourceForge.net's Techsay panel and you'll
> > get the chance to 
> > > share your
> > > opinions on IT & business topics through brief
> > surveys-and earn cash
> > >
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Nusoap-general mailing list
> > > Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/nusoap-general
> > > 
> > 
> > 
> >
>
-------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of
> IT
> > Join SourceForge.net's Techsay panel and you'll
> get
> > the chance to share your
> > opinions on IT & business topics through brief
> > surveys-and earn cash
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Nusoap-general mailing list
> > Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
> >
>
https://lists.sourceforge.net/lists/listinfo/nusoap-general
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> 
=== message truncated ===



 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>