Apigee - Java callout, Resource

Not applicable

Apigeejava callout: To execute java callout, I uploaded .jar file at org level in apigee. I made reference of the jar (and Execution class) in java-callout policy, but I get error during deployment of proxy - "Could not extract the java resource". Using curl command I verified that jar is loaded as java type, and name of resource is correct.

curl command used to upload the jar. curl -v -H "Content-Type: application/octet-stream" -X POST -d@{JARfileName.jar} http://{HOST}/v1/organizations/{ORG}/resourcefiles?"name={JARfileName.jar}&type=java"

thanks in advance

vinod kumar

0 1 526
1 REPLY 1

The org level scope for resource files is necessary only if you intend to reuse the Java library across your environments and APIs. The jar file can be added to the API directly and this is the common way Java callout is performed.

To quickly get started with Java callout the document points to Apigee platform samples that includes a Java sample

http://docs.apigee.com/api-reference/content/how-create-java-callout

Please use this one as a starting point.

https://github.com/apigee/api-platform-samples/tree/master/doc-samples/java-hello