webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Amazon S3 Integration

webMethods Community Member

webMethods Community MemberMon August 22, 2016 06:06 PM

  • 1.  Amazon S3 Integration

    Posted Mon July 25, 2016 02:10 PM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Amazon S3 Integration

    Posted Mon July 25, 2016 05:17 PM

    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.


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Amazon S3 Integration

    Posted Thu July 28, 2016 10:04 AM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Amazon S3 Integration

    Posted Thu July 28, 2016 06:14 PM

    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.


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Amazon S3 Integration

    Posted Fri July 29, 2016 02:03 PM

    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


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Amazon S3 Integration

    Posted Tue August 02, 2016 12:41 PM

    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 ?


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Amazon S3 Integration

    Posted Wed August 03, 2016 01:30 PM

    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?


    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: Amazon S3 Integration

    Posted Thu August 18, 2016 12:54 PM

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

    Did you ever find a solution to this?

    Thanks


    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: Amazon S3 Integration

    Posted Thu August 18, 2016 01:24 PM

    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
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: Amazon S3 Integration

    Posted Mon August 22, 2016 06:06 PM

    Thank You! I will give this a try.


    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: Amazon S3 Integration

    Posted Mon April 29, 2019 08:12 PM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 12.  RE: Amazon S3 Integration

    Posted Tue April 30, 2019 07:44 PM

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


    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: Amazon S3 Integration

    Posted Wed May 01, 2019 03:37 PM

    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


    #Integration-Server-and-ESB
    #webMethods


  • 14.  RE: Amazon S3 Integration

    Posted Wed May 01, 2019 08:42 PM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 15.  RE: Amazon S3 Integration

    Posted Thu May 02, 2019 10:04 AM

    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


    #webMethods
    #Integration-Server-and-ESB