Issues

ZF-7523: The WSDL function dont load the Strategy include files

Issue Type: Bug Created: 2009-08-07T14:09:29.000+0000 Last Updated: 2012-11-20T20:53:26.000+0000 Status: Closed Fix version(s): Reporter: Gabriel Vegas (gvegas) Assignee: None Tags: - Zend_Soap_Server

Related issues: Attachments:

Description

When you set de strategy for complex type detection and handling the Class WSLD use the param $strategy and recive this values True, False or String Value

For True value the function setComplexTypeStrategy does

        require_once "Zend/Soap/Wsdl/Strategy/DefaultComplexType.php";  #Include the Strategy File
        $strategy = new Zend_Soap_Wsdl_Strategy_DefaultComplexType(); #Set the object with the class defined on the Strategy  Include file

For the False value does:

        require_once "Zend/Soap/Wsdl/Strategy/AnyType.php"; #Include the Strategy File
        $strategy = new Zend_Soap_Wsdl_Strategy_AnyType(); #Set the object with the class defined on the Strategy  Include file

But in the String Value case, exists those values :

Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence or Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex

The function try to check if the $strategy class exists, and if this class its not defined, thow an Expection.. thats Ok...

<pre class="highlight">
if(class_exists($strategy)) {
    $strategy = new $strategy();
} else {
    require_once "Zend/Soap/Wsdl/Exception.php";
    throw new Zend_Soap_Wsdl_Exception(
        sprintf("Strategy with name '%s does not exist.", $strategy
    ));
}

but, how its gonna exists the class if you doesn't include the class file like the other boolean cases.

I did a Fix for this including the strategy file class with

//----------- Here -------------- require_once str_replace("_", "/", $strategy) . ".php"; //----------- End Here --------------

<pre class="highlight">
if(class_exists($strategy)) {
    $strategy = new $strategy();
} else {
    require_once "Zend/Soap/Wsdl/Exception.php";
    throw new Zend_Soap_Wsdl_Exception(
        sprintf("Strategy with name '%s does not exist.", $strategy
    ));
}

and now with Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence or Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex cases, the WSLD class load the files "Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php" and "Zend/Soap/Wsdl/Strategy/ArrayOfTypeComplex.php"

Regards

Comments

Posted by Rob Allen (rob) on 2012-11-20T20:53:26.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts