[Xml-compile] newbie question regarding headers and envelopes
Mark Overmeer
mark at overmeer.net
Thu Jul 16 20:05:11 GMT 2009
* Nicholas 'Techno-Viking' Wehr (nwehr at divxcorp.com) [090716 19:23]:
> I've been able to create the node exactly how I need; however, I'm
> confused on what the $type should be (from the example). How do I know
> what type it is especially if the schema doesn't define one?
> my $type = pack_type $wsp_namespace, $element_name;
In XML, types/names are a pair with namespace and localname. This
is a hassle for a program, so a common practice which XML::Compile
also uses, is to pack them as "{$namespace}$localname". That is
what XML::Compile::Util::pack_type() does for you. So, for example
{http://example.com}password
When XML::Compile finds an 'any' in the schema, and the compile() option
any_element is set to 'TAKE_ALL' (I think that is the default for WSDL
processing), then it will look for these types as HASH-key.
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list