php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30994 SOAP server unable to handle request with references
Submitted: 2004-12-06 08:00 UTC Modified: 2004-12-14 15:04 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mirek dot novak at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.0.2 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mirek dot novak at gmail dot com
New email:
PHP Version: OS:

 

 [2004-12-06 08:00 UTC] 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".


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-06 09:16 UTC] 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-14 15:04 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 02:01:26 2024 UTC