Page 1 of 1

SoapClient not found compile error

PostPosted: February 17th, 2014, 7:23 pm
by iismanager
Hey guys,

Just installed Phalanger 3.0 on IIS 7.5 Windows 2008R2 servers. I got my first PHP "hello world" page working so I got crazy and tried some other php functions, however when I try to instantiate a soapclient, i get an error.

Error: Class 'SoapClient' not found in .....

How do I import or verify the extension are loaded?

Thanks

Re: SoapClient not found compile error

PostPosted: February 18th, 2014, 10:43 am
by Jakub Misek
Hi,

Add following into your web.config

<add assembly="PhpNetSoap, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="soap" />

into section <phpNet><classLibrary> ...

Thanks,

Re: SoapClient not found compile error

PostPosted: February 19th, 2014, 5:02 pm
by iismanager
Thanks for the note, I was able to get that error resolved. My next issue comes when trying to call a webservice. This works fine under stadard PHP, but will not compile without "notices" under Phalanger. What can be done to get this working? I can send you the real $endpoint in a private email if you need it.

Code: Select all
<?php
$endpoint = "mywebservice.asmx";
$client_options = array();
$client_options["trace"] = 0;
$client_options["cache_wsdl"] = 0;
$client_options["exceptions"] = 0;
$client = new SoapClient($endpoint, $client_options);
$result = $client->GetCountryList();
$xml = $result->GetCountryListResult->any;
print_r( $xml );
?>


When I try to run the code under phalanger, I get the following notices:
Notice: An empty variable used as an object in c:\websites\phptest\index.php on line 9, column 1.

Notice: An empty variable used as an object in c:\websites\phptest\index.php on line 9, column 1.