[Xml-compile] Generating SOAP reponses from 'precanned' XML
Patrick Powell
papowell at astart.com
Thu Aug 29 01:31:38 GMT 2013
I am running into a bit of an issue with performance here and want to
check to see if something
is possible.
On the server, you provide a callback function that accepts the XML
input and some options
and then generates and returns a hash. The XML::Compile infrastructure
then uses
this hash value and generates the XML for the SOAP reply.
For example:
xml_in = { ... };
Handler( ..., $xml_in )
returns:
{ message => {
field1 => "value"
}
}
XML Output:
<!- ... >
<message><field1>value</field1></message>
Now I already have the XML, and want to simply have the XML::Compile
put the SOAP headers
etc on the reply message. I vaguely recall discussing this with
somebody or reading about this
and they indicated that you could do something like:
my $some_object = XXXX->new(
"<!--....><message>....</message>");
return $some_object;
If you returned an object of some sort, then the XML::Compile would
skip the conversion
into XML and use the value of the object, or access the value using
some method to
get the data for the SOAP message.
More information about the Xml-compile
mailing list