I have some content coming from a byte[] which stands for the data from the request which gets saved to a .txt file.
try {
while ((bytesRead = streamFromClient.read(currentRequest)) != -1) {
LOG.info("Received request...");
addInvoiceRequestOnly();
streamToServer.write(currentRequest, 0, bytesRead);
streamToServer.flush();
dumpTrafficToFile();
}
} catch (IOException e) {
LOG.severe("Could not read/write from/to the request...");
e.getStackTrace();
}
POST /domibus/services/...
Host: domibusbackend
Connection: close
Content-Length: 16189
Content-Type: multipart/related; type="application/soap+xml"; boundary="uuid:6b5b42a6-ea2f-4830-84c3-c799f38ca32a"; start="<root.message@cxf.apache.org>"; start-info="application/soap+xml"
Accept: */*
User-Agent: Apache-CXF/3.3.2
Cache-Control: no-cache
Pragma: no-cache
.........
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <53c6399c-a6b1-4ffa-9c85-d8b7bb337f28@www.someDomain.com>
CompressionType: application/gzip
MimeType: application/xml
†’^tÜ:–jq®Z{€Üş˝`cWłÓx˘ěxĐWé"v«8-ňBStÂá›Ë+•jnCćcv‰v2—ťř‘÷ż÷ ĺůéűI˝sJá@Vzľ¸…“ߟ¤Ž2]§yÁbů,m ĺgٱťŠ¸áĐĽ<í.ÖÚeGü®î…Č>
-b¶öG BD,[âŤţ*^lJĘ@DLŃ%Ó:°Ě¸ÉÇVťäś(ăÉÁSy¨±ă“˙řµÁ¨žńˇęÁŽ‚GyvSĄ Ąeě$EI‡*0ĎEĽ•(Ú/{ôđ:d?ćŢ6Agަ ?ý+𣔣bÁË:˛×í„EQT·
ł/0Ž!ÂŚ6öpqÚ[Q˛ä–ů'0]
ŢfĎgÓŤß7ü–ඤşÔř»?É€“}%ů†Z/€ęŃ·b÷ĂR
żŇ’!|…q· FÉ2ľÎöDÎ>ÖËY)hşk’
łÍĚäŕ„ę+
ă6ţwÇäŘöpŻŞŁ¬tµŢp&ŁK?„8îIč™U\Ä_j)Q“˝QI·čOŽ|ż/Żl±MÁŔµ¤·c{ëŇś¸űXďß%yň¤¨CŇ1ÂĎVÜÝÁwăł[Ť
ťÔ‹Ń(µ[
p]r1Żq{0Ů7ęŐGGżX"˘ćŇÇgj*TRĽĺ*Ă@@ŐÖKąĐ•ľe7ąWöVĺ:çĂŢnHöT}ł•ť!dĂô¬ZTz'ÝS.¤öX×čÜť9ܰ™ô-Ue#xÚ–LL‡
í
‹Uĺ×Tśü«$tĚ
Can somebody tell me how can I convert this data to human readable data? It sais in the header that it should be binary, but it is not, binary data looks different. I got a lot of readable data from the request but the last part, the one that you see is that alien thing which I don't know how to decode it... If somebody can help me with this I'd appreciate it. Thank you!