AXIS (axiscTransportReceive) et flux pdf
Posté : jeu. 12 nov. 2020, 11:08:34
Bonjour,
pour consommer des services Web Java depuis l'AS400 nous utilisons AXIS.
Cela fonctionne parfaitement quand le flux retourné et du Json ou du XML.
Maintenant nous essayons de recevoir les données d'un document .pdf et là, ça ne fonctionne pas.
La fonction axiscTransportReceive récupère bien le premier "chunk" du flux .pdf :
12/11/2020 10:51:52:563 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 851
12/11/2020 10:51:52:563 00002146 transport > HTTPTransport::processHTTPHeader():
12/11/2020 10:51:52:564 00002146 transport < HTTPTransport::processHTTPHeader():
12/11/2020 10:51:52:564 00002146 transport < HTTPTransport::readHTTPHeader():
12/11/2020 10:51:52:564 00002146 transport > HTTPTransport::getBytes_MessageIsChunked():
12/11/2020 10:51:52:564 00002146 transport D HTTPTransport::getBytes_MessageIsChunked(): reading next chunk
12/11/2020 10:51:52:564 00002146 transport > HTTPTransport::getChunkSize():
12/11/2020 10:51:52:564 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:51:52:564 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:51:52:564 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:51:52:564 00002146 transport D TCPChannel::readBytes():
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1f90
%PDF-1.4
%??4 0 obj <</Filter/FlateDecode/Length 7128>>stream
x?????????????????D`F????÷pUW???N&"??????????????u7????_?????x???ùj8????????W?7???????????????7??????"z?T??[?????g?.?)x??q:???<???cK?t??^?6??????Ic?;??qT?l???'???#/????9xy$C???????????????a??
_ßa???T5?^??h?S????5?O?!0Nm???o????????????`??Rbx???qZ4???????:??12/11/2020 10:51:52:565 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 8093
12/11/2020 10:51:52:565 00002146 transport D HTTPTransport::getNextDataPacket(): Number of bytes read: 8093
12/11/2020 10:51:52:565 00002146 transport D HTTPTransport::getNextDataPacket(): Total number of bytes in transport object: 607
12/11/2020 10:51:52:568 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 8093
12/11/2020 10:51:52:569 00002146 transport D HTTPTransport::getChunkSize(): chunk size is: 8080
12/11/2020 10:51:52:569 00002146 transport < HTTPTransport::getChunkSize(): Exit with integer value of 8080
12/11/2020 10:51:52:569 00002146 transport D HTTPTransport::getBytes_MessageIsChunked(): Bytes available to be consumed within chunk: 8080
mais ensuite elle perd les pédales et se met a boucler...
12/11/2020 10:51:52:569 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:51:52:569 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:51:52:569 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:568 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:568 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:568 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:569 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:52:52:569 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:52:52:569 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:569 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:570 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:570 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:570 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:52:52:570 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:571 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:571 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:571 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:52:52:571 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:572 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:572 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:572 00002146 transport > HTTPTransport::getNextDataPacket():
J'ai tenté de supprimer la conversion utf-8 en mettant la propriété AXISC_PROPERTY_CONVERT_PAYLOAD à false mais sans succès...
Je n'arrive pas à savoir d'où vient le problème....
pour consommer des services Web Java depuis l'AS400 nous utilisons AXIS.
Cela fonctionne parfaitement quand le flux retourné et du Json ou du XML.
Maintenant nous essayons de recevoir les données d'un document .pdf et là, ça ne fonctionne pas.
La fonction axiscTransportReceive récupère bien le premier "chunk" du flux .pdf :
12/11/2020 10:51:52:563 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 851
12/11/2020 10:51:52:563 00002146 transport > HTTPTransport::processHTTPHeader():
12/11/2020 10:51:52:564 00002146 transport < HTTPTransport::processHTTPHeader():
12/11/2020 10:51:52:564 00002146 transport < HTTPTransport::readHTTPHeader():
12/11/2020 10:51:52:564 00002146 transport > HTTPTransport::getBytes_MessageIsChunked():
12/11/2020 10:51:52:564 00002146 transport D HTTPTransport::getBytes_MessageIsChunked(): reading next chunk
12/11/2020 10:51:52:564 00002146 transport > HTTPTransport::getChunkSize():
12/11/2020 10:51:52:564 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:51:52:564 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:51:52:564 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:51:52:564 00002146 transport D TCPChannel::readBytes():
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1f90
%PDF-1.4
%??4 0 obj <</Filter/FlateDecode/Length 7128>>stream
x?????????????????D`F????÷pUW???N&"??????????????u7????_?????x???ùj8????????W?7???????????????7??????"z?T??[?????g?.?)x??q:???<???cK?t??^?6??????Ic?;??qT?l???'???#/????9xy$C???????????????a??
_ßa???T5?^??h?S????5?O?!0Nm???o????????????`??Rbx???qZ4???????:??12/11/2020 10:51:52:565 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 8093
12/11/2020 10:51:52:565 00002146 transport D HTTPTransport::getNextDataPacket(): Number of bytes read: 8093
12/11/2020 10:51:52:565 00002146 transport D HTTPTransport::getNextDataPacket(): Total number of bytes in transport object: 607
12/11/2020 10:51:52:568 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 8093
12/11/2020 10:51:52:569 00002146 transport D HTTPTransport::getChunkSize(): chunk size is: 8080
12/11/2020 10:51:52:569 00002146 transport < HTTPTransport::getChunkSize(): Exit with integer value of 8080
12/11/2020 10:51:52:569 00002146 transport D HTTPTransport::getBytes_MessageIsChunked(): Bytes available to be consumed within chunk: 8080
mais ensuite elle perd les pédales et se met a boucler...
12/11/2020 10:51:52:569 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:51:52:569 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:51:52:569 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:568 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:568 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:568 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:569 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:52:52:569 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:52:52:569 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:569 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:570 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:570 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:570 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:52:52:570 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:571 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:571 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:571 00002146 transport > HTTPTransport::getNextDataPacket():
12/11/2020 10:52:52:571 00002146 transport > TCPChannel::readBytes():
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Using non-SSL input stream.
12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.
12/11/2020 10:52:52:572 00002146 transport < TCPChannel::readBytes(): Exit with integer value of 0
12/11/2020 10:52:52:572 00002146 transport < HTTPTransport::getNextDataPacket(): Exit with integer value of 0
12/11/2020 10:52:52:572 00002146 transport > HTTPTransport::getNextDataPacket():
J'ai tenté de supprimer la conversion utf-8 en mettant la propriété AXISC_PROPERTY_CONVERT_PAYLOAD à false mais sans succès...
Je n'arrive pas à savoir d'où vient le problème....