ZF-10755: Error in Zend_Soap_Wsdl, namespace returned by getType for type object is invalid
Description
Fix return type for struct:
/**
* Returns an XSD Type for the given PHP type
*
* @param string $type PHP Type to get the XSD type for
* @return string
*/
public function getType($type)
{
switch (strtolower($type)) {
case 'string':
case 'str':
return 'xsd:string';
break;
case 'int':
case 'integer':
return 'xsd:int';
break;
case 'float':
case 'double':
return 'xsd:float';
break;
case 'boolean':
case 'bool':
return 'xsd:boolean';
break;
case 'array':
return 'soap-enc:Array';
break;
case 'object':
return 'soap-enc:Struct';
break;
case 'mixed':
return 'xsd:anyType';
break;
case 'void':
return '';
default:
// delegate retrieval of complex type to current strategy
return $this->addComplexType($type);
}
}
Existing code:
/**
* Returns an XSD Type for the given PHP type
*
* @param string $type PHP Type to get the XSD type for
* @return string
*/
public function getType($type)
{
switch (strtolower($type)) {
case 'string':
case 'str':
return 'xsd:string';
break;
case 'int':
case 'integer':
return 'xsd:int';
break;
case 'float':
case 'double':
return 'xsd:float';
break;
case 'boolean':
case 'bool':
return 'xsd:boolean';
break;
case 'array':
return 'soap-enc:Array';
break;
case 'object':
return 'xsd:struct';
break;
case 'mixed':
return 'xsd:anyType';
break;
case 'void':
return '';
default:
// delegate retrieval of complex type to current strategy
return $this->addComplexType($type);
}
}
Comments
Posted by Jeannie BOFFEL (jboffel) on 2011-05-04T21:23:51.000+0000
updated test suite to handle this bug!
Posted by Jeannie BOFFEL (jboffel) on 2011-05-04T21:26:07.000+0000
Here the patched file!
Posted by Jeannie BOFFEL (jboffel) on 2011-05-04T21:27:55.000+0000
Patch for test suite instead of the full file...
Posted by Ralph Schindler (ralph) on 2011-05-05T20:07:18.000+0000
See ZF-10754 for patch that includes both fixes.
Posted by Jeannie BOFFEL (jboffel) on 2011-05-06T08:35:41.000+0000
Finally I was able to copy the error from SOAP UI. So I don't put a screenshoot, it won't say more than this... It's happening at loading WSDL in the software :