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

Re: xml data as parameter

Expand Messages
  • jbirchfield@ironmax.com
    I have a sopa service(written in Java) deployed using the Apache SOAP library. My service excepts an object of type Element. How can I pass the appropriate
    Message 1 of 3 , May 31, 2001
      I have a sopa service(written in Java) deployed using the Apache SOAP
      library. My service excepts an object of type Element. How can I
      pass the appropriate type to it? Following is my code:

      #!perl -w
      #!d:\perl\bin\perl.exe

      # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -
      -

      use SOAP::Lite;
      use XML::DOM;

      my $dom = new XML::DOM::Parser;
      my $doc = $dom->parsefile($ARGV[0]);

      print $doc->toString;

      my $r = SOAP::Lite
      -> uri('urn:LatLong')
      -> proxy('http://10.10.10.210/soap/servlet/rpcrouter');
      ###These are the things that are getting me. Nothing seems to work
      right...
      my $xml = $doc->toString;
      my $element = SOAP::Data->type(xml => ref $doc);
      my $a = $r->getLatLong($element);

      unless ($a->fault) {
      print SOAP::Deserializer->as_xml($a->result);
      }
      else {
      print "Fault:\n";
      print join ', ',
      $a->faultcode,
      $a->faultstring,
      $a->faultdetail;
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.