WSO2 API Cloud Issue

99 Views Asked by At

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

2

There are 2 best solutions below

0
Lakmali Erandi Baminiwatta On BEST ANSWER

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

0
Bee On

From https://docs.wso2.com/display/APICloud/Subscribe+to+and+Invoke+an+API

If you cannot invoke the API's HTTPS endpoint (causes the SSLPeerUnverified exception), it could be because the security certificate issued by the server is not trusted by your browser. To resolve this issue, access the HTTPS endpoint directly from your browser and accept the security certificate.