nusoap problem

This is a discussion on nusoap problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; If anyone is familiar with NuSoap - I am trying to make a simple client which GETS a value PhoneNumber and ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-31-2005
Ike
 
Posts: n/a
Default nusoap problem

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|


Reply With Quote
  #2 (permalink)  
Old 06-01-2005
Ike
 
Posts: n/a
Default Re: nusoap problem


"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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:03 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0