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*
*SOAPAction:
https://amsqa.arifleet.com/Finance/AMSService/Asset.svc/secure*
*Expect: 100-continue*
*Content-Length: 1013*
*SOAPAction:
http://www.odessatechnologies.com/LW/ServiceSchema/IGenericVendorProfile/Save*
*recvresp(): entered*
*HTTP/1.1 100 Continue*
*SetError() #13: HTTP/1.1 100 Continue*
*senddoc(): entered*
*<?xml version="1.0" encoding="UTF-8" standalone="yes"
?><soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:tem="http://tempuri.org/"xmlns:ari="http://schemas.datacontract.org/2004/07/ARI.AMS.Domain
<http://www.w3.org/2003/05/soap-envelope%22xmlns:tem=%22http://tempuri.org/%22xmlns:ari=%22http://schemas.datacontract.org/2004/07/ARI.AMS.Domain>"
xmlns:ari1="ARI.AMS.Domain"xmlns:ari2="ARI.AMS.Domain.Person"xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays"xmlns:ari3="ARI.AMS.Domain.ARIVehicle"xmlns:ari4="http://schemas.datacontract.org/2004/07/ARI.AMS.Data.Model"><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>
<o:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">lldjsrf43b5i43ub543abcd</o:Password></o:UsernameToken
<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText%22%3Elldjsrf43b5i43ub543abcd%3C/o:Password%3E%3C/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>*
*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"?>'+
>
> '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"'+
>
> 'xmlns:tem="http://webdefence.global.blackspider.com/urlwrap/?q=AXicE2
> RleLubgeHvZgaGopxKQ4t0veKiMr3cxMyc5Py8kqL8HL3k_FyGcmMzH5dSNydDA2Njc2OG
> lNzUvPTUYofEosy0nNTUErCajJKSAit9_ZLU3ILSoky9_KJ0fQYGBtc1DAwAqJkgzA&Z"'
> +
>
> 'xmlns:ari="http://schemas.datacontract.org/2004/07/ARI.AMS.Domain" +
>
> xmlns:ari1="ARI.AMS.Domain"'+
>
> 'xmlns:ari2="ARI.AMS.Domain.Person"'+
>
> 'xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
> '+
>
> 'xmlns:ari3="ARI.AMS.Domain.ARIVehicle"'+
>
> 'xmlns:ari4='+
>
> '"http://schemas.datacontract.org/2004/07/ARI.AMS.Data.Model">'+
>
> '<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> '+
>
> '<o:Password Type="http://docs.oasis-'+
>
> '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
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx <mailto:Ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
http://scottklement.com/mailman/listinfo/ftpapi