[Xml-compile] Callback returned element must use type not name

Robin V. robinsp at gmail.com
Mon Apr 26 20:05:11 GMT 2010


Hi,

I upgraded xml::compile and xml::comile::soap and checked the (maybe
experimental?) WSDL->explain method.

For a given callback, this "explain" method prints that the returned
element should look like this:



sub handle_CheckStatus($)
{  my ($server, $data_in) = @_;
   # process $data_in, structured as INPUT message.
   # Hint: use "print Dumper $data_in"
   # To explore the HASHes for each part, use recurse option.

   # Part type {http://www.siri.org.uk/siri}ProducerResponseEndpointStructure
   my $CheckStatusAnswerInfo = {};

   # Part type {http://www.siri.org.uk/siri}CheckStatusResponseBodyStructure
   my $Answer = {};

   # Part type {http://www.siri.org.uk/siri}ExtensionsStructure
   my $AnswerExtension = {};

   # This will end-up as $answer at client-side
   return    # optional keyword
   +{
       CheckStatusAnswerInfo => $CheckStatusAnswerInfo,
       Answer => $Answer,
       AnswerExtension => $AnswerExtension,
    };
}

But in fact, I must use a hash like this for the callback to return data:


{
ProducerResponseEndpointStructure =>
	XXX
CheckStatusResponseBodyStructure =>
	{
		XXX => zzz
	},
ExtensionsStructure => {}
}


There seems to be a mixup between type and name of the parameters.

Regards,
Robin



More information about the Xml-compile mailing list