Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET PHP C#4.0
To be frank I don't know PHP. But the problem I am facing is, I have my web service created in C# and ASP.Net and to check whether my service is platform independent I am trying to consume it in as PHP client.
What I tried is:
class myphpclass extends nusoap_client
	$wsdl = "";
	$string = "";
	$client = new nusoap_client($wsdl,true);
	print "<p> Hello :";
	$var = $client->call('findusername',$string);
	print $var;
Its giving
Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting T_FUNCTION

so plz help.
Posted 8-Feb-12 20:10pm
Edited 9-Feb-12 2:30am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The PHP class name is SoapClient[^], not SOAP_WSDL.
comred at 9-Feb-12 8:20am
Yah.. I wrote soapclient after this. but getting now new error. I am updating my code ..
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Remove the class definition block around your code. You are simply executing a sequence of PHP statements, not defining a new class.
comred at 10-Feb-12 0:08am
ok.. I will try and update here. Thanks a lot.
comred at 10-Feb-12 0:51am
Would you tell me how to give the reference of "wsdl" service in php client.
I searched on net and they are talking about "nusoap library". Is it necessary to go for it? And if yes. then would you give some sample if you have. On Google it is there but all are complicated.
markkuk at 13-Feb-12 7:00am
No, nusoap isn't necessary if your PHP server supports the PHP SOAP extension There's also the PEAR SOAP package. Choose one of the three libraries and stick with it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 9 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100