Webservice returns Object ID and not the value

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vipintvs
Forum Newbie
Posts: 1
Joined: Mon Nov 20, 2006 12:16 am

Webservice returns Object ID and not the value

Post by vipintvs »

Hi Techies

I have written client side script for consuming the .Net webservice. (In .net it is just a HelloWorld webmethod and it is working properly.)

Where as when i try to consume the webservice from php client script, it is not returning the exact value("HelloWord"). Instead of, it returns only "Object id #3"

Even i tried casting also by adding (string) infront of that.


The below is the coding snippet i have
-------------------------------------------------

Code: Select all

<?php

require_once('../lib/nusoap.php');
$wsdl="http://domainname/service.asmx?wsdl";
$client = new SoapClient($wsdl);
echo $client->HelloWorld();
?>
Return value
----------------

Object id #3 //Expected output "HelloWord"

Can anyone post quick solution?
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

Maybe that method returns object. What is the output on your local machine. Class code sample for that method will help to provide more information.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

try

Code: Select all

var_dump( $client->HelloWorld() );
Post Reply