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

2749Re: Receiving type 'xml' on serverside - preventing deserialization of body.

Expand Messages
  • stormmaster42
    Jun 25, 2003
    • 0 Attachment
      Hi Alberto,

      thanks for your reply.
      But maybe I'm getting something completely wrong here.
      Why would I need a SOAP::Lite object on the server side?

      And I tried your code like so:

      ----- SERVER -----
      my $soap = SOAP::Lite
      -> uri("urn:IplsRotSoap")
      -> proxy("myproxy")
      -> outputxml(1);

      my $s = SOAP::Transport::HTTP::CGI
      -> dispatch_to('MyPackage');
      $s -> handle;

      package MyPackage;
      sub echo {
      my ( $self, $a ) = @_;
      return $a;
      }
      ----

      But $a still is the deserialzed hash of the xml I threw in the message
      on the client like:
      $soapResult = $soap -> echo(SOAP::Data->type('xml')->name(info =>
      $myxml));

      What I want is that $a contains exactly the same xml-string as the
      original $myxml.

      Cheers,
      Stefan

      --- In soaplite@yahoogroups.com, Alberto Accomazzi <aaccomazzi@c...>
      wrote:
      >
      > Stefan,
      >
      > simply use the outputxml() option when you create your SOAP::Lite
      object:
      >
      > my $soap = SOAP::Lite
      > -> uri('http://simon.fell.com/calc')
      > -> proxy('http://www.razorsoft.net/ssss4c/soap.asp')
      > -> outputxml(1);
      >
      >
      >
      > -- Alberto
      >
      > > Date: Mon, 23 Jun 2003 12:02:49 -0000
      > > From: "stormmaster42" <stefan@c...>
      > > Subject: Receiving type 'xml' on serverside - preventing
      deserialization of body.
      > >
      > > Hi,
      > >
      > > I am trying to write a client/service-combination that exchanges a
      > > SOAP-message containing an XML document.
      > >
      > > I know how to put the XML into the message. What I am doing on the
      > > client is:
      > > $soapResult = $soap -> verify(SOAP::Data->type('xml')->name(info
      =>
      > > $myxml));
      > >
      > > Now how do I get the content of the variable $myxml on the server
      side
      > > inside my handling subroutine?
      > > To me it seems that SOAP::Lite is always trying to deserialize the
      > > body into hashes, which I do not want in this case. Because I
      would
      > > like to do some validation/transformation on the transmitted XML.
      > >
      > > Unfortunately encoding the XML as a base64 string or escaping
      special
      > > characters is not an option since the real client (not SOAP::Lite)
      is
      > > not able to do that.
      > >
      > > Any help greatly appreciated.
      > > Thanx,
      > > Stefan
    • Show all 3 messages in this topic