Re: SOAP client connecting to .net webservice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Look at this:

http://www.php.net/manual/pt_BR/function.soap-soapclient-dorequest.php#74123
http://www.php.net/manual/pt_BR/function.soap-soapclient-dorequest.php#57995

regards
Heitor


On 8/27/07, Milo van der Linden <milo@3dsite.nl> wrote:
> Hello list!
>
> I am new to php SOAP and have an urgent question.
>
> I am trying to connect to a webservice that is written in ASP.net.
>
> The request I have to compose needs to be:
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:itw="http://www.itworks.nl/";>
>     <soapenv:Header>
>        <itw:AuthenticationHeader>
>           <itw:Username>milo</itw:Username>
>           <itw:PasswordHash>111</itw:PasswordHash>
>           <itw:Database>?</itw:Database>
>        </itw:AuthenticationHeader>
>     </soapenv:Header>
>     <soapenv:Body>
>        <itw:Hello>
>           <itw:yourName>T. Estuser</itw:yourName>
>        </itw:Hello>
>     </soapenv:Body>
> </soapenv:Envelope>
>
> And up till now I have written the following code, it includes header
> authentication or is supposed to..:
>
> <?php
> error_reporting(E_ALL);
>
> $ini = ini_set("soap.wsdl_cache_enabled","0");
> $client = new
> SoapClient("http://10.0.0.56:81/wssoilution/wsSoilution.asmx?WSDL";,
>    array('location' =>
> 'http://10.0.0.56:81/wssoilution/wsSoilution.asmx', 'uri' => 'itw',
> 'trace' => 1));
>
>
> var_dump($client->__getFunctions());
> var_dump($client->__getTypes());
>
> $x["Username"]="milo";
> $x["PasswordHash"]="111";
> $x["Database"]="?";
>
> $x=new SoapVar($x,SOAP_ENC_OBJECT);
> $y["AuthenticationHeader"]=$x;
> $y=new SoapVar($y,SOAP_ENC_OBJECT);
>
> $header=new SoapHeader("",'AuthenticationHeader',$y);
> $client->__setSoapHeaders(array($header));
>
>
> $params2 = array('yourName'=> 'T.Estuser');
>
> $result2 = $client->Hello($params2);
>
> ?>
>
>
>
> The error I am recieving is: Fatal error SoapHeader:SoapHeader():
> Invalid parameters. Invalid namespace in soaptest.php on line 20
>
> I cannot figure out how to set the namespace parameters!
>
> Any help is appreciated.
>
> Kind regards!
>
> Milo
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux