Anyone using SOAP 0.9.2?
| From: | Andrew Muhtar | Date: | Thu, 19 Jan 2006 09:41:48 +0000 |
| Subject: | Anyone using SOAP 0.9.2? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22599@lists.php.net to get a copy of this message | ||
Hi everyone,
I have been trying to do a very simple test of consuming a web service with
PHP. I have tried making a PHP client for a .Net Web Service and using
other services from some 3rd parties. I keep getting the following errors
(same errors but different class names):
*Parse error: parse error, unexpected '=' in c:\php\pear\soap\wsdl.php(727)
: eval()'d code on line 9*
*Fatal error: Class 'WebService_Service1_Service1Soap' not found in WSDL.php
(729).*
Is anyone else having trouble? I know that PEAR and SOAP were recently
upgraded. I have SOAP 0.9.2, Pear 1.4.6 and all dependencies. I am also
running PHP 5.1.1.1 on a WIN XP Pro machine. I have been trying to get this
working for a while now - so I might be getting blind to the solution.
*My Debugging:* The service is running, I can do a generateProxyCode() and
get back my WSDL definitions and stuff. It seems that getProxy() or eval()
of the generateProxyCode() code give me the errors (I've tried both and get
the same eval()'d errors). My home made service is a .Net Service
(I'm making a PHP equivalent as we speak). I also tried interfacing with "
http://www.xmethods.net/sd/2001/BabelFishService.wsdl"
using the example
from some other PEAR::SOAP tutorials. Get the same errors.
Any help is greatly appreciated. If anyone has this working, at least I'll
know it's not a bug and I'll have a better clue where to look for the
problem.
Thanks for the help.
Andrew
My code follows:
<?php
require_once('SOAP/Client.php');
$wsdl =new SOAP_WSDL('http://localhost/WebService/WebService1.asmx?wsdl');
// Create an object directly from the proxy code
$service =$wsdl->getProxy();
$result =$service->HelloWorld();
echo ( $result );
?>