Scott,
Thank you so much for your response and for explaining the origin and cause of this error. Made the change and finally got passed the 415 error message. Now getting a 400 error message. I assume this means that there is something their server is not
liking about the soap request.
Protocol Used: TLS Version 1
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /Finance/AMSService/Asset.svc/secure HTTP/1.1
Host: amsqa.arifleet.com
User-Agent: http-api/1.23
Content-Type: application/soap+xml; charset=utf-8
Expect: 100-continue
Content-Length: 1013
recvresp(): entered
HTTP/1.1 100 Continue
SetError() #13: HTTP/1.1 100 Continue
senddoc(): entered
recvresp(): entered
HTTP/1.1 400 Bad Request
Cache-Control: private
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 06 Apr 2018 21:21:51 GMT
Content-Length: 0
SetError() #13: HTTP/1.1 400 Bad Request
recvdoc parms: identity 0
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
SetError() #13: HTTP/1.1 400 Bad Request
http_close(): entered
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [
mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, April 06, 2018 5:13 PM
To: FTPAPI/HTTPAPI mailing list
Subject: Re: [Ftpapi] HTTP/1.1 415 Cannot process the message error
Debra,
One of the parameters you're passing has 'text/xml; charset=utf-8', the error message seems to be saying that you should use 'application/soap+xml; charset=utf-8'.
Note that this message does NOT come from HTTPAPI, it comes from the server you are connecting to. If you have questions about why they are sending this message, it'd make sense to contact them. But, the message seems pretty clear that they expect the
soap+xml content type (which implies they are using SOAP 1.2 -- this version never became popular, so that is a bit of a surprise... but, whatever, if you sent it correctly, it should work fine.)
-SK
On 4/6/2018 3:08 PM, Menges, Debra wrote:
>
> Hello,
>
> Would really appreciate some assistance with this error message.
>
> Working on a soap request web service and receiving the following message:
>
> *HTTP/1.1 415 Cannot process the message because the content type
> 'text/xml; charset=utf-8' was not the expected type
> 'application/soap+xml; charset=utf-8'*
>
> This is the RPG soap message and request.
>
> //--------------------------------------------------------------------
> --
>
> // Create soap envelope
>
> //--------------------------------------------------------------------
> --
>
> begsrCreateSoap;
>
> Soap =
>
> '<?xml version="1.0" encoding="UTF-8"?>'+
>
>
> 'xmlns:tem="http://webdefence.global.blackspider.com/urlwrap/?q=AXicE2
> RleLubgeHvZgaGopxKQ4t0veKiMr3cxMyc5Py8kqL8HL3k_FyGcmMzH5dSNydDA2Njc2OG
> lNzUvPTUYofEosy0nNTUErCajJKSAit9_ZLU3ILSoky9_KJ0fQYGBtc1DAwAqJkgzA&Z"'
> +
>
>
> xmlns:ari1="ARI.AMS.Domain"'+
>
> 'xmlns:ari2="ARI.AMS.Domain.Person"'+
>
> '+
>
> 'xmlns:ari3="ARI.AMS.Domain.ARIVehicle"'+
>
> 'xmlns:ari4='+
>
>
> '<soap:Header>'+
>
> '<o:Security s:mustUnderstand="1"'+
>
> 'xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-'+
>
> 'wss-wssecurity-secext-1.0.xsd" xmlns:s="s"> <o:UsernameToken>'+
>
> '<o:Username>TEST_AMS</o:Username> '+
>
>
> 'open.org/wss/2004/01/oasis-200401-wss-username-token-profile-'+
>
> '1.0#PasswordText">lldjsrf43b5i43ub543abcd</o:Password>'+
>
> '</o:UsernameToken> '+
>
> '</o:Security></soap:Header>'+
>
> '<soap:Body>'+
>
> '<tem:SearchPerson>'+
>
> '<!--Optional:-->'+
>
> '<tem:person>'+
>
> '<ari:DriverId>506152</ari:DriverId>'+
>
> '</tem:person>'+
>
> '</tem:SearchPerson>'+
>
> ' </soap:Body>'+
>
> '</soap:Envelope>';
>
> endsr;
>
> //--------------------------------------------------------------------
> --
>
> // Post request
>
> //--------------------------------------------------------------------
> --
>
> begsrPostRequest;
>
> soapData =%addr(SOAP:*data);
>
> soapDataLength =%len(SOAP);
>
> elemStartProc =*null;
>
> elemEndProc =%paddr(GetResponse);
>
> userData =%addr(response);
>
> returnCode =http_url_post_xml(postURL
>
> :soapData
>
> :soapDataLength
>
> :elemStartProc
>
> :elemEndProc
>
> :userData
>
> :HTTP_TIMEOUT
>
> :HTTP_USERAGENT
>
> :'text/xml; charset=utf-8'
>
> :postURL);
>
> endsr;
>
> The httpapi_debug.txt file is attached.
>
> Some of the documentation I found indicates that it may be a binding
> issue but have not found an appropriate solution.
>
> Regards,
>
> Debra
>
>
>
--
_______________________________________________
Ftpapi mailing list