#30994 [Opn->Asn]: SOAP server unable to handle request with references
| From: | derick@php.net | Date: | Mon, 06 Dec 2004 10:07:00 +0000 |
| Subject: | #30994 [Opn->Asn]: SOAP server unable to handle request with references | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69834@lists.php.net to get a copy of this message | ||
ID: 30994
Updated by: derick@php.net
Reported By: mirek dot novak at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: Linux
PHP Version: 5.0.2
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2004-12-06 09:16:19] danne at dotvoid dot com
References as .NET use (function call parameters outside of the actual
function call) seem not to be handled at all in the ext/soap extension.
So maybe it is not a bug but rather "not implemented". The call below is
an example message sent from .NET with references.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://spock/kunta/kunta"
xmlns:types="http://spock/kunta/kunta/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<q1:bassCall xmlns:q1="http://spock/bass/types/kunta">
<system xsi:type="xsd:string">XXX</system>
<function xsi:type="xsd:string">TASKTEST</function>
<parameter href="#id1" />
</q1:bassCall>
<soapenc:Array id="id1" soapenc:arrayType="tns:Item[1]">
<Item href="#id2" />
</soapenc:Array>
<tns:Item id="id2" xsi:type="tns:Item">
<key xsi:type="xsd:string">ABCabc123</key>
<val xsi:type="xsd:string">123456</val>
</tns:Item>
</soap:Body>
</soap:Envelope>
This above fail because of the following lines in ext/soap/soap.c,
starting at 2764. The code explicitly does not allow references outside
of the function.
func = NULL;
trav = body->children;
while (trav != NULL) {
if (trav->type == XML_ELEMENT_NODE) {
if (func != NULL) {
soap_server_fault("Client", "looks like we got \"Body\" with
several functions call", NULL, NULL, NULL TSRMLS_CC);
}
func = trav;
}
trav = trav->next;
}
Regards,
Danne Lundqvist
------------------------------------------------------------------------
[2004-12-06 08:00:55] mirek dot novak at gmail dot com
Description:
------------
SOAP server unable to handle request with references inside.
-- SOAP request example --
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:anima:partner"
xmlns:types="urn:anima:partner/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:setPoznamka>
<data href="#id1" />
</tns:setPoznamka>
<q1:PoznamkaType id="id1" xsi:type="q1:PoznamkaType"
xmlns:q1="urn:anima:partner:schema">
<kid xsi:type="xsd:string">1310</kid>
<pozn xsi:type="xsd:string">jhgjfhfg</pozn>
</q1:PoznamkaType>
</soap:Body>
</soap:Envelope>
-- end of ex. --
problem is <data href="#id1" /> which is not properly handled. Server
responded with SOAP error and additional message "looks like we got
"Body" with several functions call".
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30994&edit=1