IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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

OAuth libraries bundled with webMethods 10.1

  • 1.  OAuth libraries bundled with webMethods 10.1

    Posted Fri November 02, 2018 10:57 AM

    Hello

    I wish to access a third party Salesforce service that is hosted in the cloud. I am told that this is secured through OAuth 2.0. In order to use the service I would have to download the scribejava API implementation for Salesforce which I believe is available here:

    Unfortunately, the Salesforce implementation is not compatible with the libraries provided in Integration Server 10.1. The installed libaries are:

    /opt/ESB/IntegrationServer/lib/jars/scribe-1.3.0.jar

    This is quite an old version that has the Api exposed in the following class as per the Integration Server documentation when invoking service pub.client.oauth:executeRequest:

    org.scribe.builder.API.DefaultApi20

    There is no Salesforce API implementation at version 1.3.0 of scribejava. The first version where a Salesforce implementation is available is at version 2.8.0, but that depends on a scribejava version of the library where they changed the API to:

    com.github.scribejava.core.builder.API.DefaultApi20

    Just installing the Salesforce API which is found in this jar (scribejava-apis-6.0.0.jar) is not going to work. This is what happens when running service pub.client.oauth:executeRequest:

    java.lang.reflect.InvocationTargetException:com/github/scribejava/core/builder/API/DefaultApi20

    But obviously, the above library is not installed. So I replaced the old verson of scribe with the latest version 6.0.0. Re-running executeRequest again I get this:

    java.lang.NoClassDefFoundError: org/scribe/builder/ServiceBuilder

    This obviously means that the webMethods service pub.client.oauth:executeRequest is not able to make use of the latest scribejava APIs. Does anyone concur or have I overlooked something here?

    Is it possible to get the Salesforce OAuth implementation working or should I fall back on tried and tested RESTful calls to the authorization server in order to obtain my access token?


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: OAuth libraries bundled with webMethods 10.1

    Posted Tue November 06, 2018 10:39 AM

    Hi,

    You can use the libraries by placing in integration existing package/code/jars/…

    Write custom java service to invoke the call.

    This may helpful for you.

    Thanks,


    #webMethods
    #Integration-Server-and-ESB