[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTTPAPI - http_post_stmf - HTTP/1.1 415 Unsupported Media



Hello Fred,

It seems that this web service doesn't allow the content-type that you are sending. You said that this web service works with SoapUI. Can you check and see which content-type is being sent by SoapUI, then change your RPG code to match?

Thanks.

On 12/17/2013 2:35 AM, Frédéric UHRY wrote:
Hello Scott

Thank you for your answer.
Please find below the debug file.
I saw that the problem should be around the content type :

sendraw(): entered
Error 415: Type text/xml&#59;charset=utf-8 not present is not a supported Content-Description

recvresp(): entered
HTTP/1.1 415 Unsupported Media Type
Date: Tue, 17 Dec 2013 08:17:58 GMT



But I guess I use a standard content type and it's the one asked by TNT.


Best regards

Fred





HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0

https_init(): entered
SetError() £25: SSL environment was already initialized§
http_setauth(): entered
http_url_post_stmf(): entered
getting post file size...
opening file to be sent...
opening file to be received
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: KUHN.LOCAL
DNS server found: 10.0.9.3
DNS server found: 10.0.9.32
DNS server found: 10.100.86.1
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 0
-----BEGIN CERTIFICATE-----
MIIFZDCCBEygAwIBAgIQHaoZhVv6Dowupb5G6lXqHDANBgkqhkiG9w0BAQUFADCB
vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug
YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt
VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X
DTEzMDgyODAwMDAwMFoXDTE0MDgy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UH
MAKGMGh0dHA6Ly9TVlJJbnRsLUczLWFpYS52ZXJpc2lnbi5jb20vU1ZSSW50bEcz
LmNlcjANBgkqhkiG9w0BAQUFAAOCAQEAEv6be5a9+6Fqm9rFWx+GWe9OGxW/+/ep
MFLYgLq8EZR9GiVzvL0onIi4D1OpAnzruLtoE1YdPywxygEZuSmzr9S2U/Wg52qZ
prenlfhYSgxyQkhueAacbfb2lUPEypJasAmWchBP+u55rHAcvbcpodHc9VC45n0y
o8bD2waigftrsZuuOv1VdpdQhCJLDMjdcm0LqCQLxy0nVA9oS4kl3RK0ipM8cUcv
VXWpL146kEJPYoxtIky8hI4SMk6lEzQxpvM0CT+6uKnHF575iTppXmjRMNbGW3yV
MWDCi98EQwu1aR0JKLgLj6hmX/odcGashN8NKbB7POfp2hizOQJptA==
-----END CERTIFICATE-----
Serial Number: 1D:AA:19:85:5B:FA:0E:8C:2E:A5:BE:46:EA:55:EA:1C
Common Name: express.tnt.com
Country: GB
State/Province: Warwickshire
Locality: Atherstone
Org Unit: TNT Express Worldwide UK Limited
Org: TNT Express ICS
Issuer CN: VeriSign Class 3 International Server CA - G3
Issuer Country: US
Issuer Org: VeriSign, Inc.
Issuer Org Unit: Terms of use at https://www.verisign.com/rpa (c)10, OU=VeriSign Trust Network
Version: 3
not before: 20130828020000
Unknown Field: 02:00:00 28-08-2013
not after: 20140830015959
Unknown Field: 01:59:59 30-08-2014
pub key alg: 1.2.840.113549.1.1.5

Protocol Used: TLS Version 1
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 2 cookies in the cache
POST /expresslabel/documentation/getlabel HTTP/1.1
Host: express.tnt.com
User-Agent: http-api/1.24
Content-Type: text/xml ; charset=UTF-8
Content-Length: 94
Authorization: Basic amVhbi1sdWMuZ3VydG5lckBrdWhuLmNvbTpNT05TV0lMTEVS
Cookie: $Version=0; BC_HA_93791c997f1cc3b4_773D3E04=23EC315; $Path=/; $Domain=.tnt.com; $Version=0; BIGipServerBluecoat_acc_pool=2502502308.20480.0000; $Path=/;


sendraw(): entered
Error 415: Type text/xml&#59;charset=utf-8 not present is not a supported Content-Description

recvresp(): entered
HTTP/1.1 415 Unsupported Media Type
Date: Tue, 17 Dec 2013 08:17:58 GMT
Server: IBM_HTTP_Server
x-wily-info: Clear guid=FFA208BF0AD2EF1545EA45EA4D56E0AE
x-wily-servlet: Encrypt1 hR/KG2GOR16aRfvv3/q1ARoV7O4jOhbhGJ4Ufv9B/0oUQOyCGbL11QgaQNHRJiEwvuTvYYgqNDl97Qqi6kSHJjDBORk9tcHuR7F8M2ApazHlQHS7CqseOQy1pNhy7t1DNJSH/QUK17SqF9XOG6pJAAIB3OqcZd5QxGBeOEf7LBacyVjnmb6I/6wc6JLm9FaW
$WSEP:
Transfer-Encoding: chunked
Content-Type: text/html;charset=UTF-8
Content-Language: en-GB
Cache-Control: proxy-revalidate
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Set-Cookie: BIGipServergb_ccc_express_label=367972874.20480.0000; path=/
Set-Cookie: BC_HA_93791c997f1cc3b4_773D3E04=23EC315; Domain=.tnt.com; expires=Tue, 17-Dec-13 08:47:58 GMT; Path=/
Set-Cookie: BIGipServerBluecoat_acc_pool=2502502308.20480.0000; expires=Tue, 17-Dec-2013 12:17:58 GMT; path=/


SetError() £13: HTTP/1.1 415 Unsupported Media Type
recvresp(): end with 415
recvdoc parms: chunked 0
header_load_cookies() entered
cookie_parse() entered
cookie =  BIGipServergb_ccc_express_label=367972874.20480.0000; path=/
cookie attr BIGipServergb_ccc_express_label=367972874.20480.0000
cookie attr path=/
cookie_parse() entered
cookie =  BC_HA_93791c997f1cc3b4_773D3E04=23EC315; Domain=.tnt.com; expires=Tue, 17-Dec-13 08:47:58 GMT; Path=/
cookie attr BC_HA_93791c997f1cc3b4_773D3E04=23EC315
cookie attr Domain=.tnt.com
cookie attr expires=Tue, 17-Dec-13 08:47:58 GMT
cookie attr Path=/
cookie_parse() entered
cookie =  BIGipServerBluecoat_acc_pool=2502502308.20480.0000; expires=Tue, 17-Dec-2013 12:17:58 GMT; path=/
cookie attr BIGipServerBluecoat_acc_pool=2502502308.20480.0000
cookie attr expires=Tue, 17-Dec-2013 12:17:58 GMT
cookie attr path=/
recvchunk(): entered
get_chunk_size(): entered
60

chunk size = 96
get_chunk_size returned 96
calling comm_blockread
Error 415: Type text/xml &#59; charset=utf-8 not present is not a supported Content-Description

comm_blockread returned 96


get_chunk_size(): entered
0

chunk size = 0
get_chunk_size returned 0
SetError() £13: HTTP/1.1 415 Unsupported Media Type
http_close(): entered

--------------------------------------------------------------
This email is intended only for use by the addresse(s) named in the message, and may contain confidential information. If you are not the intended recipient of this email message, any distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify the sender immediately. The integrity and security of this message can not be guaranteed on the Internet. Although KUHN operates anti-virus programs, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------