|
According to the source in trunk the deserializaton is only attempted when the returnClass is not the default byte[]. By default no deserialization should be attempted; if it is that's a bug. Still, by default it should handle non-object byte[]s just fine. See GZipTransformerTestCase where this is used.
I added another test case explicitly for a regular raw byte[] in r6167. Brian, please let us know how to proceed with this since it does not seem to be a bug, at least not in 1.4.0 or trunk/1.4.1.
My source was a text document compressed by cygwin's gzip command. Here is the stacktrace. Stepping through the debug in eclipse, I see that getReturnClass() returns "java.lang.Object". buffer.getClass() returns "class [B". I'm using the latest released 1.4 - I downloaded it yesterday.
My config is: <!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN" <mule-configuration id="Mule_Echo_Sample" version="1.0"> <description> To invoke the EchoUMO component as a webservice hit the To view the WSDL for the EchoUMO service go to - <!-- <transformers> <!-- The binary characters clogged up the windows clipboard. Here is the rest the stacktrace with offending characters left out.
Please run with org.mule.* set to DEBUG so that we see where and why Object is set as return type. There is something else going on but that is missing from the stack trace. Please also try to put a breakpoint on setReturnClass.
Brian, please provide the debugging output Holger requests. I'm afraid without your input we won't be able to help you.
No feedback for a long time - closing.
I've got the same problem at this moment.
In the mule-configuration.dtd I found the following: <!-- This makes clear why not the byte[] (as specified in the transformers constructor) is used but the java.lang.Object. Wow - you are right, the bug does show up when used in a configuration as the DTD default value is plastered over the transformer. Thanks for finding this.
Right away I am not entirely sure what to do as Object is the default returnClass anyway - maybe just removing the default from the DTD will leave the poor transformer instance alone, but I don't know if there are any side effects to this. In any case we'll look into it. Changing from task to bug since that's what it is.
moving updates to new issue
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
As for the implementation of the gzip transformers I'd suggest dropping the serialization functionality. As transformers can be chained I would vote for much finer grained transformers. As with unix toosl - have one tool (transformer) perform one task correctly and chain them together to achieve what you're trying to do.