#44 Arrays not encoded properly

0.60
closed-wont-fix
Byrne Reese
Encoding (11)
5
2004-09-27
2004-04-07
Anonymous
No

If the first element of @list in the following is '-1', the
method invocation will return an empty $result.
However if the first element of @list is '-config'
everything works fine.

use SOAP::Lite;
use strict;
#my $uri='http://www-stl-
11.mw.nos.boeing.com:8080/apps/ApplicationBroker/servi
ces/ApplicationBroker';
my $uri = 'http://a-
r1tdon4kf0fhj.mw.nos.boeing.com:9080/ApplicationBroker
/services/ApplicationBroker';
my $proxyUrl = $uri.'?wsdl';
print $uri."\n";
print $proxyUrl."\n";
my $name = 'PMAT';

my @list = ('-1',
'H',
'-t',
'h',
'-o',
'h:',
'-p',
'h');

my $proxy = SOAP::Lite->uri($uri)
->proxy
($proxyUrl);

print $proxy->executeProcessAndBlock($name,\@list)-
>result;

Discussion

  • Rajesh Patel
    Rajesh Patel
    2004-04-07

    Logged In: YES
    user_id=458738

    I sumbitted this bugreport, If you need to get ahold of me
    my e-mail is cool_raj@hotmail.com

     
  • Rajesh Patel
    Rajesh Patel
    2004-04-08

    Logged In: YES
    user_id=458738

    Why are you guys autocasting -1 to an int?

    here is the soap message -1 automagically gets converted
    to xsd:int!

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <namesp1:executeProcessAndBlock
    xmlns:namesp1="http://www-stl-11.mw.nos.boeing.com:8080/apps/ApplicationBroker/services/ApplicationBroker">
    <c-gensym3 xsi:type="xsd:string">TV_TREND</c-gensym3>
    <SOAP-ENC:Array SOAP-ENC:arrayType="xsd:ur-type[6]"
    xsi:type="SOAP-ENC:Array">
    <item xsi:type="xsd:int">-1</item>
    <item xsi:type="xsd:string">tv_gpsii</item>
    <item xsi:type="xsd:string">tv_0428a</item>
    <item
    xsi:type="xsd:string">h:/websites/psso/data/apps/tecview/msoffice/trend_chart.ppt</item>
    <item xsi:type="xsd:string">TPM</item>
    <item xsi:type="xsd:string">PHASE_1</item>
    </SOAP-ENC:Array>
    </namesp1:executeProcessAndBlock>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

     
  • Byrne Reese
    Byrne Reese
    2004-09-27

    Logged In: YES
    user_id=28043

    Because Perl is loosely typed, there is no 100% reliable way
    to predict what the *intended* type of a variable is. So
    SOAP::Lite has a system of guessing what a type is. But it
    is not 100% reliable. You do however, have the control to
    override this autotyping behavior with your own.

    The following code will fix your problem:
    my $proxy = SOAP::Lite->uri($uri)->proxy($proxyUrl);
    $proxy->serializer->typelookup->{string}->[0] = 0;

     
  • Byrne Reese
    Byrne Reese
    2004-09-27

    • milestone: --> 0.60
    • status: open --> closed-wont-fix