wso2wso2-stratoswso2-cloud

WSO2 API Cloud Issue


I hope you can help me with WSO2 API Cloud.

I have a sample app that adds two float numbers in WSO2 app cloud. Below are the details:

Endpoint: http://jab7180-sample-calc.wso2apps.com/client/calculate/add/10/20

Output: 30.0

My problem is I'm having problem calling my API after publishing to WSO2 API Cloud. The response body is no content, response code is 0, and response header is no response from server.

This is how I published my API in WSO2 API Cloud using the endpoint above:

Name: calculator

Context: /compute

version: 1.0.0

visibility: public

URL pattern: client/calculate/add/{x}/{y} where verb is GET.

Production Endpoint: http://jab7180-sample-calc.wso2apps.com

Subscription tiers: Unlimited


Solution

  • We found the issue. There is a problem with defining URI params with single-character parameters. As a workaround, please define your resource with different parameters. Ex: /client/calculate/add/{xx}/{yy}

    Also, you have to set the "Produces" attribute for the resource as "application/xml" since the default value is "application/json" and is not supported by your backend.

    Please refer the screenshot below and define your API resource, and republish the API.

    enter image description here