|
Posted by Ike on 06/01/05 14:02
"Ike" <rxv@hotmail.com> wrote in message
news:600ne.128$W77.1@newsread3.news.pas.earthlink.net...
> If anyone is familiar with NuSoap - I am trying to make a simple client
> which GETS a value PhoneNumber and attempts to make the soapclient call.
> However, NuSoap keeps telling me I am not sending it parameters when in
fact
> I am echoing out my $msg array before the call, showing me that I am, in
> fact, sending it the parameter necessary. Please help if you can -Ike
>
> $key='PhoneNumber';
> $msg=array();
> $msg[$key] = $_GET[$key];
>
> $soapclient = new soapclient((String)$endpt_, true);
> echo ($msg['PhoneNumber']."<br>"); //this prints out the valur that was
> GETted to this page
> if (!$soapclient->fault) {
> $result = $soapclient->call((String)$func_, $msg);
> if ($soapclient->fault) {
> printf("Desc = %s\n", $result["Error"]["Desc"]);
> ?><br /><?php
> printf("Number = %s\n", $result["Error"]["Number"]); }
> ...here is where I end up with output:
> Desc=Input can not be less than zero length|Number=1|
>
>
Answering my own Q here in case anyone encounters same problem in future:
The line :
$result = $soapclient->call((String)$func_, $msg);
must be altered as $msg needs to be an Array of Arrays, thus, it works with:
$result = $soapclient->call((String)$func_, array($msg));
-Ike
Navigation:
[Reply to this message]
|