Need a working SOAP example using PHP SOAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been searching all day (read wasting) trying to get a working SOAP
example that uses the new PHP SOAP functions.

http://us2.php.net/manual/en/ref.soap.php

I've tried this one from nearly THREE years ago (03/16/2004):
http://devzone.zend.com/node/view/id/689

And this one, which is apparently written in the future (05/01/2007):
http://www.netmag.co.uk/zine/develop/make-your-own-soap

Nothing works. Mostly I get these very unhelpful errors:

Fatal error:  Uncaught SoapFault exception: [HTTP] Could not connect to host
in /home/machine/StockQuote/client3.php:6
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...',
'http://machine....', 'urn:xmethods-de...', 1, 0)
#1 [internal function]: SoapClient->__call('getQuote', Array)
#2 /home/machine/StockQuote/client3.php(6): SoapClient->getQuote('ibm')
#3 {main}
  thrown in /home/machine/StockQuote/client3.php on line 6

Now you might think, "Can you actually get to the host?". And why YES, if I
try to hit the "server1.php" page that is defined in the WDSL file, I get
this error:

SOAP-ENV:ServerBad Request. Can't find HTTP_RAW_POST_DATA

Also, I have soap.wsdl_cache_enabled = 0, yet how come I still see
wsdl-47087234058273450982734508 files in /tmp ?! (yes I've restarted apache)

Does anyone know of a current, WORKING, example, ideally in a .tar file or
something so I don't have to waste a lot more time copy/paste/format/remove
whitespace/etc.?

It's also frustrating that the PHP SOAP function section doesn't have an
example, nor even links to an example. :-\

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux