Difference between REST and SOAP APIs in WSO2 API Manager - soap

When I publish a REST API using context “/configuration” and version “v3.0”, and Production URL “myhost.com/configuration/v3.0”, and make a call to “apim.com/configuration/v3.0/codes/?count=5&id=11849&offset=0”, API Manager correctly passes the following on to my endpoint: “myhost.com/configuration/v3.0/codes/?count=5&id=11849&offset=0”.
When I do a similar thing with a SOAP API, using context “/configuration” and version “v3.0”, and Production URL ”myhost.com/configuration/v3.0”, and make a call to “apim.com/configuration/v3.0/codes”, the API Manager pass he the following on to my endpoint: “myhost.com/configuration/v3.0”. This doesn’t work because “codes” was dropped.
Is there something different API Manager does with REST and SOAP? Seems odd.

Related

How to invoke a Springboot Rest Service from ADF 12c

I have a Rest webservice to invoke from Oracle ADF. The service simply returns a success flag and a message. No need to have a Data Control for this.
Is there a rest client that I can use to invoke this rest service?
Other than 'REST Data Control, there is not any in-built in REST client available
in 'Oracle ADF'. Since 'Oracle ADF' is J2EE framework, you can any other java library like Jersey to invoke the RESTful service.
Rest client create http request GET, PUT, POST etc... to restful webservice.
You can use
org.springframework.web.client.RestTemplate
To call restFul API
Other way is using postman

WSO2 API manager returns binary response

I am very new to WSO2 API manager and trying out my very first simple restful api. which returns json response and has no security since it is an internal api.
I installed WSO2 API manager locally and trying to call the rest api on my dev server which uses http and no security as I mentioned earlier.
Here is how my get url looks like:
and here is my url looks like for production and sandbox environment:
I don't have any message mediation enabled.
I went to the API store and created a trial application (so that I can get the access token. Eventhough, my dev environment api has no security, I was reading that for throttling and other purpose, I need to pass bearer token to the WSO2 api OR it will reject the request.)
When I am trying to consume the api, I get the following binary message.
Is there any way I can see the proxy log on WSO2 server so that I can see the request and its header sent to my dev server?
How can I fix this binary response to get the proper json response?
I searched all over and can't find solution to it.
You can use below steps on WSO2 ESB or APIM to enable Wire Logs.
Uncomment below line in /repository/conf/log4j.properties
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Restart Server.
Source - http://lakshanigamage.blogspot.com/2015/03/how-to-enable-wire-logs-in-wso2-esbapim.html

What is the better way of authentication for REST API in Azure

Wanted to make rest calls, i found there are two ways of authentication.
Method 1. Upload a self-signed ssl certificate and authenticate through certificate and subscription id.
Method 2. Use access token (Bearer ey...) which is obtained from making oauth2 call.
Which method is best way to do?
You should go with Method 2 for many reasons:
Method 1 is the old way and will only work with authenticating Service Management API requests where as Method 2 is the new way and will work with authenticating both Service Management API and Azure Resource Manager API requests.
Azure is moving away from Service Management API and is moving towards Resource Manager API which only supports Method 2. In fact, wherever possible use Resource Manager API instead of Service Management API. Only use Service Management API when there's no Resource Manager API equivalent.

WSO2 API Manager SOAP basic authorization (in wso2 layer) not working properly

I am trying to publish SOAP APIs in WSO2 using the endpoint security scheme. I am using it as basic authorization and putting in credentials, but it seems to not be calling the backend API with those creds. Right now I can as a workaround pass in the basic auth headers myself, along with an Oauth2 token (in the header) to hit the published API in the store.
Am I just going about this wrong?
Using WSO2 API Manager 1.6
EDIT: I have replicated this issue in WSO2 API MANAGER 1.8. Viewing the packets in wireshark, it is making the request without adding the authorization. Restful calls with embedded authentication on the WSO2 layer seem to be working fine.
You can publish SOAP/REST APi's in WSO2 API Manager. You need to pass in the username password, along with the Authorization header which is base64 encoding (consumer key:consumer secret), You can follow the blog post [1] on how to consume a SOAP API & [2] for more information on tokens.
[1] http://charithaka.blogspot.com/2012/07/consuming-soap-service-using-wso2-api.html
[2] http://lalajisureshika.blogspot.com/2012/11/generate-application-tokens-user-tokens.html
The above blog [1] &[2] refers to a API Manager older release, hence you will need to refer to WSO2 API manager 1.6 releases documents [3] for API key generation etc.. However, to find out how to publish SOAP API's you could use the blog pointed out.
[3] https://docs.wso2.com/display/AM160

Azure Cloud Services REST API - Get Package returning 404

Is this “Get Package” API still supported:
http://msdn.microsoft.com/en-us/library/windowsazure/jj154121.aspx
Seems like it always return HTTP 404.
I’m able to successfully use the “Get Deployment” API documented here:
http://msdn.microsoft.com/en-us/library/windowsazure/ee460804.aspx
But can’t get the /package resource to work. Note that I'm using the same certificate for authentication that I use for the "Get Deployment" API, and it works fine.
My call to the API looks exactly like in the MSDN documentation.
Is there any other way to retrieve the Service Package (.cspkg) file of a deployed cloud service?
The Get Package operation is still supported. It's likely that if you're getting a 404 response that you're using a HTTP GET method as opposed to POST. I've tested the operation using the REST Console plugin for Chrome and my package was successfully written to blob storage.
The URI used was:
https://management.core.windows.net/<subscription-id>/services/hostedservices/<cloudservice-name>/deploymentslots/<deployment-slot>/package?containerUri=<container-uri>