microgateway | IBM API Connect Microgateway framework , built on Node.js | Runtime Evironment library
kandi X-RAY | microgateway Summary
kandi X-RAY | microgateway Summary
This is fork with datastore cache for http-responses. To enable it you must set env var DATASTORE_USE_LOCAL_CACHE=true.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Populate request variables
- Parse OAuth2 code .
- Create an API middleware
- Create a security check middleware
- OAuth2 authorization handler .
- Get password from request .
- Populates the system variables .
- Refresh a refresh token
- Get Client credentials
- Create a postflow middleware
microgateway Key Features
microgateway Examples and Code Snippets
Community Discussions
Trending Discussions on microgateway
QUESTION
I am interested in gRPC, so I researched and test some kind of Microgateway tools such as Kong, Gloo, and WSO2 microgateway.
WSO2 microgateway was quite awesome and suitable for me. However I had to use only CLI while creating and testing stuffs. My question is how I can deploy and manage APIs witout CLI.
Any tips or plan to use Microgateway without CLI? I mean, RestAPI or Publisher support will be a perfect solution for me.
...ANSWER
Answered 2020-Dec-09 at 04:09You have to use the wso2 Microgateway toolkit(Microgateway CLI tool) to generate the API artifacts. The responsibility of the toolkit is to create a Microgateway project and after that generate an executable jar file for the Microgateway runtime. There is no other way to generate the Microgateway project and artifacts without CLI. To manage generated Microgateway projects you can use some version control system like Git and create some automation for the deployment.
QUESTION
I am new to WSO2 microgateway and was following the steps given in the documentation : "https://docs.wso2.com/display/MG310/Quick+Start+Guide+-+Binary" for exposing the Petstore service via microgateway.
I was able to initialize the API using the swagger file as given in the steps. The Petstore project is also created under the project directory. But when i try to build the project as given in Step 1.2, it fails with an error as shown below. Need suggestions to resolve this issue.
In the ballerina-internal.log file, i get the below error.
[2020-07-16 21:13:19,009] SEVERE {b7a.log.crash} - Array index out of range: 0 java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at org.ballerinalang.nativeimpl.jvm.interop.JMethodResolver.validateArgumentTypes(JMethodResolver.java:194) at org.ballerinalang.nativeimpl.jvm.interop.JMethodResolver.validateMethodSignature(JMethodResolver.java:148) at org.ballerinalang.nativeimpl.jvm.interop.JMethodResolver.resolve(JMethodResolver.java:107) at org.ballerinalang.nativeimpl.jvm.interop.JInteropMethodValidator.resolveJMethod(JInteropMethodValidator.java:74) at org.ballerinalang.nativeimpl.jvm.interop.JInteropMethodValidator.validateAndGetJMethod(JInteropMethodValidator.java:61) at ballerina.jvm.$value$InteropValidator.validateAndGetJMethod(interop.bal:90) at ballerina.jvm.$value$InteropValidator.call(interop.bal) at ballerina.compiler_backend_jvm.interop.interop_method_gen.createJMethodWrapper(interop/interop_method_gen.bal:136) at ballerina.compiler_backend_jvm.interop.interop_method_gen.createJInteropFunctionWrapper(interop/interop_method_gen.bal:128) at ballerina.compiler_backend_jvm.interop.external_method_gen.createExternalFunctionWrapper(interop/external_method_gen.bal:180) at ballerina.compiler_backend_jvm.jvm_package_gen.generateClassNameMappings(jvm_package_gen.bal:477) at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:149) at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120) at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142) at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120) at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142) at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120) at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142) at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120) at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142) at ballerina.compiler_backend_jvm.main.generateJarBinary(main.bal:86) at ballerina.compiler_backend_jvm.main.main(main.bal:60) at ballerina.compiler_backend_jvm.___init.$lambda$main$(compiler_backend_jvm) at ballerina.compiler_backend_jvm.___init$$Lambda$11.000000001107AEE0.apply(Unknown Source) at org.ballerinalang.jvm.scheduling.SchedulerItem.execute(Scheduler.java:426) at org.ballerinalang.jvm.scheduling.Scheduler.run(Scheduler.java:218) at org.ballerinalang.jvm.scheduling.Scheduler.runSafely(Scheduler.java:191) at org.ballerinalang.jvm.scheduling.Scheduler$$Lambda$6.0000000010F6DAF0.run(Unknown Source) at java.lang.Thread.run(Thread.java:813)
...ANSWER
Answered 2020-Aug-24 at 10:34Looking at the responses in the comments it looks like the external jdk is not fully compatible with mgw. Not sure on the exact reason though. Here is a bit more background on what going on during the build command and a possible workaround to force mgw use internal jdk.
All mgw distributions (toolkit/runtime) including the binary distribution, contains a jdk internally which is fully compatible with the ballerina version used in the mgw. However during the execution of mgw toolkit command it checks for externally installed jdks (by looking at JAVA_HOME variable) and pick it as the jdk if a compatible version is found in the system. Otherwise it will use the internal jdk.
So to avoid mgw from picking up external jdk, we should set JAVA_HOME variable to "" or invalid location. To do that open micro-gw.bat
(assume you are on windows) file in the /bin
directory and around line 55 after SET HOME_CACHE=%MICROGW_HOME%\lib\gateway-balo
add SET JAVA_HOME=
as command. After the change code block around above line will look like below.
QUESTION
i am using apiconnect microgateway (available on github) to connect with any existing webservice and add some policies, i figured i have to create yaml files for my existing apis and add them to api connect's directory. here is a sample yaml file they have given.
...ANSWER
Answered 2018-Oct-14 at 14:21Creation of REST service in API Connect is straightforward. Follow the instructions provide by IBM
In API Connect, the configuration or the scripts what we write in Assembly section will automatically populate in the swagger file(Source section in API Designer). So we don't need to manipulate any swagger file.
To invoke the existing rest service in API COnnect. Please follow the steps which you can find in the above link.
For the creation of REST service invoking SOAP service please follow this link
Thanks SP
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install microgateway
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page