Mike,

I've tried using reflection to look at private fields on WOMessage and
WORequest, but I don't see anything with _content.

I was able to use the following method to get content length, however
I am not sure if this is the same as what you asked me to find.
aRequest._contentLengthHeader() // always returns a number value.

Anytime I invoke 'aRequest.contentString()' or '.content()' it seems
to throw me the 'amount read didn't match' exception.

Here is my code.
-----------------
final Field fields[] =
                WOMessage.class.getFields();
            for (int i = 0; i < fields.length; ++i) {
                fields[i].setAccessible(true);
                System.out.println("Field: " + fields[i]);
                 if (fields[i].getName().startsWith("_content")) {
                        System.out.println("Field: found content ");
                        System.out.println(
                            fields[i].get(aRequest));
                        break;
                      }
                
        
            }

Repeated the same thing with java.lang.reflect.Methods but didn't find anything.
----------------

Please let me know if I'm looking at the wrong classes/objects for _content.

Thanks,
Mukesh.

On Wed, Mar 18, 2009 at 12:45 PM, Mike Schrag <[email protected]> wrote:
>> Is this the WOMessage content length problem we found a couple of days
>> ago?  I'm not sure if that was a problem in 5.4 or not.
>
> Certainly sounds similar, and it appears that it's wrong in 5.4 ...
>
> Mukesh -- If you want to confirm the problem, you add some debug to your app
> and before the failure, print out:
>
> message._content.length()
>
> and compare it to
>
> message._content.toString().getBytes(message.contentEncoding());
>
> Pretty sure message._content is not public and isn't directly returned, so
> you might need to access it with reflection and do a
> field.setAccessible(true).
>
> ms
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to