|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-08-02 21:58 UTC] djmaze at cpgnuke dot com
-Status: Open
+Status: Closed
[2018-08-02 21:58 UTC] djmaze at cpgnuke dot com
[2018-08-02 21:58 UTC] cmb@php.net
-Status: Closed
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
Description: ------------ When using a WSDL with the OTA XML XSD's something goes very wrong. The problem is that structures are not extended with <xs:attributeGroup> and <xs:extension base="*"> This results in incomplete malformed XML when using SoapVar It is a very large base with many XSD's so i try it with some short code sample below. Here the problem is with: RequestorID All required XSD's are here: opentravelmodel.net/pubs/specifications/OnlinePublications.html If needed, i could wrap up a full example with all required sources. Test script: --------------- <xs:attributeGroup name="UniqueID_Group"> <xs:attribute name="URL" type="xs:anyURI" use="optional"/> <xs:attribute name="Type" type="OTA_CodeType" use="required"/> <xs:attribute name="Instance" type="StringLength1to32" use="optional"/> <xs:attribute name="ID" type="StringLength1to32" use="required"/> <xs:attribute name="ID_Context" type="StringLength1to32" use="optional"/> </xs:attributeGroup> <xs:complexType name="UniqueID_Type"> <xs:sequence> <xs:element name="CompanyName" type="CompanyNameType" minOccurs="0"/> <xs:element ref="TPA_Extensions" minOccurs="0"/> </xs:sequence> <xs:attributeGroup ref="UniqueID_Group"/> </xs:complexType> <xs:complexType name="SourceType"> <xs:sequence> <xs:element name="RequestorID" minOccurs="0"> <xs:complexType> <xs:complexContent> <xs:extension base="UniqueID_Type"> <xs:attribute name="MessagePassword" type="StringLength1to16" use="optional"/> <xs:attribute name="Name" type="StringLength1to64" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="BookingReferenceType"> <xs:sequence> <xs:element name="UniqueID_Type"> <xs:complexType> <xs:simpleContent> <xs:extension base="Enum_UniqueIDType"> <xs:attribute name="extension" type="xs:string" use="optional"/> <xs:attribute name="ID_Context" type="StringLength1to32" use="optional"/> <xs:attribute name="URL" type="xs:anyURI" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> Expected result: ---------------- print_r(SoapClient::__getTypes()) [86] => string StringLength1to16 [90] => string StringLength1to64 [664] => struct SourceType { RequestorID RequestorID; } [665] => struct RequestorID { anyType CompanyName anyType TPA_Extensions anyURI URL OTA_CodeType Type StringLength1to32 Instance StringLength1to32 ID StringLength1to32 ID_Context StringLength1to16 MessagePassword; StringLength1to64 Name; } [691] => struct UniqueID_Type { anyType CompanyName; anyType TPA_Extensions; anyURI URL OTA_CodeType Type StringLength1to32 Instance StringLength1to32 ID StringLength1to32 ID_Context StringLength1to16 MessagePassword; StringLength1to64 Name; } [859] => struct UniqueID_Type { string extension; StringLength1to32 ID_Context; anyURI URL; } Actual result: -------------- print_r(SoapClient::__getTypes()) [664] => struct SourceType { RequestorID RequestorID; } [665] => struct RequestorID { UNKNOWN MessagePassword; UNKNOWN Name; } [691] => struct UniqueID_Type { anyType CompanyName; anyType TPA_Extensions; } //<xs:element name="UniqueID_Type"> [859] => struct UniqueID_Type { string extension; UNKNOWN ID_Context; anyURI URL; }