Recursion issue with Zend_Soap_AutoDiscovery.
Recursion issue with Zend_Soap_AutoDiscovery.
am 25.01.2010 17:49:11 von Richard Quadling
Hi.
I'm in the process of building a web service which incorporates the
ability for the server to inform the client that a particular call has
been superseded by another.
So, cut down (I've removed all the other details), ...
class ServiceDetails
{
/**
* Superseded by
*
* Details of the replacement service that is now available.
*
* @var ServiceDetails
*/
public $SupersededBy = Null;
}
When I try to use Zend_Soap_AutoDiscover() against this class, I get ...
"Infinite recursion, cannot nest 'ServiceDetails' into itsself." (sic)
There has to be recursion, as there could be many levels of
supersedence, each one providing the details of their own replacement.
The call to return the service details read the requested
services/class constants. If there is a superseded entry, it creates a
new request for service details on the new class (the recursion).
If the value is Null, then there is no recursion.
I'm using ...
new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeC omplex');
as the strategy as the service has arrays of complex types in the output.
If I use @var string and then manually replace the type in the WSDL
file from ...
to
and use wsdl2php against this, it all _SEEMS_ to work OK.
So. Is this my best option? Or is there a way to do this that I'm missing?
Any ideas really.
Is this even a bug in the Zend_Soap_AutoDiscover class?
Regards,
Richard Quadling.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Re: Recursion issue with Zend_Soap_AutoDiscovery.
am 25.01.2010 20:02:56 von Nathan Rixham
Richard Quadling wrote:
> Hi.
>
> I'm in the process of building a web service which incorporates the
> ability for the server to inform the client that a particular call has
> been superseded by another.
>
> So, cut down (I've removed all the other details), ...
>
> class ServiceDetails
> {
> /**
> * Superseded by
> *
> * Details of the replacement service that is now available.
> *
> * @var ServiceDetails
> */
> public $SupersededBy = Null;
> }
>
> When I try to use Zend_Soap_AutoDiscover() against this class, I get ...
>
> "Infinite recursion, cannot nest 'ServiceDetails' into itsself." (sic)
>
> There has to be recursion, as there could be many levels of
> supersedence, each one providing the details of their own replacement.
>
> The call to return the service details read the requested
> services/class constants. If there is a superseded entry, it creates a
> new request for service details on the new class (the recursion).
>
> If the value is Null, then there is no recursion.
>
>
>
> I'm using ...
>
> new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeC omplex');
>
> as the strategy as the service has arrays of complex types in the output.
>
>
>
> If I use @var string and then manually replace the type in the WSDL
> file from ...
>
>
>
> to
>
>
>
> and use wsdl2php against this, it all _SEEMS_ to work OK.
>
> So. Is this my best option? Or is there a way to do this that I'm missing?
>
>
> Any ideas really.
>
http://wso2.org/projects/wsf/php ;)
helpful eh
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Recursion issue with Zend_Soap_AutoDiscovery.
am 26.01.2010 11:31:38 von Richard Quadling
2010/1/25 Nathan Rixham :
> Richard Quadling wrote:
>> Hi.
>>
>> I'm in the process of building a web service which incorporates the
>> ability for the server to inform the client that a particular call has
>> been superseded by another.
>>
>> So, cut down (I've removed all the other details), ...
>>
>> class ServiceDetails
>> Â Â Â {
>> Â Â Â /**
>> Â Â Â Â * Superseded by
>> Â Â Â Â *
>> Â Â Â Â * Details of the replacement service that is =
now available.
>> Â Â Â Â *
>> Â Â Â Â * @var ServiceDetails
>> Â Â Â Â */
>> Â Â Â public $SupersededBy =3D Null;
>> Â Â Â }
>>
>> When I try to use Zend_Soap_AutoDiscover() against this class, I get ...
>>
>> "Infinite recursion, cannot nest 'ServiceDetails' into itsself." (sic)
>>
>> There has to be recursion, as there could be many levels of
>> supersedence, each one providing the details of their own replacement.
>>
>> The call to return the service details read the requested
>> services/class constants. If there is a superseded entry, it creates a
>> new request for service details on the new class (the recursion).
>>
>> If the value is Null, then there is no recursion.
>>
>>
>>
>> I'm using ...
>>
>> new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeC omplex')=
;
>>
>> as the strategy as the service has arrays of complex types in the output=
..
>>
>>
>>
>> If I use @var string and then manually replace the type in the WSDL
>> file from ...
>>
>> Â Â Â Â Â
pe=3D"xsd:string" />
>>
>> to
>>
>> Â Â Â Â Â
pe=3D"tns:ServiceDetails" />
>>
>> and use wsdl2php against this, it all _SEEMS_ to work OK.
>>
>> So. Is this my best option? Or is there a way to do this that I'm missin=
g?
>>
>>
>> Any ideas really.
>>
>
> http://wso2.org/projects/wsf/php ;)
>
> helpful eh
>
Not yet! I'm on windows and I'm not confident enough to put extensions
I've built out on the live servers.
Also, it is using VC8 and I'm on 5.3 (VC9, x86, nts). So not tested.
--=20
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D213474=
731
ZOPA : http://uk.zopa.com/member/RQuadling
Re: Recursion issue with Zend_Soap_AutoDiscovery.
am 27.01.2010 11:03:27 von Richard Quadling
2010/1/25 Richard Quadling :
> Hi.
>
> I'm in the process of building a web service which incorporates the
> ability for the server to inform the client that a particular call has
> been superseded by another.
>
> So, cut down (I've removed all the other details), ...
>
> class ServiceDetails
> Â Â Â Â {
> Â Â Â Â /**
> Â Â Â Â * Superseded by
> Â Â Â Â *
> Â Â Â Â * Details of the replacement service that is =
now available.
> Â Â Â Â *
> Â Â Â Â * @var ServiceDetails
> Â Â Â Â */
> Â Â Â Â public $SupersededBy =3D Null;
> Â Â Â Â }
>
> When I try to use Zend_Soap_AutoDiscover() against this class, I get ...
>
> "Infinite recursion, cannot nest 'ServiceDetails' into itsself." (sic)
>
> There has to be recursion, as there could be many levels of
> supersedence, each one providing the details of their own replacement.
>
> The call to return the service details read the requested
> services/class constants. If there is a superseded entry, it creates a
> new request for service details on the new class (the recursion).
>
> If the value is Null, then there is no recursion.
>
>
>
> I'm using ...
>
> new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeC omplex');
>
> as the strategy as the service has arrays of complex types in the output.
>
>
>
> If I use @var string and then manually replace the type in the WSDL
> file from ...
>
> Â Â Â Â Â
=3D"xsd:string" />
>
> to
>
> Â Â Â Â Â
=3D"tns:ServiceDetails" />
>
> and use wsdl2php against this, it all _SEEMS_ to work OK.
>
> So. Is this my best option? Or is there a way to do this that I'm missing=
?
>
>
> Any ideas really.
>
>
> Is this even a bug in the Zend_Soap_AutoDiscover class?
>
>
>
> Regards,
>
> Richard Quadling.
>
>
>
>
> --
> -----
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D2134=
74731
> ZOPA : http://uk.zopa.com/member/RQuadling
>
I amended Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex::addComplexType() .
Changing the (sic) ...
throw new Zend_Soap_Wsdl_Exception("Infinite recursion, cannot nest
'".$type."' into itsself.");
to ...
return "tns:$type";
and all is working just fine.
Obviously, I may be breaking something here, but I've not come across
it yet. Early days .... !
--=20
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D213474=
731
ZOPA : http://uk.zopa.com/member/RQuadling