Re: beginner SOAP help

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

 



Thanks, Knut, these are very helpful hints.

I cannot, however get the classMap option working, I defined the classes and
the map and still get but stdClass objects.

Is there a place with elaborate examples on this or some debugging facility? 
For example I don't know how the classes must be defined: containing their
complex subelements as vars or not.

Thanks, Alex



Knut Urdalen-3 wrote:
> 
> Eric Gorr wrote:
>> 1. For the SOAP functions found at 
>> http://www.php.net/manual/en/ref.soap.php, they all say:
>>
>> (no version information, might be only in CVS)
>>
>> But, I have installed PHP 5.2 (from 
>> http://www.entropy.ch/software/macosx/php/) and they seem to exist.
>> Is this comment in the documentation out of date?
> Yes, the soap extension has been around for quite some time now (as long 
> as PHP 5). It's should run the latest version of PHP 5 when it comes to 
> the soap extension. A lot of bug fixes and improvements has been done to 
> the soap extension over the last years.
>> 2. Is there some sample somewhere showing how to write a simple WSDL 
>> and non-WSBL based client/server interaction using the PHP SOAP 
>> functions above?
> Some references that you may find useful:
> 
> The good old soap extension tutorial: 
> http://devzone.zend.com/node/view/id/689
> Adam Trachtenberg's presentation on the soap extension: 
> http://www.trachtenberg.com/talks/dirtysecretssoap.pdf
> George Schlossnagle's WSDL_Gen: 
> http://www.schlossnagle.org/~george/blog/index.php?/archives/234-WSDL-Generation.html
> 
> If you consume a web service in non-WSDL mode you have to set 'location' 
> and 'uri' in the options. Another feature that is almost never being 
> used in example code is the 'classmap' option. I find it very useful in 
> library code to map my transfer objects to the correct class type 
> instead of just getting stdClass in return. If you consider using 
> classmap, remember that you have do explicitly include all classes that 
> you have in your SOAP API. I.e:
> 
> $client = new SoapClient($wsdl, array('classmap' => 
> array('GenuineProductTO' => 'GenuineProductTO')));
> 
> Then you will get a GenuineProductTO instead of stdClass.
> 
> You may also have a look at my tool (wsdl2php) for generating the soap 
> client from a WSDL-file: http://sourceforge.net/projects/wsdl2php (just 
> released version 0.2.1)
> 
> Have fun! :)
> 
> Regards,
> Knut Urdalen
> 
> -- 
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/beginner-SOAP-help-tf2968557.html#a9611250
Sent from the Php - Soap mailing list archive at Nabble.com.

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux