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

Re: How to serialize an object?

Expand Messages
  • yf72
    either $client- call($method = @params) or $client- method(@params) will produce NESTED xml like: ..
    Message 1 of 4 , Mar 31, 2006
    • 0 Attachment
      either $client->call($method => @params) or
      $client->method(@params) will produce NESTED xml like:

      <method customizedAttrs>
      <multiRef>..</muliRef>
      </method>

      Is it possible to use multirefinplace(1)? I couldn't find any sample
      code of how to use multirefinplace.

      The similar issue of multiref was aslo reported at:
      http://groups.google.com/group/comp.lang.perl.modules/browse_frm/thread/360922bcc7c676f9/b34610556100e55e?q=SOAP+multiref&rnum=1#b34610556100e55e

      --- In soaplite@yahoogroups.com, Eric Bridger <eric@...> wrote:
      >
      > On Fri, 2006-03-24 at 16:04, yf72 wrote:
      > > It's apache.axis doesn't recognize the serailized Member object by
      > > SOAP::Lite... Not SOAP::Lite deserialize.
      > >
      >
      > But you can use the SOAP::Data object to build the paramters you are
      > sending to the axis server. See this post about the $service->call()
      > method which allows you to fully customize your request.
      >
      > http://www.majordojo.com/archives/000009.php
      >
      > See also the call method documentation at:
      > http://www.majordojo.com/soaplite/docs/SOAP/Lite.html#METHODS
      >
      > Here's some code:
      > ========================
      >
      > # Connect to the service
      > my $service = SOAP::Lite
      > ->proxy('http://some/url/')
      > ;
      >
      > my $site_no = '';
      > $site_no = shift or $site_no = '06307616';
      >
      > my $method_name = 'getInfoBySiteNo';
      >
      > my $method = SOAP::Data
      > ->name($method_name)
      > ->prefix('tns')
      > ->uri('http://systinet.com/wsdl/gov/nwis/api/');
      >
      > my $site_params =
      > SOAP::Data
      > ->attr({'xmlns:ns1' =>
      > 'http://systinet.com/wsdl/gov/nwis/model/'})
      > ->name(
      > 'tns:siteNo' => \SOAP::Data->value(
      > SOAP::Data->name( 'ns1:siteNo' =>
      > $site_no)->type('string')),
      > );
      >
      > # Pass the both method and params to the service.
      > my $site_response = $service->call($method
      > => $site_params
      > );
      >
      > Eric
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.