Hi Mark, Unfortunately the service definition doesn't give any hint that the response will be extended, so that's probably a defect in the application...
<xs:complexType name="createNodeResponse"> <xs:sequence> <xs:element minOccurs="0" name="return"> <xs:complexType> <xs:sequence> <xs:element form="qualified" minOccurs="0" name="node" type="ns1:AbstractNodeType"></xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> Thanks anyhow, Ciaran -----Original Message----- From: Mark Overmeer [mailto:[email protected]] Sent: lundi 18 novembre 2013 11:58 To: DEIGNAN Ciaran Cc: [email protected] Subject: Re: [Xml-compile] Unexpected return type extension ? * DEIGNAN Ciaran ([email protected]) [131118 10:37]: > Is there a way to tell XML::Compile that "extensions of expected > types are ok" ? Not in the generic case. That is the disadvantage of being a "compiler": you need to know what to expect beforehand. That's also an advantage: the chance that you receive something unexpected is smaller... that's a good thing for interfaces. > The service returns information about the node created. The WSDL says > it returns "AbstractNodeType", but in fact it returns a FolderType or > a RecordType. >From your example, I cannot see whether this uses substitutionGroup's (which is simple to use, automagically works... generate example template to see how) or xsi:type. For the latter see xsiType() in XML::LibXML::Cache and http://search.cpan.org/~markov/XML-Compile-1.39/lib/XML/Compile/Schema.pod#Handling_xsi:type (which does lack the reference to the ::Cache::xsiType()... I'll add that for the next release) -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net _______________________________________________ Xml-compile mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
