Re: [SOAP] Object to String conversion issue
| From: | Al Baker | Date: | Wed, 07 Apr 2004 19:01:24 +0000 |
| Subject: | Re: [SOAP] Object to String conversion issue | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1483@lists.php.net to get a copy of this message | ||
Yes, it uses the stdObject to collect all return parameters. So,
$ans->StringName will be what you want to print.
You can use print_r($ans) to see what exactly the structure looks like.
Al
On Wed, 2004-04-07 at 14:26 -0400, Galbreath, Mark A wrote:
> Alls,
>
> I am attempting a simple tutorial for PEAR SOAP in which a simple web
> service is created and accessed from the command line client:
>
> $endpoint =
> 'http://10.12.12.138/webservices/sales.php';
> $customer = new SOAP_Client( $endpoint );
> $method = 'onsale';
> $int1 = ( integer ) $argv[ 0 ];
> $int2 = ( integer ) $argv[ 1 ];
> $params = array( 'lowprice' => $int1, 'highprice' => $int2 );
> $ans = $customer -> call( $method, $params );
>
> printf( $ans );
>
>
>
> When "10 100" are submitted as the argv[] array, what gets printed to the
> console is:
>
> Object
>
> when my service class method only returns strings. Somebody please clue me?
>
> tia,
> Mark
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>