Amazon S3 Integration

I am attempting to create a POC where we utilize Amazon S3 for file storage controlled by flow services within webMethods IS.

I can create the S3Sample java code in designer and run it successfully as a local java service, but I cannot get these java services to run successfully in IS, I believe there is a conflict with an IS jar file and one of the jar files needed to run the S3 services. If I place all of the jar files within package/code/jars the IS java service will not compile. If I remove the aws-java-sdk-1.11.8-sources.jar file the service will compile but it will not run. Using the same jar files within a pure java service works fine, but I assume a pure java service (running within my local version of eclipse) does not have the same IS jar files as used run running this as a IS java service.

I have also tried placing the AWS jars in package/code/jars/static but that doesn’t work either.

I am trying to utilize the S3 API and not the Rest based API because I believe it is simpler.

Has anyone had experience with the S3 java API and would you share how you got this to work?

I am using wm 9.7.

Thanks

Here are my 2 cents.

For Designer, you need both put jar into /code/jars to make compile available and config the build-path of your project to avoid error message.

Hi Bruce,
I’m facing a similar challenge so if you do make progress on this please keep this forum (or me individually) up to date.
Many thanks
Frank

Yes I have updated the classpath to include the necessary jar files in designer for compile, as well as copying them to the code/jars and code/static folders within the package for runtime use.

The AWS java SDK has 4 jar files within the lib folder of my download:
aws-java-sdk-1.11.7.jar,aws-java-sdk-1.11.7-javadoc.jar,aws-java-sdk-1.11.7-sources.jar, and aws-swf-build-tools-1.0.jar.

Also included are 17 jar files in third-party/lib folder.

I have included all 21 of these jar files within the referenced libraries for all of my java services. The java programs written only in java (not a wm java service), which compile and run fine, include all 21 of these jars but do NOT include any other IS jars.

I include the same 21 jar files for the wm java service, which also includes all IS and Eclipse standard jars will not compile if I include the aws-java-sdk-1.11.7-sources.jar. If I omit this jar from reference libs it will compile but doesn’t run properly.

I feel there has to be a conflict with one of the 21 files here and something already pre installed in IS, just don’t know how to circumvent the conflict.

Hi Bruce,

for the IS you will only need aws-java-sdk-1.11.7.jar.

javadoc only contains the Java Doc for these classes and the source jar contains the sources used to build the first jar.

The aws-swf-build-tools-1.0.jar mostlikely contains tools used for building from the sources.

for the third party jars please check with the content of common/lib/ and common/lib/ext-Folders if these contain another version of them.

Regards,
Holger

I have put the aws-java-sdk-1.11.20.jar in the code/jars folder of my package and configured the build-path of my project. My sample java service compiles but throws an error at runtime “java.lang.reflect.InvocationTargetException: INSTANCE” on line 5 below

1 IDataCursor pipelineCursor = pipeline.getCursor();
2 String accessKey = IDataUtil.getString( pipelineCursor, “accessKey” );
3 String secretAccessKey = IDataUtil.getString( pipelineCursor, “secretAccessKey” );
4 AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretAccessKey);
5 AmazonS3 conn = new AmazonS3Client(credentials);

Any ideas what would cause this ?

The third party jars do include files that are already loaded in common/lib and common/lib/ext.

How do I make just this 1 java service utilize the third party jars instead of the standard webMethods jars files in common/lib and common/lib/ext?

Frank, I am getting the same error as you are.

Did you ever find a solution to this?

Thanks

Hi Bruce,
we got the POC working in the end. What we had to do is

Assuming you are using a package named S3_POC

  1. put the 18 .jar files in the S3_POC/code/jars folder
  2. in the S3_POC folder edit the manifest.V3 file to include package so it now looks as follows:
<?xml version="1.0" encoding="UTF-8" ?> yes no 1.0 yes package Then it started to work for us. Hope this helps Frank

Thank You! I will give this a try.

Hi Frank,
Can able to send to the flow service which you had built to achieve aws s3 operations integration… I’m struggling lot on the usage of api… I just want one sample in webmethods which uses put and get operations

Hi all,
Any help is much appreciated. I just want view on the usage of s3 api in webmethods. Please help me out

Hi Bruce,

Not sure if you have license for CloudStreams.

CloudStreams offer/provides connectors for invoking/integrating APIs provided by SaaS providers. For example for salesforce we have salesforce connector, for AWS S3 we have S3 connector. If you have access to CloudStreams I would recommend you to try accessing AWS S3 APIs using CloudStreams S3 connector.

Please refer
http://techcommunity.softwareag.com/ecosystem/communities/public/webmethods/products/cloudstreams/downloads/amazon-s3/

Thanks,
Rahul

Frank Eckelmann,
Can you please able to send the poc to me it will be helpful.my personal mail Id I’d shaffimca39@gmail.com.

Can you please help me out by sending your poc on the usage of s3 api

Hi,
Can any one able to send the poc example to use s3 api using wm java services… I’m not looking for cloud connectors of s3… Its purely wm java poc using s3 api