| Store | Cart

Re: Modifying SOAPAction

From: Adel Abushaev <adel...@gmail.com>
Fri, 7 Oct 2011 08:51:28 -0700
Robert,

     I have used LWP::UserAgent to provide custom SOAP action. Here is
the snippet.

Adel.

    my $request     = HTTP::Request->new(POST =>
'https://'.$self->hostname.':'.$self->port.$self->serviceUri);

    $request->content_type('text/xml');
    $request->header('Accept' => '*/*');
    $request->header('Host' => $self->hostname);
    $request->header('Connection' => 'keep-alive');

    if (defined $self->soapaction) {
        $request->header('SOAPAction' => $self->soapaction);
    } else {
        my ($service) = ($self->serviceUri =~ /.*\/(.*)/);
        $request->header('SOAPAction' =>
'"http://schemas.cisco.com/ast/soap/action/#'.$service.'#'.$dataStore->{operation}.'"');
    }

    $request->content($dataStore->{soapenvelope});



On Fri, Oct 7, 2011 at 8:42 AM, JONES, ROBERT E CTR USAF AETC
TTMS/TTMS <robe...@us.af.mil> wrote:
>>  I have a web service where the SOAPAction is different from the SOAP envelope body structure.  What I need to do is find a way to set the SOAPAction where it does not need to be the same as the first XML element in the body.  What I need to get is the following type of output:>> ...> SOAPAction: "Receive_RequestedData"> ...> <soapenv:Body>>  <tn1:RequestData>>  <tn1:otherstuff>data</tn1:otherstuff>>  </tn1:RequestData>> </soapenv:Body>>>> Robert Jones, BSP, BSCS> Keesler AFB>>>>>>>>> _______________________________________________> Perl-XML mailing list> Perl...@listserv.ActiveState.com> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs>
_______________________________________________
Perl-XML mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Recent Messages in this Thread
Daniel Perrett Sep 28, 2011 05:35 pm
Bjoern Hoehrmann Sep 28, 2011 06:06 pm
Daniel Perrett Sep 29, 2011 05:04 pm
Bjoern Hoehrmann Sep 29, 2011 06:35 pm
JONES, ROBERT E CTR USAF AETC TTMS/TTMS Oct 07, 2011 03:42 pm
Adel Abushaev Oct 07, 2011 03:51 pm
JONES, ROBERT E CTR USAF AETC TTMS/TTMS Oct 10, 2011 08:16 pm
JONES, ROBERT E CTR USAF AETC TTMS/TTMS Oct 19, 2011 08:25 pm
Shlomi Fish Oct 20, 2011 12:12 pm
Daniel Perrett Dec 09, 2011 04:12 pm
Messages in this thread

Previous post: Modifying SOAPAction