<JavaCallout> attributes

<JavaCallout name="MyJavaCalloutPolicy">

Attribute

Description

Default

Presence

name

The internal name of the policy. Characters you can use in the name are restricted to: A-Z0-9._\-$ %. However, the Edge management UI enforces additional restrictions, such as automatically removing characters that are not alphanumeric.

N/A

Required

<ResourceURL> element

Specifies the name and location of the main JAR file used to execute the callout. This JAR file contains compiled Java code written to the Java API exposed by the API Platform processing pipeline.

Schemas

Each policy type is defined by an XML schema (.xsd). For reference, policy schemas are available on GitHub.

Usage notes

For lightweight operations, such as API calls to remote services, we recommend using the ServiceCallout policy. See Service Callout policy.

For relatively simple interactions with message content, such as modifying or extracting HTTP headers, parameters, or message content, you can use JavaScript or Python languages.

Place the JAR in an API proxy under /resources/java. If your JavaCallout relies on additional third-party libraries packaged as independent JAR files, then place those JAR files in the /resources/java directory as well to ensure that they are loaded correctly at runtime. If you are using the management UI to create or modify the proxy, add a new resource and specify an additional dependent JAR file. If there are multiple JARs, simply add them as additional resources. You do not need to modify the policy configuration to refer to additional JAR files. Putting them in /resources/java is sufficient.

System calls, for example network I/O, filesystem read/writes, current user info, process list, and CPU/memory utilization are not permitted by the security model. Although some such calls may be functional, they are unsupported and liable to be actively disabled at any time. For forward compatibility, you should avoid making such calls in your JavaCallout.