CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Help with SOAP::Lite request



Apr 22, 2014, 2:48 PM

Post #1 of 1 (10843 views)
Help with SOAP::Lite request Can't Post

I've got the following xml output from a valid soap request that I need to convert to perl. I've created other soap requests successfully by adding the parameters but this is different in that there are attributes of xml elements that is creating a problem for me. This is the request.

<SendNotificationRequest clientIndicator="ISAAC_WFE" language="en" xsi:schemaLocation=" EDD_Request.xsd" xmlns="" xmlns:xsi="">
<ctn category="contact">917523xxxx</ctn>
<dataField name="MgrID">jz359m</dataField>
<dataField name="SMSText">this is a test SMS message</dataField>

This does not work and I think its due to the 'category' and 'name' fields being an attribute of an xml element, not an element itself. So please let me know if this is anything close to what I needed.

$self->{method_name} = 'SendNotificationRequest';
$self->{method_attr} = {
"clientIndicator" => 'ISAAC_WFE',
"language" => "en",
"xsi:schemaLocation" => ' EDD_Request.xsd',
"xmlns" => '',
"xmlns:xsi" => '',
"xmlns:cnm" => '',

my $data = SOAP::Data->name($self->{method_name})->attr($self->{method_attr});
my @params = ( $data =>(
SOAP::Data->type("")->name('ctype' => 'TXT_TO_MGR'),
SOAP::Data->name('contact' => '917523xxxx')])),
SOAP::Data->type("")->name(data =>
SOAP::Data->name('MgrID' => 'jz359m')])),
SOAP::Data->name('SMSText' => 'this is a test SMS message')])),
$self->{content} = $soap->call(@params);
$self->{request} = $soap->serializer->envelope(method => $data, @params);

$self->{content} = $soap->call(@params);


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives