[Xml-compile] problems with sending SOAP headers

Karen Etheridge perl at froods.org
Wed Sep 12 18:38:16 GMT 2012


I'm having difficulty in using XML::Compile::WSDL11 to send a message with
a <soapenv:Header> element.  When I pass my arguments (body and header
elements) to the compiled subref with trace mode on, I see "warning: unused
values <header element>".

Am I right in concluding that (barring any bugs in XML::Compile itself),
this means that the WSDL is not properly written to indicate the presence
of this header element for this operation (I don't speak enough WSDL to know if
this is the case, but I'm reading through the W3C docs to make this
determination)?  

I'm doing this, roughly:

    use XML::Compile::WSDL11;
    use XML::Compile::SOAP11;
    use XML::Compile::Transport::SOAPHTTP;

    my $wsdl = XML::Compile::WSDL11->new($wsdlfile);
    $wsdl->importDefinitions($_) foreach @xsd_files;

    my $call = $wsdl->compileClient($operation);
    my ($answer, $trace) = $call->(
        {
            key_for_header => { ... },
            key_for_body => { ... },
        },
        'UTF-8',
    );

I've also tried passing args
    {
        Header => { key_for_header => { ... } },
        Body => { key_for_body => { ... } },
    }

..with the same results.

Is there anything else I can do other than fix the WSDL to insert these
elements in the request?  I cannot find anything in the documentation about
manually inserting extra arguments that the WSDL does not recognize.




More information about the Xml-compile mailing list