PHP5 / SOAP ext / proxy

liunx

Guest
Hi,

I've been fiddling around with PHP5's SOAP extension for some time now but I don't seem to be able to get it to work.

I'm behind a proxy.

The way I read the manual for SoapClient() this here would be an appropriate instanciation:

$client = new SoapClient('http://webservices.amazon.com/AWSECommerceService/US/AWSECommerceService.wsdl',
array('proxy_host' => 'proxy.myhost.com',
'proxy_port' => 3128,
)
);


but all I get back is

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://webservices.amazon.com/AWSECommerceService/US/AWSECommerceService.wsdl' in d:\Apache\htdocs\soap\aws4.php:12 Stack trace: #0 {main} thrown in...

Unfortunatelly I'm unable to go around this proxy. Other applications written by me and others can utilize the proxy without problem.

Any ideas?

Thanks,
Sal-

P.S.: Working on PHP5.0.2 Windows and LinuxForget about SOAP and refer to XMLRPC instead which is far more stable and more mature; not saying SOAP support with PHP5 is bad, I'm just saying you'll have an easier time using web services with XMLRPC instead ;)

Out of interest, are you using PEARs SOAP?Oh great now I'm digging into XMLRPC as well... *sigh*.

Yeah, I tried PEAR SOAP but it won't even instanciate on PHP 5.0.2. There's already an open bug in the PEAR bugtracker for that. So basically PEAR SOAP is unusable in PHP 5 as of now.

NuSOAP will return a "can not re-instanciate" Error when the built-in SOAP extension is available (because NuSOAP classes are named SoapClient(), ... as well). Without built-in SOAP nuSOAP will work but it still has problems with complex types (which is why I tried built-in SOAP in the first place).

Built-in SOAP does not seem to work with proxies as of now.

It never gets boring... :queasy:

So, on to new adventures: WSDL via XMLRPC!

Oh, if anyone has clues for me regarding built-in SOAP: Don't stop posting :)

Cheers,
Sal-To spread the word: PHP5's SOAP Extension indeed has a known Bug (<!-- m --><a class="postlink" href="http://bugs.php.net/bug.php?id=29211&edit=1">http://bugs.php.net/bug.php?id=29211&edit=1</a><!-- m -->) regarding the access to WSDLs behind a proxy.

It is already assigned, so I expect it to be fixed in the not-to-distant future.

Sal-
 
Back
Top