Axis SOAP request failed.; nested exception is: java.lang.ClassCastException: [B
the issue: i came across a client that was using an ESB to send over requests to a web service that responded fine when the request was sent using soapui (and poster on firefox) but got the following error from the requests sent by it’s ESB:
note: the exception above looks a little strange only because it is a “general exception format” used by the ESB when it cannot determine the fault format from the web service’s WSDL.
what we did was setup tcpmon to capture the request and response messages in their entirety.
the following is what we found in the response header:
both of the above settings were not supported by the ESB.
all we were returning was a standard xml soap response (no attachments or binary data). so the content-type and transfer-encoding were changed to be simpler (removing the multipart/related and undesignating as binary) and the ESB could now communicate with the web service.
i haven’t encountered this in any context BUT i’m hoping this will help you if you encounter something similar. especially since it may simply be that your response is returning the content with inappropriate header info (or at least ones unsupported/disliked by the requesting client).