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

Re: [soaplite] Perl-Serializer for nested perl-package

Expand Messages
  • Paul Kulchenko
    Hi, Jens-Uwe! ... You don t need to do anything special as far as I can see. my $soap = SOAP::Lite - proxy(...) - uri(...) # as required by server ;
    Message 1 of 2 , Aug 14, 2001
    • 0 Attachment
      Hi, Jens-Uwe!

      > public int passJData(SOAPContext ctx, JData jdata)
      > So what must i do on Perl-side to achieve this (Serializer or
      > other things) ??
      You don't need to do anything special as far as I can see.

      my $soap = SOAP::Lite
      -> proxy(...)
      -> uri(...) # as required by server
      ;
      $soap->maptype->{JData} = '...'; # URI for JData
      $soap->maptype->{AData} = '...'; # URI for AData

      my $response = $soap->passJData($jdata);

      For one example of OO interop with ApacheSOAP you may take a look
      into examples/oo-apache.pl which does similar thing only without
      nested classes (shouldn't be any different though). Let me know if
      you still have any problems.

      Best wishes, Paul.

      --- Jens-Uwe Gaspar <jug@...> wrote:
      > Hi,
      >
      > i have a SOAP-Server (Java-classes under tomcat) and use SOAP::Lite
      > for a Perl-client.
      >
      > Question 1:
      > On client-side (Perl) i have two nested packages:
      >
      > package JData;
      > sub new { $c=$_[0]->class; $s={}; bless $self,$c; $s }
      >
      > package AData;
      > sub new { $c=$_[0]->class; $s={ 'astr' => .. }; bless $self,$c;
      > $s };
      >
      > and the following var setup like:
      >
      > my $adata = AData->new;
      > $adata->{'astr'} = 'foo';
      >
      > my $jdata = JData->new;
      > $jdata->{'s1'} = 'String1';
      > $jdata->{'i1'} = 4711;
      > $jdata->{'adata'} = $adata;
      >
      > On server-side (Java) i have the two nested classes:
      >
      > class AData {
      > private String astr;
      > // Bean-methods (set/get) for BeanSerializer
      > }
      >
      > class JData {
      > private AData adata;
      > private String s1;
      > private int i1;
      > // Bean-methods (set/get) for BeanSerializer
      > }
      >
      > and i have a Java-method which should be called via SOAP:
      >
      > public int passJData(SOAPContext ctx, JData jdata)
      > throws SOAPException ...
      >
      > On server-side there is a BeanSerializer for 'JData' and 'AData'.
      > Reading all mailinglist-messages, the manpage and the Cookbook
      > gives
      > me no idea how to do this.
      > So what must i do on Perl-side to achieve this (Serializer or
      > other
      > things) ??
      >
      >
      > Yours sincerely,
      >
      > JUG
      >
      >
      ________________________________________________________________________
      > Jens-Uwe Gaspar Schlund + Partner AG
      > E-Mail: jug@... Erbprinzenstr. 4 - 12
      > Tel. +49-721-91374-50 76133 Karlsruhe,
      > Germany
      > Fax +49-721-91374-20 http://www.schlund.de
      >
      > 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!?
      Make international calls for as low as $.04/minute with Yahoo! Messenger
      http://phonecard.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.