Google Groups Home
Help | Sign in
Patch for easier spotting of invalid data in SOAP requests
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Christoph_Petschnig  
View profile
 More options Jun 11, 4:42 am
From: Christoph_Petschnig <lcolo...@gmail.com>
Date: Wed, 11 Jun 2008 01:42:28 -0700 (PDT)
Local: Wed, Jun 11 2008 4:42 am
Subject: Patch for easier spotting of invalid data in SOAP requests
Hello!

When you have invalid data in your SOAP request, it's sometimes hard
to spot the location. This patch helps a lot. It forwards the
exception trough the parsing tree and adds the branch to the exception
message.

File lib/soap/baseData.rb, starting with line 615

  def each
    idx = 0
    while idx < @array.length
      begin
        yield(@array[idx], @data[idx])
      rescue Exception => e
        e2 = e.class.new
        class <<e2
          attr_accessor :original_message
          attr_accessor :path
        end
        e2.original_message = e.methods.include?("original_message") ?
e.original_message : e.message
        e2.path = @array[idx] + (e.methods.include?("path") ? '/' +
e.path : '')
        raise e2.exception(e2.original_message + " in #{e2.path}")
      end
      idx += 1
    end
  end

Sorry, I have no diff/patch tool avaliable at the moment.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google