Skip to content

A sample Apigee Edge API proxy that uses a Java Callout to say hello

License

Notifications You must be signed in to change notification settings

gahana/edge-java-callout-hello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Apigee Edge API Proxy with Java Callout

Introducton

This is a sample Apigee Edge API proxy that demonstrates the use of Java Callout policy. This can also be used as a template to build an API proxy with Java Callout policy.

Benefits

  • Predifined folder structure for API proxy and Java callout
  • Use gradle to build Java callout jar
  • Sample tests for Java callout
  • Ready mock objects for MessageContext and ExecutionContext
  • A trick to use variables on Java Callout properties
  • Predifined FaultRules for API proxy
  • Sample BDD tests for API proxy
  • Build script using apigeetool

Prerequisites

Install

git clone or download this repository.

Set your Apigee Edge username and password in environment variables

$ set EDGE_USERNAME=<Apigee Edge Username>
$ set EDGE_PASSWORD=<Apigee Edge Password>

Update Edge organization and environment in deploy.sh file

ORG="org name"
ENV="env name"

Make sure deploy.sh file has execution privileges. To deploy the proxy execute any of the below commands

$ ./deploy.sh
$ ./deploy.sh all
$ ./deploy.sh hello

To build and test java callout

$ cd hello-callout
$ gradle build

To run BDD tests, first update org and env name in Before function of file test/features/step_definitions/hello-steps.js. Then

$ cd test
$ grunt

About

A sample Apigee Edge API proxy that uses a Java Callout to say hello

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published