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

Using document/literal instead of RPC/encoding

Expand Messages
  • teden
    Folks, I have been asked to change my web service from RPC/encoding to document/literal. The crux of it is that the client wants to be able to pass an XML
    Message 1 of 1 , Nov 14, 2003
    • 0 Attachment
      Folks,

      I have been asked to change my web service from RPC/encoding to
      document/literal. The crux of it is that the client wants to be able
      to pass an XML document to me without going through an expensive
      marshal/de-marshal process.

      The request sounds reasonable enough, yet I am unsure of how to
      proceed from here. Is there code on the server side I need to change
      to accomodate this? Do I need to use a different Serializer? I'm just
      flailing in the breeze here...

      Here is my server:

      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new(
      LocalPort => $opt_p,
      Listen => $config{"Server.Listen"},
      Reuse => $config{"Server.Reuse"})
      -> dispatch_to(
      '/decision/webservices/lib',
      'BPC',
      )
      # enable compression support
      -> options({compress_threshold => 10000})
      ;

      $daemon->handle;

      ...

      package BPC;

      sub getDecision {
      my $obj = shift; # get rid of class/object reference
      my $som = pop; # pop SOAP Envelope (SOAP::Lite SOM object)
      from end of list

      ...

      };


      and here is a sample client:

      my $som = SOAP::Lite
      -> readable(1)
      -> uri($uri)
      -> proxy($PROXY)
      -> autotype(0)
      -> getDecision(
      SOAP::Data
      -> type('xml')
      -> value($lpInput),
      )
      ;


      Thom Eden
    Your message has been successfully submitted and would be delivered to recipients shortly.