From: simon at connexon dot com Operating system: Windows XP PHP version: 5.2.8 PHP Bug Type: SOAP related Bug description: SOAP-ERROR: Parsing WSDL
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 bug report at http://bugs.php.net/?id=47119&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47119&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47119&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47119&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47119&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47119&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47119&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47119&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47119&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47119&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47119&r=support Expected behavior: http://bugs.php.net/fix.php?id=47119&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47119&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47119&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47119&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47119&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47119&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47119&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47119&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47119&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47119&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47119&r=mysqlcfg