From:             Michael at Sohmen dot de
Operating system: Linux / PHP
PHP version:      5.2.5
PHP Bug Type:     SOAP related
Bug description:  PHP SOAP - Error when parsing (valid) wsdl file..

Description:
------------
Hi,

when parsing a wsdl file with _duplicate_ functions defined by <operation
name..>, PHP SOAP parser stops with following error message:

"Parsing WSDL: <functionname> already defined"

The Problem is - duplicate functions are used with function overloading -
and o.k. for the Java SOAP interface..

Other way, by automated file generation the following code would produce
duplicate function definitions in wsdl, one with 1, second with 2 Params:

  function foofunction($a, $optional_b = null)


I append a bit of wsdl-code which dousn't work as expected as an example;
in php_sdl.c I found some lines where most probably the error message is
generated, and zend_hash_add(..) fails.

Greetings,
Michael

Reproduce code:
---------------
// wdsl example - Problem:

[snip]

<message name="foofunction">
<part name="a" type="xsd:int"/>
<part name="optional_b" type="xsd:int"/>
</message>

<message name="foofunction">
<part name="a" type="xsd:int"/>
</message>

operation name="foofunction">
<input message="tns:foofunctionRequest"/>
<output message="tns:foofunctionResponse"/>
</operation>

[snip]




// extract from Source php_sdl.c

static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int
include TSRMLS_DC)
{
[snip]
} else if (node_is_equal(trav,"message")) {
        xmlAttrPtr name = get_attribute(trav->properties, "name");
        if (name && name->children && name->children->content) {
                if (zend_hash_add(&ctx->messages, 
(char*)name->children->content,
xmlStrlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) !=
SUCCESS) {
                soap_error1(E_ERROR, "Parsing WSDL: <message> '%s' already 
defined",
name->children->content);
[snip]


Actual result:
--------------
Parsing WSDL: <functionname> already defined

-- 
Edit bug report at http://bugs.php.net/?id=43868&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43868&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43868&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43868&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43868&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43868&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43868&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43868&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43868&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43868&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43868&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43868&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43868&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43868&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43868&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43868&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43868&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43868&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43868&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43868&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43868&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43868&r=mysqlcfg

Reply via email to