[Xml-compile] Help with compiling serializers and de-serializers

Mark Overmeer mark at overmeer.net
Sun May 22 18:20:26 GMT 2011


* Bill Moseley (moseley at hank.org) [110522 15:10]:
> my $operation = $wsdl->operation( 'createPerson' );
> warn Dumper $operation->{input_def};

It's better to use
   $operation->explain($wsdl, PERL => 'INPUT', recurse => 1);
than some kind of "illegal" introspection.  Also
   $wsdl->explain('xyz', PERL => 'INPUT', recurse => 1);

> There's two input sections.  Can I compile a single subroutine to
> parse/de-serialize a message that includes both the header and body?  And
> likewise, create a single sub to encode/serialize?

Yes, that's actually the normal situation.  It's even possible to have
multiple bodies.

> The compile method in XML::Compile::Schema seems like what I need, but that
> requires a "TYPE" that seems to be the "element" from the list of "parts"
> above.

You need to provide the name of the part.  See output of "explain".

> This seems more complicated than it should be, so I assume I'm doing
> something wrong.

yep ;-)
-- 
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