In some circumstances you may need to encode a message using raw unserialized XML text. To instantiate a SOAP::Data object using raw XML, do the following:
$xml_content = '
$elem = SOAP::Data->type('xml' => $xml_content);
SOAP::Lite's serializer simple takes whatever text is passed to it, and inserts into the encoded SOAP::Data element verbatim. The text input is validated to ensure it is valid XML, nor is the resulting SOAP::Data element validated to ensure that it will produce valide XML. Therefore, it is incumbant upon the developer to ensure that any XML data used in this fashion is valid and will result in a valid XML document."