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

WSDL, and multiref problem

Expand Messages
  • Adhamh Findlay
    Hello, So, I m new to SOAP... I have written a Java application that provides a SOAP server. (Its a WebObjects application, but that shouldn t matter...) I
    Message 1 of 1 , Jun 11, 2003
    • 0 Attachment
      Hello,


      So, I'm new to SOAP...

      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 key.

      I have read the information at
      http://www.majordojo.com/archives/cat_soaplite.html 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 =
      "http://myhost.somedomain.com:4220/cgi-bin/WebObjects/Waldo.woa/ws/PersonSer
      vice?wsdl";
      my $NS =
      "http://myhost.somedomain.com:4220/cgi-bin/WebObjects/Waldo.woa/ws/PersonSer
      vice";
      my $HOST =
      "http://myhost.somedomain.com:4220/cgi-bin/WebObjects/Waldo.woa/ws/PersonSer
      vice";

      my $search = SOAP::Lite
      ->readable(1)
      ->xmlschema('http://www.w3.org/2001/XMLSchema')
      ->on_action( sub { return'""';})
      #See comments below
      #->maptype({getPersonByNameRequest => $NS})
      ->proxy($HOST)
      ->uri($NS);

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

      my $params = SOAP::Data
      ->type('getPersonByNameRequest')
      #->uri($NS)
      #->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
      #exception.
      #\SOAP::Data->value(SOAP::Data->name('in0' =>
      #"jim")->type('xsd:string')));
      SOAP::Data->value(SOAP::Data->name('in0' => "jim")->type('xsd:string')));

      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 generating.

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


      Thanks,

      Adhamh
    Your message has been successfully submitted and would be delivered to recipients shortly.