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

getting more info in faults when using SOAP::Transport::HTTP::Daemon

Expand Messages
  • chfoerst@ymail.com
    Dear all, I have the following code : use SOAP::Lite +trace = [fault = &log_faults]; @ISA = qw(SOAP::Server::Parameters SOAP::Transport::HTTP::Daemon);use
    Message 1 of 1 , Sep 23, 2011
    • 0 Attachment
      Dear all,

      I have the following code :


      use SOAP::Lite +trace => [fault =>  \&log_faults];

      @ISA = qw(SOAP::Server::Parameters SOAP::Transport::HTTP::Daemon);
      use SOAP::Transport::HTTP;

      my $daemon = SOAP::Transport::HTTP::Daemon
        -> new (LocalPort => 9876, Reuse => 1, Listen => 10)
        -> on_action(sub {})
        -> dispatch_to('meth1','meth2', ...);

      $daemon->handle;

      sub log_faults{
        open FAULT, ">>fault.log";
        print FAULT Dumper \@_ ;
        close FAULT;
      }


      Now, when I get a message, which for example, has an error in it's xml structure, I get the following writen in my fault.log:

      $VAR1 = [
                'Client',
                'Application failed during request deserialization:
                 mismatched tag at line 128, column 11, byte 6158 at   /some/path/XML/Parser.pm line 187
      ',
                undef,
                'http://localhost:8088/'
              ];

      The question now is, where can I get the faulty-XML messages, which causes this error, so that I can talk to the customer and tell him, that he should change his client-application ?

      Is there any way to get the incoming message in the fault section?

      Thanks.

      Regards 
      Christian 

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