cerror has asked for the wisdom of the Perl Monks concerning the following question:

My company is migrating its email to everyone.net. Our ticket system (written in Perl) has to be able to interface with their system, which uses XRC over SOAP to communicate. My problem is that when I try to pass data of the type ArrayOfInt, it simply gets ignored (everything else works fine). This is not critical, as only the offerIDs data requires it. Net::XRC provided some insight, but didn't include how to do this via SOAP. My question is, if any of you have had experience with everyone.net in the past, could you take a look at my code and see if there's a better way to pass the offerIDs data (I'm using the array @pkg to represent it)?

#!/usr/bin/perl use strict; use SOAP::Lite +trace => "debug"; package XRC; # This is the domain clientID use constant XRC_CLIENTID => 12345; sub addUser { my ($username, $password, $pkg) = @_; my $client = connectXrc(); my $result = $client->createUser( XRC_CLIENTID, @{$pkg}, $username, $password); } sub connectXrc { # xrc.wsdl handles the authentication my $client = SOAP::Lite ->uri("urn:xrc.ws.everyone.net") ->service("file:///path/to/xrc.wsdl") ->proxy("https://ws.everyone.net/ws/services/xrc"); return $client; }

My test program looks like this:

#!/usr/bin/perl use XRC; my @pkg = 5544; print "username: "; my $username = <STDIN>; chomp($username); print "password: "; my $password = <STDIN>; chomp($password); XRC::addUser($username, $password, \@pkg);
- cerror

Replies are listed 'Best First'.
Re: XRC and SOAP::Lite
by rhesa (Vicar) on Jun 27, 2007 at 22:17 UTC
    I don't have any experience with XRC whatsoever, but the documentation of Net::XRC shows the createUser call with 4 arguments, and the second one is a reference to an array. Given that this is a web service, it'd make sense that your SOAP call should follow that signature:
    my $result = $client->createUser( XRC_CLIENTID, $pkg, $username, $password);
    Other than that, I can't offer much help, without seeing the actual wsdl and soap trace log.