How to invoke a Springboot Rest Service from ADF 12c - rest

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

Related

Creation of a SOAP service possible in micronaut?

I want to create a SOAP service in micronaut using kotlin. I can not find information about how to do this. Annotations like #WebService are not being hosted as an endpoint.
I've successfully exposed the result to a rest endpoint.
I found information about how to implement a soap client in micronaut.
I succeeded in publishing the endpoint using endpoint.publish(..., ...), but I want to use the built-in netty-server, and perhaps built-in annotations, to prevent having to expose my services in a different class.
I don't think you would use micronaut http client for that. Look at apache axis 2 and see how you can use that.

Apache camel Restlet and swagger integration example

I am using Apache camel and Spring boot and Rest service, we are exposing the rest service with Restlet component. Now I want to generate the API documentation using Swagger.
So I found two ways,
1) Add dependency and swagger config changes.
2) Create specification and invoke the developed service.
In both the ways I could not find any example with Restllet component. With restConfiguration() configuration its working, I want to do it with Restlet.
I have created specification in yaml and invoking the service, Service exposed using "restlet:http://0.0.0.0:8090/path?restletMethod=post" URI.
I am getting below error,
OPTIONS "http://127.0.0.1:8090/path" 500 (Internal Server Error)
Fetch API cannot load "http://127.0.0.1:8090/path". Response for preflight has invalid HTTP status code 500
with the swagger specification can we invoke camel Restlet? if yes, what is the approach?

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

How consume REST service to expose it in oData

I have a REST service that I call from my client app. The service use JSON to manage data.
I want insert SAP NetWeaver Gateway between client and REST server to expose the REST data as oData.
The REST service have get and put methods to read and write data from/to db.
Now I have to decide the way in which starting:
Translate data from/to REST server using ABAP code to serialize data in the two ways (get REST data and create oData in response to a url get oData call and create the REST call in response to a url post oData call)
Use SMP - SAP Mobile Platform (Eclipse plugin) to write integration code (in javascript) to consume REST service in reading and writing exposing this service ad oData. http://scn.sap.com/community/developer-center/mobility-platform/blog/2015/04/08/integration-gateway-rest-data-source-overview-of-blogs
The 2nd solution seems to be the best way (no-require ABAP programming, use js high level language, parse-libs to manage oData and json ...) but i don't know if SMP was created to do this work.
And what is the result of the 2nd method? It seems to be a zip file (similar to a war) that I can push to the SAP Gateway to deploy the integration-logic. Right? How can I test my code without deploy every time the zip on SAP Gateway?
The recommended approach is to create a create Odata service in SAP Gateway and consume it in your app using SMP 3 or HCPms (SAP's mobile solution on cloud).
Use SMP SDK to consume the Odata service.

Difference between REST and SOAP APIs in WSO2 API Manager

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.