Edit report at http://bugs.php.net/bug.php?id=47119&edit=1
ID: 47119 Comment by: a831579 at owlpic dot com Reported by: simon at connexon dot com Summary: SOAP-ERROR: Parsing WSDL Status: No Feedback Type: Bug Package: SOAP related Operating System: Windows XP PHP Version: 5.2.8 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2009-05-03 01:00:20] 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". ------------------------------------------------------------------------ [2009-04-25 16:20:59] j...@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-01-15 22:23:05] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=47119&edit=1