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

Re: Problem with SOAP::Lite and DSML Client

Expand Messages
  • Bruno Grossmann
    Here is another solution I came up with to solve my problem. The advantage of this one is that I can use my script with the original Lite.pm module. However,
    Message 1 of 5 , Jan 9, 2004
    • 0 Attachment
      Here is another solution I came up with to solve my
      problem. The advantage of this one is that I can use
      my script with the original Lite.pm module. However,
      it is really cludgy, so I would appreciate any
      comments on making it more robust.

      #!/usr/bin/perl
      use SOAP::Transport::HTTP;
      #use MonSerialiseur;

      SOAP::Transport::HTTP::CGI
      # specify path to My/Examples.pm here
      -> deserializer(MonDeserialiseur->new)
      -> serializer(MonSerialiseur->new)
      -> dispatch_to('oasis')
      -> on_action(sub{return})
      -> handle();


      BEGIN
      {
      package MonSerialiseur;
      @MonSerialiseur::ISA='SOAP::Serializer';
      sub envelope
      {
      @bla=@_;

      $bla[2]=SOAP::Data->name('batchResponse')->prefix('')->uri('urn:oasis:names:tc:DSML:2:0:core')
      if $_[1] =~ /^(?:method|response)$/;
      @_=@bla;
      shift->SUPER::envelope(@_)
      }
      package MonDeserialiseur;
      @MonDeserialiseur::ISA='SOAP::Deserializer';
      sub decode_object
      {
      @bla=@_;
      if ((ref $bla[1] eq 'ARRAY')&&(${$bla[1]}[0] =~
      /\w*:+batchRequest/))
      {
      foreach my $key (%{${$bla[1]}[1]})
      {
      ${${$bla[1]}[1]}{$key} =~
      s/urn:oasis:names:tc:DSML:2:0:core/oasis/;
      }
      }
      @_=@bla;
      shift->SUPER::decode_object(@_)
      }
      }

      __________________________________________________________
      Lèche-vitrine ou lèche-écran ?
      magasinage.yahoo.ca
    Your message has been successfully submitted and would be delivered to recipients shortly.