#30 WDSL and multiRef problem


I have written a Java application that provides a SOAP
server. (Its a WebObjects application, but that
shouldn't matter...)

I seem to be having a multiref issue of the type that
has been discussed here before. I've found these
discussions useful, but not able to solve my issue.

I have a server that defines a method/operation that
returns a java Vector. I've written a really simple
SOAP::Lite script that uses wdsl. This script does
return all the objects I want (Dumper shows this), but
I can't access the results that are behind the mutliRef

I have read the information at
come close to a solution but I can still only get one
object back. Here is the script:

#!/usr/bin/perl -w
use SOAP::Lite;
use Data::Dumper;
my $WSDL =
my $NS =
my $HOST =

my $search = SOAP::Lite
->on_action( sub { return'""';})
#See comments below
#->maptype({getPersonByNameRequest => $NS})

my $method = SOAP::Data->name('getPersonByName')

my $params = SOAP::Data
#->maptype({getPersonByNameRequest => $NS)
->name('in0' =>
#if I add a \ before the SOAP::Data line below then
I get a
#serialization exception.
#I tried to fix this by using maptype as above, but
I still get the
#\SOAP::Data->value(SOAP::Data->name('in0' =>
SOAP::Data->value(SOAP::Data->name('in0' =>

my $results = $search->call($method => $params);
print Dumper($results->result);

The output of Dumper showed me that the other object(s)
I am interested in are hidden behind a multiRef key,
that I can't seem to get back. I also had tcpflow
running and it to show me that all the data I am
interested in is returned in XML format to may
script/client. I have attached both these outputs
(dumper.txt, tcpflow.txt).

Additionally, I have attached the file soaplitexml.
This file shows the various xml that is being sent to
my soap server.

I have also attached my WSDL that the application is

I just can't tell what I am still doing wrong. Any
help would be greatly appreciated!


  • adhamh findlay

    adhamh findlay - 2003-07-07

    tcpflow of the output

  • adhamh findlay

    adhamh findlay - 2003-07-07

    Output from using Dumper

  • adhamh findlay

    adhamh findlay - 2003-07-07

    Server side WSDL

  • adhamh findlay

    adhamh findlay - 2003-07-07

    xml that soap lite is sending to the server

  • Jorge Pacheco

    Jorge Pacheco - 2004-04-06

    Logged In: YES

    I don't know if you already fixed your problems, if not this
    could be helpful.

    Whenever I work with SOAP::Lite and I monitor the contents
    going and coming with the tcp-flow I realize that SOAP::Lite
    doesn't create MultiRefs. Defenders say that MultiRefs are
    created UNLESS they're necesary.
    I also work with a Java WebServer and it uses Axis. On Java
    side, MultiRefs are always used. Defenders say that the
    complex value should skip the MultiRef ONLY when necessary.

    So you shouldn't really care for creating a MultiRef, since
    Java/Axis will deserialize the object as it comes. Any how,
    I used a code like yours:

    $name_space = 'XYZ'; #You should know it. Might be useful.
    my $obj = \SOAP::Data
    ->name('in0' => 'jim')
    my $param = [
    #your TypeObject
    ->name('in0' => $obj)
    #your reference (transparent for you)
    ->attr({'ns1' => $name_space})
    #your TypeObject's namespace

    my $results = $search->call($method => @{$params});
    #I prefer to pass an array.

    If you see what you send probably you won't see any
    MultiRef, but Java/Axis will interpret your Object properly.

    When you retrieve your result from Java/Axis, you could have
    a problem, since probably you'll get a multiRef and
    SOAP::Lite deserializes BOTH the coming results and
    multiRefs within the body and probable the result runs
    before the non-yet-deserialized MultiRef.

    I made a small patch for, you can find also in this site.
    Hopeit helps.

    A newbee...

  • Martin Kutter

    Martin Kutter - 2007-10-03

    Logged In: YES
    Originator: NO

    Duplicate of [ 1612405 ] Incorrect deserialization of arrays/vectors

  • Martin Kutter

    Martin Kutter - 2007-10-03
    • status: open --> closed-duplicate

Log in to post a comment.