Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Zerocode | 725 | 1 | 3 | a month ago | 27 | December 06, 2020 | 106 | apache-2.0 | Java | |
A community-developed, free, open source, microservices API automation and load testing framework built using JUnit core runners for Http REST, SOAP, Security, Database, Kafka and much more. Zerocode Open Source enables you to create, change, orchestrate and maintain your automated test cases declaratively with absolute ease. | ||||||||||
Apai Io | 649 | 52 | 12 | 3 years ago | 15 | February 12, 2018 | 17 | PHP | ||
DISCONTINUED Amazon Product Adverstising Library based on PHP REST and SOAP (only V1) using the Product Advertising API. | ||||||||||
Spring Web Services | 459 | 4 months ago | 2 | mit | Java | |||||
Spring Web Services - SOAP and RESTful | ||||||||||
Service Proxy | 406 | 4 | 2 | 2 days ago | 24 | December 31, 2021 | 52 | apache-2.0 | Java | |
API gateway for REST, OpenAPI, GraphQL and SOAP written in Java. | ||||||||||
Product Ei | 316 | 1 | 8 days ago | 45 | May 15, 2019 | 1,033 | apache-2.0 | Java | ||
An open source, a high-performance hybrid integration platform that allows developers quick integration with any application, data, or system. | ||||||||||
Castlemock | 277 | 2 days ago | 80 | apache-2.0 | Java | |||||
Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web services. | ||||||||||
Forrest | 221 | 6 | 4 | 3 months ago | 69 | November 08, 2022 | 24 | mit | PHP | |
A Laravel library for Salesforce | ||||||||||
Notepractice | 184 | 24 days ago | 1 | apache-2.0 | C# | |||||
My_Note 笔记练习demo | ||||||||||
Micro Integrator | 138 | 2 | 2 | 12 days ago | 59 | May 15, 2019 | 211 | apache-2.0 | Java | |
The cloud-native configuration driven runtime that helps developers implement composite microservices. | ||||||||||
Nelibur | 123 | 11 | 5 years ago | 15 | March 02, 2016 | 4 | mit | C# | ||
Message based webservice framework on the pure WCF |
API Gateway for REST, WebSockets and legacy Web Services written in Java. Featuring:
OpenAPI:
API Security:
Legacy Web Services:
Other:
Download the binary and unzip it
Run service-proxy.sh
or service-proxy.bat
in a terminal
Change the configuration conf/proxies.xml
Run the samples, follow the REST or SOAP tutorial, see the documentation or the FAQ.
Try the following snippets by copying them into the conf/proxies.xml
file.
Configures APIs from OpenAPI and validates messages against the definitions. Needed data like backend addresses are taken from the OpenAPI description. more...
This configuration is all you need to deploy from OpenAPI:
<api port="2000">
<openapi location="fruitshop-api.yml" validateRequests="yes"/>
</api>
A list of deployed APIs if available at http://localhost:2000/api-doc
Click on the API title to get the Swagger UI.
Routing requests from port 2000
to api.predic8.de
when the path starts with /shop
.
<api port="2000">
<path>/shop</path>
<target url="https://api.predic8.de"/>
</api>
Call the API by opening http://localhost:2000/shop
in the browser.
<api port="2000" method="GET">
<request>
<template contentType="application/json" pretty="yes">
{ "answer": ${params.answer} }
</template>
</request>
<return statusCode="200"/>
</api>
Call this API with http://localhost:2000?answer=42
. Replace <return.../>
with your <target url="backend-server"/>
.
Call the following APIs with this request:
curl -d '{"city":"Berlin"}' -H "Content-Type: application/json" "http://localhost:2000"
This template will transform the JSON input into plain text:
<api port="2000" method="POST">
<request>
<template contentType="text/plain">
City: ${json.city}
</template>
</request>
<return statusCode="200"/>
</api>
Use this one to transform into JSON:
<template contentType="application/json" pretty="true">
{
"destination": "${json.city}"
}
</template>
and that into XML:
<template contentType="application/xml">
<![CDATA[
<places>
<place>${json.city}</place>
</places>
]]>
</template>
Using the xpathExtractor
you can extract values from XML request or response bodies and store it in properties. The properties are then available as variables in the template
plugin.
<api port="2000">
<request>
<xpathExtractor>
<property name="fn" xpath="person/@firstname"/>
</xpathExtractor>
<template>Buenas Noches, ${fn}sito!</template>
</request>
<return statusCode="200" contentType="text/plain"/>
</api>
Use the Javascript or Groovy plugin for more powerful yet simple transformations.
<api port="2000">
<request>
<javascript>
({ id:7, place: json.city })
</javascript>
</request>
<return contentType="application/json"/>
</api>
Call the API with this curl command:
curl -d '{"city":"Berlin"}' -H "Content-Type: application/json" "http://localhost:2000"
This script transforms the input and adds some calculations.
<api port="2000">
<request>
<javascript>
function convertDate(d) {
return d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0"+d.getDate()).slice(-2);
}
({
id: json.id,
date: convertDate(new Date(json.date)),
client: json.customer,
total: json.items.map(i => i.quantity * i.price).reduce((a,b) => a+b),
positions: json.items.map(i => ({
pieces: i.quantity,
price: i.price,
article: i.description
}))
})
</javascript>
</request>
<return/>
</api>
See examples/javascript for a detailed explanation. The same transformation can also be realized with Groovy
Dynamically manipulate and monitor messages with Groovy:
<api port="2000">
<response>
<groovy>
header.add("X-Groovy", "Hello from Groovy!")
println("Status: ${message.statusCode}")
CONTINUE
</groovy>
</response>
<target url="https://api.predic8.de"/>
</api>
Create a response with Javascript:
<api port="2000">
<response>
<javascript>
var body = JSON.stringify({
foo: 7,
bar: 42
});
Response.ok(body).contentType("application/json").build();
</javascript>
</response>
<return/> <!-- Do not forward, return immediately -->
</api>
Also try the Groovy and Javascript example.
Membrane offers lots of security features to protect backend servers.
The API below only allows requests with valid tokens from Microsoft's Azure AD. You can also use the JWT token validator for other identity providers.
<api port="8080">
<jwtAuth expectedAud="api://2axxxx16-xxxx-xxxx-xxxx-faxxxxxxxxf0">
<jwks jwksUris="https://login.microsoftonline.com/common/discovery/keys" />
</jwtAuth>
<target url="https://your-backend"/>
</api>
Use OAuth2/OpenID to secure endpoints against Google, Azure AD, github, Keycloak or Membrane authentication servers.
<api port="2001">
<oauth2Resource>
<membrane src="https://accounts.google.com"
clientId="INSERT_CLIENT_ID"
clientSecret="INSERT_CLIENT_SECRET"
scope="email profile"
subject="sub"/>
</oauth2Resource>
<groovy>
// Get email from OAuth2 and forward it to the backend
def oauth2 = exc.properties.oauth2
header.setValue('X-EMAIL',oauth2.userinfo.email)
CONTINUE
</groovy>
<target url="https://backend"/>
</api>
Try the tutorial OAuth2 with external OpenID Providers
Operate your own identity provider:
<api port="2000">
<oauth2authserver location="logindialog" issuer="http://localhost:2000" consentFile="consentFile.json">
<staticUserDataProvider>
<user username="john" password="password" email="[email protected]" />
</staticUserDataProvider>
<staticClientList>
<client clientId="abc" clientSecret="def" callbackUrl="http://localhost:2001/oauth2callback" />
</staticClientList>
<bearerToken/>
<claims value="aud email iss sub username">
<scope id="username" claims="username"/>
<scope id="profile" claims="username email password"/>
</claims>
</oauth2authserver>
</api>
See the OAuth2 Authorization Server example.
<api port="2000">
<basicAuthentication>
<user name="bob" password="secret" />
</basicAuthentication>
<target host="localhost" port="8080" />
</api>
Route to SSL/TLS secured endpoints:
<api port="8080">
<target url="https://api.predic8.de"/>
</api>
Secure endpoints with SSL/TLS:
<api port="443">
<ssl>
<keystore location="membrane.jks" password="secret" keyPassword="secret" />
<truststore location="membrane.jks" password="secret" />
</ssl>
<target host="localhost" port="8080" />
</api>
Limit the number of incoming requests:
<api port="2000">
<rateLimiter requestLimit="3" requestLimitDuration="PT30S"/>
<target host="localhost" port="8080" />
</api>
Distribute workload to multiple backend nodes. more ...
<api port="8080">
<balancer name="balancer">
<clusters>
<cluster name="Default">
<node host="my.backend-1" port="4000"/>
<node host="my.backend-2" port="4000"/>
<node host="my.backend-3" port="4000"/>
</cluster>
</clusters>
</balancer>
</api>
<api port="2000">
<rewriter>
<map from="^/good-looking-path/(.*)" to="/backend-path/$1" />
</rewriter>
<target host="my.backend.server"/>
</api>
Log data about requests and responses to a file or database as CSV or JSON file.
<api port="2000">
<log/> <!-- Logs to the console -->
<statisticsCSV file="./log.csv" /> <!-- Logs finegrained CSV -->
<target url="https://api.predic8.de"/>
</api>
Route and intercept WebSocket traffic:
<api port="2000">
<webSocket url="http://my.websocket.server:1234">
<wsLog/>
</webSocket>
<target port="8080" host="localhost"/>
</api>
See documentation
Integrate legacy services.
SOAP proxies configure themselves by analysing WSDL:
<soapProxy wsdl="http://thomas-bayer.com/axis2/services/BLZService?wsdl"/>
The validator checks SOAP messages against a WSDL document including referenced XSD schemas.
<soapProxy wsdl="http://thomas-bayer.com/axis2/services/BLZService?wsdl">
<validator />
</soapProxy>
See configuration reference for much more.