Hi. Trying to carry out a simple test of the REST service, I have executed the example program WATSONTR2R with the error (415). The apikey is correct. The url is correct. The JSON sent is correct. Verified with SOAPUI. The program is the same. I have only modified the url and apikey, obviously. Value in Request -> {"source":"es","target":"en","text":["Buenos dias"]} Code: http_debug(*on: '/tmp/watson-diagnostic-log.txt'); http_setOption('local-ccsid': '0'); http_setOption('network-ccsid': '1208'); HTTP_setDebugLevel(2); http_setAuth( HTTP_AUTH_BASIC : 'apikey' : '-my-apikey-' ); url= '' + 'instances/cca8a66c-212e-4994-8a55-f8f61d49ca9a' + '/v3/translate?version=2018-05-01'; monitor; response = http_string('POST': url: request: 'application/json'); on-error; httpcode = http_error(); endmon; /tmp/watson-diagnostic-log.txt HTTPAPI Ver 1.43 released 2021-04-19 NTLM Ver 1.4.0 released 2014-12-22 OS/400 Ver V7R1M0 New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819. ProtLoc=0 New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819. ProtLoc=0 2021-05-03-10.14.12.303000: http_setauth(): entered 2021-05-03-10.14.12.303000: http_persist_open(): entered 2021-05-03-10.14.12.303000: http_long_ParseURL(): entered 2021-05-03-10.14.12.303000: DNS resolver retrans: 2 2021-05-03-10.14.12.303000: DNS resolver retry : 2 2021-05-03-10.14.12.303000: DNS resolver options: x'00000136' 2021-05-03-10.14.12.303000: DNS default domain: ISOLANA.LOCAL 2021-05-03-10.14.12.303000: DNS server found: 192.168.1.12 2021-05-03-10.14.12.303000: DNS server found: 192.168.1.12 2021-05-03-10.14.12.303000: DNS server found: 8.8.8.8 2021-05-03-10.14.12.303000: Resolving host api.eu-gb.language-translator.watson.cloud.ibm.com 2021-05-03-10.14.12.303000: inet_addr return value for this host is 4294967295 2021-05-03-10.14.12.346000: gethostbyname() returned 34937049 2021-05-03-10.14.12.346000: Looking up service https 2021-05-03-10.14.12.346000: Service table returns port 443 2021-05-03-10.14.12.346000: Nagle's algorithm (TCP_NODELAY) disabled. 2021-05-03-10.14.12.356000: SNI hostname set to: api.eu-gb.language-translator.watson.cloud.ibm.com 2021-05-03-10.14.12.431000: (GSKit) Sistema igual no reconocido o recibido mensaje mal formateado. 2021-05-03-10.14.12.431000: ssl_error(415): (GSKit) Sistema igual no reconocido o recibido mensaje mal formateado. 2021-05-03-10.14.12.431000: SetError() Ñ30: SSL Handshake: (GSKit) Sistema igual no reconocido o recibido mensaje mal format 2021-05-03-10.14.12.431000: http_close(): entered |
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi