in reply to Re: SOAP::Lite method attributes
in thread SOAP::Lite method attributes

Hi Monks, Having used this site in silence for many years (it's been great, thanks :-) ), I've finally found a problem for which I can't find the answer.

I need generate a soap request in with containing the following xml:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:typ="http://www.corvil.com/ws/stats/types"> <soapenv:Head +er/> <soapenv:Body> <typ:getCnesRequest version="1"/> </soapenv:Body> + </soapenv:Envelope>

The bit I'm really struggling with is getting the tag attribute?: version="1" added to the method getCnesRequest.

I've tried many different ways of doing it including using $soap->getCnesRequest->attr({Version=>"1"}) and even using raw xml, but nothing seems to do what I need...this may be due to the fact that I'm no expert in XML and I may even be using the wrong terminology when I search for the answer.

Any help/pointers anyone can provide would be very much appreciated.


Many thanks.
Trickydicky

Replies are listed 'Best First'.
Re^3: SOAP::Lite method attributes
by poj (Abbot) on Dec 22, 2017 at 16:34 UTC

    Try

    my $method = SOAP::Data->name('typ:getCnesRequest')->attr({Version=>1});
    my $response = $soap->call($method);
    
    poj