famnaumann / php-wsdl-creator

Automatically exported from code.google.com/p/php-wsdl-creator
GNU General Public License v3.0
0 stars 0 forks source link

Return of a ComplexType doesn't work without PhpWsdl caching #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add a method that returns a ComplexTypeDemo object in class.soapdemo.php
2. disable PhpWsdl caching with the PhpWsdl::CreateInstance third parameter set 
to null (i.e, in demo3.php)
3. call this method with a test script, dump result and xml response

What is the expected output? What do you see instead?

The complextype should be returned in the soap message (so that the soap client 
create the right object)
The returned type is SOAP-ENC:Struct instead of the complextype, then the 
returned object is stdClass in php

What version of the product are you using? On what operating system?

php-wsdl-2.3 ; php 5.3.3

Please provide any additional information below.

Same problem with RunQuickMode() because it doesn't use PhpWsdl cache i guess

Original issue reported on code.google.com by g.pole...@planet-cards.com on 23 Jan 2013 at 3:38

GoogleCodeExporter commented 9 years ago
This seems to be related to where the cache folder is created. If I put the 
WSDL cache files in the same directory as my scripts, it works fine. If I put 
them in the cache/ folder below that, it doesn't work. The WSDL cache file is 
created either way, and is identical, but I get the error if the file is under 
the cache/ folder.

Original comment by johntheb...@gmail.com on 11 Apr 2013 at 1:49

GoogleCodeExporter commented 9 years ago
Interesting... It seems as if the cache path must be specified with either '.' 
or '/' as a first character, otherwise PhpWsdl tries to prepend the cache path 
twice when it creates cache files and craps out with a PHP Warning. Curious 
should read through PhpWsdl->WriteWsdlToCache(), line ~2074 (in php-wsdl-2.3). 
Workaround: specify './cache' instead of 'cache' as cache dir in the 
PhpWsdl::CreateInstance();

Original comment by mczyzew...@gmail.com on 17 Jun 2013 at 11:53