Swagger Implementaion issue in WSo2 API Manager - wso2

WSO2 Api Manager is working fine in all aspects but getting an issue in the API Console Module while using Store.
While designing an API, we have selected only http transport and published. In API Console, while trying the swagger, we are getting http calls with 9443 not with 8280 which is the actual port where the production url is launched.
Trying out the production url with 8280 port works fine with Curl and External REst Client.
Please help to resolve this issue as the end user cannot try it out before subscribing if this is not working.

This issue is identified as a bug in the API Manager product. So I have created a JIRA[1] for the issue and please keep track the issue for the details.
[1] https://wso2.org/jira/browse/APIMANAGER-5254

Related

WSO2 revoke api

I was curious how can see the revoke api end point exists.The url configured is
https://localhost:9443/revoke
But I could see the api listed under the started application or under api.
I even tried retrieving the wadl from the url but it did not return anything.
Do we need to explicitly publish it or it gets done automatically when we start the wso2server ? Or Do we need to install something other than the wso2 api manager to get this api?
When I browse the endpoint https://localhost:9443/revoke/?_wadl , I get error
405 - method not allowed
The port should be 8243.
And it's not a SOAP service.
Ref: https://docs.wso2.com/display/AM260/Token+API#TokenAPI-Revokingaccesstokens

WSO2 API Manager : API Creation Issue

I installed the APIM and started the APIM and created a new API. The ApI which i created comprises of a URL which points at our company production server. I gave the URL in the api creation mode to the production endpoint and sandbox Endpoint boxes. Then i set the required parameters under the GET method. Then i try it out at the store but the request does not hit the production server. I want to see the URL output from your api manager which passes to our production server. Because i want to see what is whether there is an error on that as it it doesnot hit our production server.
Can you help me with the issue?
Thanks in advance.
You can enable wire log to see the what are the requests which came to APIM and what are the requests APIM made for backend. Follow the steps in How to get wire logs from WSO2 ESB blog post to enable wire log. Those instructions are given for ESB, but they are valid for APIM as well.

WSO2 APi Manager Response Code 0

I'm trying to use WSO2 API Manager 1.10.0 on an existent micro-services project with REST APIs following WSO2 tutorial.
I have installed it on my computer as well as a copy of my application and configured AM to manage requests (GET, POST and DELETE) to my resource but I always obtain a "Response code 0" with Response Header
{
"error": "no response from server"
}
Trying to contact my application using Advanced REST Client I obtain 200 with the correct result.
My APIs use a token inside the header to authenticate the user passed so I have implemented a dummy API without authentication but I still have the same issue.
I have tried also the Cloud version with our test server but still obtaining the same result.
I found this guide http://wso2.com/blogs/cloud/video-setting-up-custom-url-for-api-store-and-gateway/ but I don't know if this can be a solution for the problem in localhost.
Setting up the custom url in WSO2 API Cloud wont help. Thats there for a different purpose. There are two things you can do.
If you are interested in going ahead with the cloud version, you can get help from them. You can send a support request and the cloud team will help.
You can troubleshoot your local instance. When doing so, first, try to invoke your api via curl and see whether it gets a response. Sometime, your api can work fine, but due to some reasons, the result might not reach the api console.
If the curl works fine or not, you can check the logs to see whether there are any errors printed. Some more questions:
Is your backend service exposed via http or https?
If it is https, then if its certificate is not a CA signed one, API Manager will fail during the handshake. If so, you will have to add the cert to api managers client-truststore.jks
In the cloud scenario, your backend should be accessible from internet and the certificate story is valid for cloud too.
Are you trying to access the api using swagger console (or any web application). There are couple of reasons you could encounter this issue. one could be certificate not installed in the browser.
If this happens you should see some error log in the api manager console (something related to CA not found). for that first you can copy the backend url (swagger console shows the url it used to send the request) and paste it on a new browser window and install the certificate to the browser.
also you can get an idea about the issue by using a tool like firebug and check the request. (it will show the error for not connecting the AM)
Finally I have found the issue: the API Manager does not accept plain text response, responding using a JSON solves the problem.
Using other mediatype such as XML or TEXT/HTML it reports 406, with text plain it returns Error 0.

Integrated API Console in WSO2 API managers store use unproper port in request URL

I created API with WSO2 APi Manager Publisher. Then I subscribed and invoked this API with Integrated API console. All worked OK.
Request URL was like:
https://host,-name:8243/.....
Later I unsubscribed, edited this API a little, published and subscribed.
Now, when I invoke API with API console port number in URL is changed from 8280 to 9443 and, of course, API doesn't work.
When I invoke API in (for instance) Postman with right port number, API works properly.
When I delete API and create new one - API console works properly.
After editing, port is changed again.
Could somebody explain such strange behavior of API Console?

WSO2 API Manager - Error while accessing backend services for API key validation

I have setup my backend and trying to ping it from a rest console but keep getting the above. I have gone through the documentation a couple of times over and reimplemented as documented but keep getting the same issue. Any ideas what I am missing?