Re: Modifying SOAPAction
Adel Abushaev <[email protected]> Fri, 7 Oct 2011 08:51:28 -0700
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <CAEsuig_G09hRX1aL6jUZYdYQKp7-AQAm--xODQtC62ggGMZnAA@mail.gmail.com> |
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 <[email protected]> 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
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs