Loading ...
Sorry, an error occurred while loading the content.

RE: [soaplite] Passing list of integers to MS .NET (scalars work fine)

Expand Messages
  • Meisner, Sean
    Hi Chris, Pure speculation: perhaps the .NET service sees an array of type int as incompatible with type Int32 ..? Cheers, Sean ...
    Message 1 of 2 , Jul 3, 2001
    • 0 Attachment
      Hi Chris,
      Pure speculation: perhaps the .NET service sees an array of type "int"
      as incompatible with type "Int32"..?

      Cheers,

      Sean

      > -----Original Message-----
      > From: Chris Davies [mailto:Chris.Davies@...]
      > Sent: Tuesday, July 03, 2001 8:15 AM
      > To: SOAP Lite mailing list
      > Subject: [soaplite] Passing list of integers to MS .NET (scalars work
      > fine)
      >
      >
      > Well, here I am again. After tearing what's left of my hair
      > out for the past
      > several hours I have come to the conclusion that it's time to ask the
      > experts :-)
      >
      > I can successfully communicate between my SOAP::Lite (version
      > 0.50) client
      > and an MS .NET server using various different functions. It's
      > all hunky dory
      > and works a treat, except for the one function that requires a list of
      > integers.
      >
      > The error message shows that the server function has been defined as
      > "...SetCarOptions(String VehicleId, Int32[] Id)"
      >
      > So, I've built a function that's supposed to pass these
      > parameters. Here's
      > the relevant snippet of client code (where $vehicleId and
      > @optionIds are the
      > data items corresponding to the function's parameter definitions):
      >
      > my $xVehicleId = SOAP::Data
      > -> type ("string")
      > -> name ("~:VehicleId")
      > -> value ($vehicleId)
      > ;
      > my $xIds = SOAP::Data
      > -> type ("Array")
      > -> name ("~:Id")
      > -> value ([ map { SOAP::Data
      > -> type ("int")
      > -> value ($_)
      > } @optionIds ])
      > ;
      > my $xOut = $soap->SetCarOptions ($xVehicleId, $xIds);
      >
      > Unfortunately I get a soap fault from the server,
      > "System.NullReferenceException: Attempted to dereference a null object
      > reference", and the folks writing the server can't offer any
      > assistance.
      >
      > In the good tradition of desperate programmers, I've experimented with
      > various combinations -
      > * SOAP::Data ref to list of SOAP::Data data items (as coded above)
      > * reference to simple list of data items (i.e. \@optionIds)
      > * simple list of SOAP::Data data items (i.e. @optionIds)
      > * reference to simple list of SOAP::Data data items (fun
      > with "map")
      > * SOAP::Data ref to simple list of data items (i.e.
      > SOAP::Data -> type
      > ("int") -> value (@optionIds))
      > * SOAP::Data ref to reference containing list of data items (i.e.
      > SOAP::Data ([ @optionIds ]))
      > but none of these result in a happy server.
      >
      >
      > Here's the actual XML/Soap message being transmitted -
      > formatted for "easy"
      > reading, of course --
      >
      > <SOAP-ENV:Envelope
      > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      >
      > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      >
      > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      >
      > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      > <SOAP-ENV:Body>
      > <namesp1:SetCarOptions xmlns:namesp1="http://tempuri.org/">
      > <namesp1:VehicleId
      > xsi:type="xsd:string">0006F5C4-0000-0000-0000-0000000F4369</na
      > mesp1:VehicleI
      > d>
      > <namesp1:Id xsi:type="SOAP-ENC:Array"
      > SOAP-ENC:arrayType="xsd:int[2]">
      > <item xsi:type="xsd:int">7</item>
      > <item xsi:type="xsd:int">49</item>
      > </namesp1:Id>
      > </namesp1:SetCarOptions>
      > </SOAP-ENV:Body>
      > </SOAP-ENV:Envelope>
      >
      >
      > Do any of you have any suggestions at all, please?
      >
      > Thanks!
      > Chris
      > --
      > Chris Davies, Manheim Interactive (Europe)
      > Tel. 0870 444-0450 Fax. 0870 444-0482 Email. MOL@...
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
    • Paul Kulchenko
      Hi, Chris! I also have a interop tests with .NET and .NET remoting endpoint and those tests include echoIntegerArray as one of the tests. Unfortunately I can t
      Message 2 of 2 , Jul 3, 2001
      • 0 Attachment
        Hi, Chris!

        I also have a interop tests with .NET and .NET remoting endpoint and
        those tests include echoIntegerArray as one of the tests.
        Unfortunately I can't provide you a wiredump (.NET server seems to be
        unavailable and it wasn't available last time when I run tests), but
        I don't recall any problems with those tests. I posted request about
        state of .NET servers, and will let you know as soon as they'll be
        up. All interop results are available from
        http://interop.soaplite.com/ where you can see both request and
        response envelopes. Even if it works for IntegerArrays, I don't know
        how it's encoded on server side, probably it's something we may ask.
        Not much help, just a status :).

        Best wishes, Paul.

        --- "Meisner, Sean" <Sean.Meisner@...> wrote:
        > Hi Chris,
        > Pure speculation: perhaps the .NET service sees an array of type
        > "int"
        > as incompatible with type "Int32"..?
        >
        > Cheers,
        >
        > Sean
        >
        > > -----Original Message-----
        > > From: Chris Davies [mailto:Chris.Davies@...]
        > > Sent: Tuesday, July 03, 2001 8:15 AM
        > > To: SOAP Lite mailing list
        > > Subject: [soaplite] Passing list of integers to MS .NET (scalars
        > work
        > > fine)
        > >
        > >
        > > Well, here I am again. After tearing what's left of my hair
        > > out for the past
        > > several hours I have come to the conclusion that it's time to ask
        > the
        > > experts :-)
        > >
        > > I can successfully communicate between my SOAP::Lite (version
        > > 0.50) client
        > > and an MS .NET server using various different functions. It's
        > > all hunky dory
        > > and works a treat, except for the one function that requires a
        > list of
        > > integers.
        > >
        > > The error message shows that the server function has been defined
        > as
        > > "...SetCarOptions(String VehicleId, Int32[] Id)"
        > >
        > > So, I've built a function that's supposed to pass these
        > > parameters. Here's
        > > the relevant snippet of client code (where $vehicleId and
        > > @optionIds are the
        > > data items corresponding to the function's parameter
        > definitions):
        > >
        > > my $xVehicleId = SOAP::Data
        > > -> type ("string")
        > > -> name ("~:VehicleId")
        > > -> value ($vehicleId)
        > > ;
        > > my $xIds = SOAP::Data
        > > -> type ("Array")
        > > -> name ("~:Id")
        > > -> value ([ map { SOAP::Data
        > > -> type ("int")
        > > -> value ($_)
        > > } @optionIds ])
        > > ;
        > > my $xOut = $soap->SetCarOptions ($xVehicleId, $xIds);
        > >
        > > Unfortunately I get a soap fault from the server,
        > > "System.NullReferenceException: Attempted to dereference a null
        > object
        > > reference", and the folks writing the server can't offer any
        > > assistance.
        > >
        > > In the good tradition of desperate programmers, I've experimented
        > with
        > > various combinations -
        > > * SOAP::Data ref to list of SOAP::Data data items (as coded
        > above)
        > > * reference to simple list of data items (i.e. \@optionIds)
        > > * simple list of SOAP::Data data items (i.e. @optionIds)
        > > * reference to simple list of SOAP::Data data items (fun
        > > with "map")
        > > * SOAP::Data ref to simple list of data items (i.e.
        > > SOAP::Data -> type
        > > ("int") -> value (@optionIds))
        > > * SOAP::Data ref to reference containing list of data items
        > (i.e.
        > > SOAP::Data ([ @optionIds ]))
        > > but none of these result in a happy server.
        > >
        > >
        > > Here's the actual XML/Soap message being transmitted -
        > > formatted for "easy"
        > > reading, of course --
        > >
        > > <SOAP-ENV:Envelope
        > > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        > >
        > > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        > > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
        > >
        > >
        > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        > >
        > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
        > > <SOAP-ENV:Body>
        > > <namesp1:SetCarOptions xmlns:namesp1="http://tempuri.org/">
        > > <namesp1:VehicleId
        > > xsi:type="xsd:string">0006F5C4-0000-0000-0000-0000000F4369</na
        > > mesp1:VehicleI
        > > d>
        > > <namesp1:Id xsi:type="SOAP-ENC:Array"
        > > SOAP-ENC:arrayType="xsd:int[2]">
        > > <item xsi:type="xsd:int">7</item>
        > > <item xsi:type="xsd:int">49</item>
        > > </namesp1:Id>
        > > </namesp1:SetCarOptions>
        > > </SOAP-ENV:Body>
        > > </SOAP-ENV:Envelope>
        > >
        > >
        > > Do any of you have any suggestions at all, please?
        > >
        > > Thanks!
        > > Chris
        > > --
        > > Chris Davies, Manheim Interactive (Europe)
        > > Tel. 0870 444-0450 Fax. 0870 444-0482 Email.
        > MOL@...
        > >
        > >
        > > To unsubscribe from this group, send an email to:
        > > soaplite-unsubscribe@yahoogroups.com
        > >
        > >
        > >
        > > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Get personalized email addresses from Yahoo! Mail
        http://personal.mail.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.