wso2 api - Cannot retrieve response with content type [application/xml]

Viewed 51

I've created an api which uses http azure function as endpoint and once the api is invoked I return the response of xml type but it throws an error

" <am:description>Cannot retrieve response with content type [application/xml]</am:description>" 

when I execute it via WSO2 API dev portal.

could someone help me to figure out where it goes wrong or is there any document for help? below is my api definition

/processdata:
    post:
      consumes:
        - application/xml
      produces:
        - application/xml
      parameters:
        - in: body
          name: input
          description: Request data
          required: false
          schema:
            type: object
            properties:
              input:
                type: string
      responses:
        '200':
          description: ok
1 Answers

It seems that you'll need to debug this situation to move forward. Here are some suggestions:

  1. Review the apim logs to see if that has any more information that might help.
  2. If 1) didn't help then dig in deeper with Wire Logs.

Use of Wire Logs will allow you to see what the incoming payload load is like before APIM does anything with it. From there you can see if this is really xml or something else like json and adjust things from there.

Related