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

Retrieve SOAP message as XML reference

Expand Messages
  • tilmant_a
    Hello, I try to write a server that receive a request and save the request as XML in a file. I use the body method to retrieve the body message but this
    Message 1 of 2 , May 19, 2006
      Hello,

      I try to write a server that receive a request and save the request
      as XML in a file.

      I use the "body" method to retrieve the body message but this method
      retrieve the body message as a hash reference. Which method is
      available to retrieve the body message as XML reference on the server
      side ?

      This is my client:
      use SOAP::Lite +trace;

      print SOAP::Lite
      -> uri('urn:events_5')
      -> proxy('http://localhost:8080/cgi-bin/events_5.cgi')
      -> c2f(37.5)
      -> result;

      This is my cgi :
      #!D:\Perl\bin\perl.exe
      use SOAP::Lite;
      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('events_5')
      -> handle;

      This is events5.pm file :

      package events_5;

      use vars qw(@ISA);
      @ISA = qw(SOAP::Server::Parameters);
      use SOAP::Lite;

      sub c2f {

      open (FIC5,'>D:\tutu');
      my $self = shift;
      my $envelope = pop;

      $envelope->match('/Envelope/Body');
      $body=$envelope->body;

      print FIC5 ("le champ est $body ");
      close(FIC5);

      return " $body \n";

      }
      Thanks a lot,

      Amelie
    • Eric Bridger
      This article might be of help: http://www.majordojo.com/soaplite/2004/10/intercepting_th.html#more
      Message 2 of 2 , May 19, 2006
        This article might be of help:
        http://www.majordojo.com/soaplite/2004/10/intercepting_th.html#more


        On Fri, 2006-05-19 at 07:44, tilmant_a wrote:
        > Hello,
        >
        > I try to write a server that receive a request and save the request
        > as XML in a file.
        >
        > I use the "body" method to retrieve the body message but this method
        > retrieve the body message as a hash reference. Which method is
        > available to retrieve the body message as XML reference on the server
        > side ?
        >
        > This is my client:
        > use SOAP::Lite +trace;
        >
        > print SOAP::Lite
        > -> uri('urn:events_5')
        > -> proxy('http://localhost:8080/cgi-bin/events_5.cgi')
        > -> c2f(37.5)
        > -> result;
        >
        > This is my cgi :
        > #!D:\Perl\bin\perl.exe
        > use SOAP::Lite;
        > use SOAP::Transport::HTTP;
        >
        > SOAP::Transport::HTTP::CGI
        > -> dispatch_to('events_5')
        > -> handle;
        >
        > This is events5.pm file :
        >
        > package events_5;
        >
        > use vars qw(@ISA);
        > @ISA = qw(SOAP::Server::Parameters);
        > use SOAP::Lite;
        >
        > sub c2f {
        >
        > open (FIC5,'>D:\tutu');
        > my $self = shift;
        > my $envelope = pop;
        >
        > $envelope->match('/Envelope/Body');
        > $body=$envelope->body;
        >
        > print FIC5 ("le champ est $body ");
        > close(FIC5);
        >
        > return " $body \n";
        >
        > }
        > Thanks a lot,
        >
        > Amelie
        >
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.