Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

issue with Invalid UTF-8 start byte 0x8b (at char #2, byte #-1) Mule ESB

I have created Mule ESB project that invokes third party web service using web service consumer.

Passing custom security header information using property

Used transformation xslt to transform input message from source to target.

There is no transformation in output. Only DOM to XML node is added in output

Can any one provide me solution on this issue?

I am getting the below exception when invoking the service.

Exception stack is:

  1. Invalid UTF-8 start byte 0x8b (at char #2, byte #-1) (java.io.CharConversionException) com.ctc.wstx.io.UTF8Reader:303 (null)

  2. Invalid UTF-8 start byte 0x8b (at char #2, byte #-1) (com.ctc.wstx.exc.WstxIOException) com.ctc.wstx.stax.WstxInputFactory:550 (null)

  3. Couldn't parse stream. (java.lang.RuntimeException) org.apache.cxf.staxutils.StaxUtils:1262 (null)

  4. Invalid UTF-8 start byte 0x8b (at char #2, byte #-1).

like image 362
JP123 Avatar asked Oct 22 '25 06:10

JP123


1 Answers

This issue may happen if that third party web service that you request to provides gzip-encoded response i.e.

HTTP/1.1 200 OK
Content-Type: text/xml;charset="utf-8"
Content-Encoding: gzip
Content-Length: 324

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>...

In this case you need to use some kind of interceptor that decodes the response.

like image 67
dmitry747 Avatar answered Oct 25 '25 03:10

dmitry747



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!