[jboss-as7-dev] Moved the DMR GWT lib

Heiko Braun hbraun at redhat.com
Fri Mar 18 03:36:52 EDT 2011


The upper part is the operation (request) send to the http api.
the base64 part is the encoded response. you should be able to reproduce it 
like this:

1.) start jboss7 in domain mode
2.) curl -H "Accept:application/dmr-encoded" http://localhost:9990/domain-api/profile/default


But you are right, there seems to be something strange going on.
I get a different encoded string this time.

Let me double check first. Maybe the error is my side (very likely)

Ike

On Mar 18, 2011, at 2:12 AM, Jonathan Pearlin wrote:

> Hi Heiko,
> 
>     Something odd is definitely going on here.  First, from what I can tell the two values you added to the gist are not equal (the plain text DMR string to does not produce that Base64 string).  Second, it appears that the Base64 encoded string is cut off (when I decode it using some external tools, the resultant plain text does not look like a complete string, based on the fact that what I assume is the value "localhost" is cut off as "loca").  Regardless, it does appear that the issue is due to the fact that readUTF requests to read more bytes than are available in the stream.  Because the underlying Base64 stream must decode the data on the fly when read() is called, it is possible that the requested number of bytes does not equal the actual remaining number of bytes after decoding (this is obviously an edge case that needs to be corrected).  However, I am still not sure if the issue is due to the stream code or the fact that the Base64 encoded string appears to be incomplete.  How was the Base64 value generated?  Do you have the original DMR string that generated it?  I would like to run the original DMR string through the Base64 encoder in the jboss-dmr project to see what it produces to verify that we are getting well-formed Base64 encoded strings in the first place.
> 
> Thanks,
> 
> --Jonathan
> 
> On Thu, Mar 17, 2011 at 10:27 AM, Heiko Braun <hbraun at redhat.com> wrote:
> 
> 
> Thanks for your help Jonathan,
> I've attached it to the previously created gist:
> 
> https://gist.github.com/872328
> 
> /Heiko
> 
> On Mar 17, 2011, at 1:47 PM, Jonathan Pearlin wrote:
> 
>> I can dig into this as well (since it is probably my fault!).  Can you provide the DMR string in question that you are trying to convert/encode?
>> 
>> Thanks,
>> 
>> --Jonathan
>> 
>> On Thu, Mar 17, 2011 at 12:40 AM, Jason Greene <jgreene at redhat.com> wrote:
>> It could be a bug in a recently contributed base64 routine on the server end. You can try reverting back to the original base64 impl. I can look into it when I get back on the weekend.
>> 
>> Sent from my iPad
>> 
>> On Mar 16, 2011, at 4:12 AM, Heiko Braun <hbraun at redhat.com> wrote:
>> 
>> > Jason, I've moved the DMR lib to the console codebase:
>> > https://github.com/jbossas/console/tree/master/standalone/src/main/java/org/jboss/dmr
>> >
>> > However when I invoke it the Base64 decoding fails:
>> > https://gist.github.com/872328
>> >
>> >
>> > Any idea what might be causing this?
>> >
>> > /Ike
>> > _______________________________________________
>> > jboss-as7-dev mailing list
>> > jboss-as7-dev at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> 
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20110318/576e77c0/attachment.html 


More information about the jboss-as7-dev mailing list