php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47119 SOAP-ERROR: Parsing WSDL
Submitted: 2009-01-15 22:23 UTC Modified: 2009-05-03 01:00 UTC
Votes:15
Avg. Score:4.7 ± 0.6
Reproduced:14 of 14 (100.0%)
Same Version:8 (57.1%)
Same OS:2 (14.3%)
From: simon at connexon dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.8 OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-01-15 22:23 UTC] simon at connexon dot com
Description:
------------
A bug was already opened on this but has been set to "No feedback" and the person who opened the bug doesn't seem to be wanting to reopen it.

This bug addresses a problem in the XML parser part of the soapclient and soapserver constructors. I've been using this for a few years now and it's always been working fine, but this time I was using a pre-made .wsdl with a ton of .xsd files for a project and the soap was always returning me this precise error "Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
Schema: unresolved element 'ref' attribute."

This needs to be fixed.

package can be downloaded at http://www.nena.org/xml_schemas/NENAFiles/CurrentNENA/CurrentNENA.zip

The crash occurs somewhere in this part: (if i remove this from the .xsd file then it works fine + the original file doesn't display any errors in a normal XML application)

<xsd:complexType name="targetProviderType">
		<xsd:annotation>
			<xsd:documentation>A provider of either service or information.  The target provider  type only specifies that a provider be identified by host address or NENA identifier.  This type should be used by requesting hosts when identifying the target host for the request.  This type is used to identify the VPC in the ESR request and the ESCT messages where the full details for the VPC are not known. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:restriction base="xsd:anyType">
				<xsd:sequence>
					<xsd:element ref="organizationName" minOccurs="0"/>
					<xsd:choice>
						<xsd:sequence>
							<xsd:element name="hostname" type="hostNameType"/>
							<xsd:element ref="nenaId" minOccurs="0"/>
						</xsd:sequence>
						<xsd:element ref="nenaId"/>
					</xsd:choice>
					<xsd:element ref="contact" minOccurs="0"/>
					<xsd:element ref="certUri" minOccurs="0"/>
				</xsd:sequence>
			</xsd:restriction>
		</xsd:complexContent>
	</xsd:complexType>

Reproduce code:
---------------
soap client code:
$args = array (
	'trace' => 1,
	'exceptions' => 1,
	'location' => 'http://localhost/proj/server.php'
	);

$clientSOAP = new SoapClient('CurrentNENA/I2/v7/v7.wsdl', $args);

$params= array (
        "validateAddress" => array(
		"MessageID" => "Blob",
		"CustomerID" => "1992",
		"StreetAddress" => array(
			"HouseNum" => "200",
			"HouseNumSuffix" => "200",
			"PrefixDirectional" => "200",
			"StreetName" => "200",
			"StreetSuffix" => "200",
			"PostDirectional" => "200",
			"MSAGCommunity" => "200",
			"StateProvince" => "200",
			"PostalCode" => "200",
			"Country" => "200"
		)
	));
	
$myres = $clientSOAP->__soapCall("validateAddress", $params);

soap server code:
$serveurSOAP = new SoapServer('CurrentNENA/I2/v7/v7.wsdl');
$serveurSOAP->addFunction(array("validateAddress"));

if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
	$serveurSOAP->handle();
}
else
{
	echo 'Please use the POST method.';
}

function validateAddress($params)
{
	return array("MessageID" => "Blob", "ReturnCode" => "200", "Valid" => "Valid");
}

Expected result:
----------------
should give a normal xml response

RESPONSE: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:nena:xml:ns:es:v7"><SOAP-ENV:Body><ns1:ValidateAddressOut><ns1:MessageID>Blob</ns1:MessageID><ns1:ReturnCode>200</ns1:ReturnCode><ns1:Valid>Valid</ns1:Valid></ns1:ValidateAddressOut></SOAP-ENV:Body></SOAP-ENV:Envelope>

Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
Schema: unresolved element 'ref' attribute.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-25 16:20 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-03-14 17:30 UTC] a831579 at owlpic dot com
Confirm !
PHP Version 5.2.10-2ubuntu6.4

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute in ...

when parsing file with <xs:attributeGroup ref="OTA_PayloadStdAttributes"/> attribute.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 22:01:31 2024 UTC