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

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://tempuri.org/";'+

'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
http://scottklement.com/mailman/listinfo/ftpapi