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

Hello Monks,

I know I'm kind of rehashing an old node, but I've made some progress and would like some advice on how to proceed from here. I think the problem I've been having may be in the way SOAP::Lite serializes the array, though I may be mistaken. Here's the relevant offending code from my XRC module as it is now:
sub changePkg { my ($username, $pkg) = @_; my $client = connectXrc(); my $result = $client->setUserOffers( XRC_CLIENTID, $username, $pkg); }
The wsdl file defines setUserOffers like so:
<wsdl:message name="setUserOffersRequest"> <wsdl:part name="clientID" type="xs:int"/> <wsdl:part name="username" type="xs:string"/> <wsdl:part name="offerIDs" type="types:ArrayOfInt"/> </wsdl:message>
And ArrayOfInt like this:
<xs:complexType name="ArrayOfInt"> <xs:annotation><![CDATA[ A SOAP encoded array of the xs:int type. ]]></xs:annotation> <xs:complexContent> <xs:restriction base="soapenc:Array"> <xs:attribute ref="soapenc:arrayType" wsdl:arrayType="xs:int[]"/ +> </xs:restriction> </xs:complexContent> </xs:complexType>
My test, which fails, is very simple. The relevant parts look like this:
my @pkg = 5544; print "username: "; my $username = <STDIN>; chomp($username); XRC::changePkg($username, @pkg);
Everything works except offerIDs (@pkg). My XML that's passed to the server defines it like this:
<offerIDs xsi:type="types:ArrayOfInt">5544</offerIDs>
However, it always fails with this fault:
<faultstring>org.xml.sax.SAXException: Found character data inside an +array element while deserializing</faultstring>
I know I'm not actually passing a string, so I'm not really certain what's going on here. Google gave me some ideas, which I tested, but nothing ultimately came of it. Does anyone else have a suggestion?

- cerror