When trying to upload a WSDL to a SOAP service using PAPI in API Explorer you receive the below error:
{
"httpStatusCode": 415,
"errorCode": -1,
"devErrorMessage": "Content type 'text/xml;charset=utf-8' not supported",
"userErrorMessage": "There was an issue on the server."
}
Release : 4.5
Component : API PORTAL
API Explorer sends the request using the wrong content type
A WSDL can be uploaded using the /api-management/1.0/apis/{uuid}/assets API. However, as API Explorer sends the wrong content-type header you will need to use an external tool to test, such as CURL.
The correct Content-type is Multipart/form-data
For example:
curl -i -X POST \
-H "Content-Type:multipart/form-data" \
-H "Origin:{Origin}" \
-H "Authorization: Bearer {token}" \
-F "files=@\"./petstore.wsdl\";filename=\"petstore.wsdl\"" \
'https://{portal host}/api/api-management/apim/api-management/1.0/apis/{uuid}/assets'