Go to new doc!

+49 228 5552576-0


info@predic8.com

Examples showing Interceptor Usage

Membrane Service Proxy and Monitor distributions contain many samples that show how to use Membrane Service Proxy. Each example can be found in a subdirectory within the examples directory of the distribution. There is a README.txt file for each example located in the respective directory. The readme explains how to run the example and how it works.

Example Description Directory
Access Control List Shows how to protect resourcs based on client ip, hostname and URI. examples/acl
API Management Shows an API Management example including API keys and rate limiting. examples/api-management
Basic Authentication Explains how to secure a resource with HTTP Basic Authentication. examples/basic-auth
Content Based Routing Shows how to configure content based routing. examples/cbr
Custom Interceptor How to write custom Java code modifying responses and requests. examples/custom-interceptor
Custom Websocket Interceptor How to write custom Java code modifying WebSocket frames. examples/custom-websocket-interceptor
Docker How to build a Docker Image containing Membrane and its configuration. examples/docker
Embedding Java How to start Membrane from your own Java program. examples/embedding-java
Logging to File System Shows how to log exchanges to the file system. examples/file-exchangestore
Groovy Scripting How to run Groovy scripts on responses and requests. examples/groovy
Javascript Scripting How to run Javascript scripts on responses and requests. examples/javascript
JSON-to-JSON Transformation How to do JSON-to-JSON transformations with the help of Javascript. examples/json2json-transformation
Loadbalancing Distribution of calls to several endpoints. examples/loadbalancer-static
examples/loadbalancer-basic-1
examples/loadbalancer-client-2
examples/loadbalancer-session-3
examples/loadbalancer-multiple-4
Logging Show how to log request and response with log settings. examples/logging
Logging to CSV Shows how to log request and response to CSV files. examples/logging-csv
Logging to JDBC Shows how to log request and response to a JDBC compliant database. examples/logging-jdbc
Login Shows how to setup authentication using a simple login screen, the first step to Single Sign On. examples/login
OAuth2 API Shows how to programmatically retrieve a Bearer Token, granting automated access to resources protected by a OAuth2 compatible Authorization Server. examples/oauth2/api
OAuth2 Credentials Shows the OAuth2 password flow. A client requests an access token and the token is verified through a token validator. examples/oauth2/credentials
OAuth2 with Github Shows how setup an OAuth2 client to verify users have successfully logged in at Github. examples/oauth2/github
OAuth2 with Google Shows how setup an OAuth2 client to verify users have successfully logged in at Google. examples/oauth2/google
OAuth2 Implicit Shows the OAuth2 implicit flow. It uses a Javascript client. examples/oauth2/implicit
OAuth2 Code Flow Shows the OAuth2 code flow, using Membrane to host your own OAuth2 compatible Authorization Server. examples/oauth2/membrane
Open ID Connect (OIDC) Shows how to setup Membrane as an OIDC client, realizing Single Sign On. examples/oauth2/openid
Proxy Shows how to setup Membrane as a HTTP proxy. examples/proxy
REST Quickstart Introduces general configuration and interceptors to transform the messages using regular expressions or XSLT stylesheets. examples/quickstart-rest
SOAP Quickstart Introduces general configuration, SOAP validation and the exposing of Web services as REST resources. examples/quickstart-soap
Rate limiting Shows how to limit the number of requests in a given interval. examples/rateLimiter
REST 2 SOAP Demonstrate how to call a SOAP Web Service by using a HTTP GET request. examples/rest2soap
REST 2 SOAP with JSON Same as REST 2 SOAP, but the response will be a JSON object, transforming the result to JSON. examples/rest2soap-json
URL Rewriting with Regular Expressions. Describes how to change URLs. examples/rewriter
Service discovery with etcd Shows how to discover services at runtime. Services can publish and configurate themselfs based on the etcd registry. examples/service-discovery-with-etcd
Spring Expression Language Shows how to use variables and placeholders in your proxies.xml file. examples/spel
TLS/SSL client Shows how to setup Membrane as a TLS/SSL client when connecting to other services. examples/ssl-client
TLS/SSL server Shows how to setup Membrane as a TLS/SSL server, when services are connecting to Membrane. examples/ssl-server
STOMP-over-WebSocket Shows how to modify STOMP messages using custom groovy code traversing Membrane as WebSocket frames. examples/stomp-over-websocket-intercepting
Swagger Proxy Shows how to expose Swagger-based services using Membrane. examples/swagger-proxy
Throttling Requests Shows how to delay and limit parallel requests. examples/throttle
Form Validation Demonstrates how to validate bodies of the format application/x-www-form-urlencoded. examples/validation/form
JSON Schema Validation Demonstrate how to validate JSON messages against JSON schema files. examples/validation/json-schema
XML Schematron Validation Demonstrate how to validate XML messages against Schematron schemas. examples/validation/schematron
SOAP Validation Demonstrate how to validate SOAP messages against WSDL definitions and XML schemas examples/validation/soap-Proxy
XML Validation Demonstrate how to validate XML messages against XML schemas. examples/validation/xml
Versioning SOAP Web Services using a Content Based Router Describes Web Services Versioning realized by keeping the endpoint, but using versioned endpoint implementations. examples/versioning/routing
Versioning SOAP Web Services using different endpoints with a XSLT transformation Describes Web Services Versioning realized by creating new endpoints, and using XSLT to do translate between versions. examples/versioning/xslt
Websocket Interception Shows how to log Web Socket frames. examples/websocket-intercepting
WebSocket with STOMP Shows how to setup Membrane to connect a Website (HTML, JS, CSS) with an message broker (e.g. ActiveMQ), allowing you asynchronous communication from HTTP server to HTTP client. examples/websocket-stomp
XSLT Transformations Transformation of a responses XML content with XSLT. examples/xslt