Page 1 sur 1

AXIS (axiscTransportReceive) et flux pdf

Posté : jeu. 12 nov. 2020, 11:08:34
par Athalaric44
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....

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : jeu. 12 nov. 2020, 13:48:57
par cmasse
Jamais rencontré ce prb.... ça relèverait pas plutôt du point service ?

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : jeu. 12 nov. 2020, 14:18:00
par Athalaric44
Bonjour M. Masse,

vous même avez vous déjà utilisé AXIS pour recevoir les données d'un .pdf avec succès ?
Juste pour savoir si en théorie c'est faisable ou si on doit chercher une autre méthode...

Bien Cordialement.

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : jeu. 12 nov. 2020, 16:48:56
par cmasse
non, que du texte XML/JSON etc....

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : jeu. 12 nov. 2020, 16:56:10
par cmasse
Mais sur le principe vous avez raison, il faut désactiver la conversion vers le CCSID du job, 'ça doit donc être possible https://www.ibm.com/support/pages/send- ... lient-apis

et je vois des PTF sur axiscTransportReceive()....

quelle est votre version ? votre niveau de PTF (sur DG1) ?

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : jeu. 12 nov. 2020, 17:29:44
par Athalaric44
Effectivement il y a tout un tas de ptf sur axiscTransportReceive :?

Je ne suis pas très calé en ptf, voici les infos que j'ai :

ID produit . . . . . . . . . . . . . : 5770DG1
Edition de l'option de base . . . . . : V7R3M0

ID
PTF Etat
SI73501 Appliquée provisoirement

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : ven. 13 nov. 2020, 08:25:15
par Athalaric44
Apparemment nous sommes au level 26 des ptfs, le plus haut.

Re: AXIS (axiscTransportReceive) et flux pdf

Posté : ven. 13 nov. 2020, 08:28:30
par Athalaric44
Cette ligne de log m'a interpellé :

12/11/2020 10:52:52:571 00002146 transport D TCPChannel::readBytes(): Read-side of socket has been closed.

du coup j'ai passé la propriété AXISC_PROPERTY_IO_TIMEOUT à 10 secondes et maintenant ça plante :

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 18:27:55:345 00001413 transport < TCPChannel::readBytes(): Exit with integer value of 8944
12/11/2020 18:27:55:345 00001413 transport > HTTPTransport::processHTTPHeader():
12/11/2020 18:27:55:350 00001413 transport < HTTPTransport::processHTTPHeader():
12/11/2020 18:27:55:350 00001413 transport < HTTPTransport::readHTTPHeader():
12/11/2020 18:27:55:350 00001413 transport > HTTPTransport::getBytes_MessageIsChunked():
12/11/2020 18:27:55:351 00001413 transport D HTTPTransport::getBytes_MessageIsChunked(): reading next chunk
12/11/2020 18:27:55:351 00001413 transport > HTTPTransport::getChunkSize():
12/11/2020 18:27:55:351 00001413 transport D HTTPTransport::getChunkSize(): chunk size is: 8080
12/11/2020 18:27:55:351 00001413 transport < HTTPTransport::getChunkSize(): Exit with integer value of 8080
12/11/2020 18:27:55:351 00001413 transport D HTTPTransport::getBytes_MessageIsChunked(): Bytes available to be consumed within chunk: 8080
12/11/2020 18:27:55:351 00001413 transport > HTTPTransport::getNextDataPacket():
12/11/2020 18:27:55:351 00001413 transport > TCPChannel::readBytes():
12/11/2020 18:27:55:351 00001413 transport > TCPChannel::applyTimeout():
12/11/2020 18:28:05:382 00001413 transport < TCPChannel::applyTimeout(): Exit with integer value of 0
12/11/2020 18:28:05:382 00001413 transport X TCPChannel::readBytes(): Line=421: File=/build/axiscpp/src/ws-axis/c/src/transport/TCPChannel/TCPChannel.cpp:
HTTPTransportException - SERVER_TRANSPORT_TIMEOUT_EXPIRED: Read operation timed-out while waiting for data.
12/11/2020 18:28:05:382 00001413 transport < TCPChannel::readBytes():
12/11/2020 18:28:05:383 00001413 engine < axiscTransportReceive():
12/11/2020 18:28:07:021 00001413 engine > axiscTransportDestroy():
12/11/2020 18:28:07:021 00001413 transport > HTTPTransport::¨HTTPTransport():
12/11/2020 18:28:07:021 00001413 engine > ChannelFactory::UnLoadChannelLibrary():
12/11/2020 18:28:07:021 00001413 transport > TCPChannel::¨TCPChannel():
12/11/2020 18:28:07:021 00001413 transport > TCPChannel::close():
12/11/2020 18:28:07:022 00001413 transport < TCPChannel::close():
12/11/2020 18:28:07:022 00001413 transport < TCPChannel::¨TCPChannel():
12/11/2020 18:28:07:022 00001413 engine < ChannelFactory::UnLoadChannelLibrary(): Exit with boolean false
12/11/2020 18:28:07:022 00001413 transport < HTTPTransport::¨HTTPTransport():
12/11/2020 18:28:07:022 00001413 engine > uninitialize_module():
12/11/2020 18:28:07:022 00001413 engine < uninitialize_module(): Exit with return code of AXIS_SUCCESS
12/11/2020 18:28:07:022 00001413 engine < axiscTransportDestroy():