Perl GetCurrentUserMailboxSize

From Rackspace Email & Apps API
Revision as of 16:57, 25 August 2008 by APIAdmin (talk | contribs) (New page: == GetCurrentUserMailboxSize == This function has been updated to reflect changes to SOAP::Lite 0.69. For more information about using the SOM objects, please check here:<br> http://sear...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GetCurrentUserMailboxSize

This function has been updated to reflect changes to SOAP::Lite 0.69. For more information about using the SOM objects, please check here:
http://search.cpan.org/dist/SOAP-Lite/lib/SOAP/SOM.pm


#!/usr/bin/perl

use strict;
#use SOAP::Lite +trace => "all";
use SOAP::Lite;
use Data::Dumper;

my $uri_prefix = "http://admin.excedent.com/excedentsoap/";
my $uri        = $uri_prefix."message/";
my $proxy      = "https://admin.excedent.com/excedentsoap/excedentsoap.ASP";
my $xmlschema  = "http://www.w3.org/1999/XMLSchema";
my $ns         = "namesp1";
my $service    = "https://admin.webmail.us/excedentsoap/excedentsoap.wsdl";
my $act_prefix = "Utils.";
my $function   = "GetCurrentUserMailboxSize";

my $resellerUsername = "someadmin";
my $resellerPassword = "somepassword";

my $hostName = "somedomain.com";
my $userID = "someuser";

my $mailboxsize = 0;

my $client = SOAP::Lite
  -> uri($uri)
  -> on_action( sub { return $uri_prefix."action/".$act_prefix.$function })
  -> proxy($proxy)
  -> xmlschema($xmlschema)
  -> ns($uri_prefix."message/",$ns);

my @params = (
     SOAP::Data->name('ResellerUsername')->value($resellerUsername),
     SOAP::Data->name('ResellerPassword')->value($resellerPassword),
     SOAP::Data->name('HostName')->value($hostName),
     SOAP::Data->name('UserID')->value($userID),
     SOAP::Data->name('CurrentMbxSize')->value($mailboxsize)
     );

my $som = $client->call($function => @params);

print $som->paramsout;
print "\n";