Hi, I'm using XML::Compile::WSDL11 with (what I expect is) a relatively complex WSDL. I have no control or influence on the WSDL or service. There are quite a few anyType elements, many of which have sub-elements with complex types.
If I understand correctly, there's no way to tell XML::Compile how to handle anyType elements other than the method that's the subject of my remaining questions. Please let me know if there are other, simpler approaches to handling anyType elements. For example, ideally there would be a way to tell XML::Compile "Go ahead and dive down into those complex typed sub-elements, making a good guess at the type, and Read and Write accordingly." Are there any publicly available examples of code which handle a complex typed sub-element, i.e., XML::Compile::WSDL11->new(..., opts_rw => { any_type => \&code } ... in Reader and Writer contexts? Is a typical approach as follows (for a Reader)? sub code { my ($path, $node, $handler) = @_; if ($path =~ /looks like this/) { # then we know it's a particular complex type # so parse $node using a particular complex type # and return the hash } elsif ($path =~ /looks like something else/) { # then we know it's another complex type # so parse $node using another complex type # and return the hash } ... } Does anyone have some good examples? Also, what's a good approach for separating the Reader and Writer aspects of any_type handlers? Thanks and kind regards, Kingsley
_______________________________________________ Xml-compile mailing list Xml-compile@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile