|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-04-10 23:52 UTC] dmittner at llnw dot com
Description: ------------ Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute. C# generated WSDL. I saw an older bug with similar characteristics, but that was 4 years old, supposedly resolved, and on a different OS. Several validators I tried are able to consume the WSDL. Reproduce code: --------------- <?php $wsdl = "http://gpn.webservice.gomez.com/GpnProvisioningService/ProvisioningWS.asmx?wsdl"; $soap = new SoapClient($wsdl,array("trace"=>true,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS)); ?> Expected result: ---------------- No explicit output. Actual result: -------------- Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute in /home/dmittner/temp.php:3 Stack trace: #0 /home/dmittner/temp.php(3): SoapClient->SoapClient('http://gpn.webs...', Array) #1 {main} thrown in /home/dmittner/temp.php on line 3 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
I've narrowed it down, I think. Relevant excerpts from the WSDL: <s:element name="ProvisionMonitors"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" ref="ProvisioningOrder" /> </s:sequence> </s:complexType> </s:element> <s:element name="ProvisioningOrder" type="ProvisioningOrder" /> <s:complexType name="ProvisioningOrder"> <s:complexContent mixed="false"> <s:extension base="CServiceObject"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="MonitorOrders" type="ArrayOfMonitorOrder" /> ... </s:sequence> <s:attribute name="name" type="s:string" /> ... </s:extension> </s:complexContent> </s:complexType> No "name" is specified in the upper block of XML, for the line with the "ref=". If I specify a name the WSDL parses. I believe the correct behavior would be for PHP to acquire the name from the complexType declaration. I don't know if this should always be the case for references, or only when no name is provided - if providing a name is even valid for them. This is just a guess, though. I've dealt very little with references so do not know the standards surrounding them; only what digging into the XML has revealed.having the same problem. Urgent fix needed! follow extract of the WSDL <s:element name="getLinkProfilesByTicketResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" ref="getLinkProfilesByTicketResult" /> </s:sequence> </s:complexType> </s:element> ..... <s:element name="getLinkProfilesByTicketResult" type="LINKPROFILESRESPONSE" /> <s:complexType name="LINKPROFILESRESPONSE"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="USER" type="USER" /> </s:sequence> <s:attribute name="error" type="s:string" /> </s:complexType> <s:complexType name="USER"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="CODMARKET" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="USERNAME" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="SINCOM" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="LOGINNAME" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="FIRSTNAME" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="LASTNAME" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EMAIL" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="TELEPHONE" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="FAX" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="USERTYPE" type="s:integer" /> <s:element minOccurs="0" maxOccurs="1" name="COMPANY" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="SAPUSERID" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="MAINSINCOM" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="STATUS" type="s:integer" /> <s:element minOccurs="0" maxOccurs="1" name="LANGUAGE" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="APPLICATIONS" type="ArrayOfAPPLICATION" /> </s:sequence> </s:complexType> <s:complexType name="ArrayOfAPPLICATION"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="APPLICATION" type="APPLICATION" /> </s:sequence> </s:complexType> <s:complexType name="APPLICATION"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="ROLE" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="BRANDS" type="s:string" /> </s:sequence> <s:attribute name="name" type="s:string" /> <s:attribute name="market" type="s:string" /> <s:attribute name="enabled" type="s:integer" /> </s:complexType> <s:element name="LINKPROFILESRESPONSE" type="LINKPROFILESRESPONSE" />