Re: Need a working SOAP example using PHP SOAP

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

 



not very helpful, but an apt quote from 'the man':

http://fplanque.net/Blog/devblog/2005/12/21/rasmus_i_don_t_like_soap

Daevid Vincent wrote:
> 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:

a, they are helpful
b, you should catch exceptions
c, could you be having a problem related to the allow_url_fopen ini setting?

> 
> 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)

probably soap uses these tmp files but because soap.wsdl_cache_enabled is Off
the files are being regenerated on each request (check the file mtimes).
alternatively you may think soap.wsdl_cache_enabled is Off but actually its being
turned On somewhere?

> 
> 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. :-\

there is quite a bit of example code in the SOAP section if you ask me:

	http://php.net/manual/en/function.soap-soapclient-construct.php

> 

-- 
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