Connecting to Google Bucket and transfer and read files through webMethods.

Hi,

Can you please let me know if anyone has implemented connection to google bucket in GCP and able to put the files on to the bucket and also read the processed files from google bucket. Please share me step by step guide for configuring the connection and service creation for doing the above specified transactions.

Regards,
Vinodkumar V.

Hi Vinod,

Did you take a look at the documentation, http://techcommunity.softwareag.com/ecosystem/download/developer-communities/webmethods/cloudstreams/GoogleCloudStorage/9.10/connectorDoc/CloudStreams_Provider_for_Google_CloudStorage_Install_Users_Guide.pdf

It has already provided you the steps to create connection, and also what service to use to upload or read objects from GCP cloud storage.

Get Objects
/storage/v1/b/{bucket}/o/{object} GET Retrieves an object or
its metadata.

Simple Upload
Objects
/upload/storage/v1/b/{bucket}/o?u
ploadType=media PUT Stores a new object
and metadata.

Hi Mike,

Thanks for the prompt reply. I have followed the guide and able to generate the required tokens. But I have few concerns.

  1. Since my gmail account is a free version i am unable to create the google bucket
  2. I have configured the server name as “https://www.googleapis.com” as specified on document. (Will it differ when my organization creates a service account to me and create a new project and bucket )
  3. Ran list bucket service with the connection which i have configured using my personal gmail account. I got response code as 200 even though there is no google bucket created under my project. Please find the screen shot for the same. Did that mean i was able to communicate with GCP storage successfully ??
  4. Configured refresh token with “custom ESB service” and refresh esb custom service as “wm.cloudstreams.google.cloudstorage.refreshToken:customRefreshToken”. but after an hour or so access token getting expired and getting unauthorized error.

Hi Vinod,

If you don’t have a valid access to Google Cloud Storage to create or use bucket, then I don’t see any way to move further isn’t it.
The product is written in a way it’s support to be used with GCP, and not normal gmail account. It’s not intended to be used in such a way.

By not following the requirements in the user guide, whatever behavior you’ve seen we can’t said it’s a defect. I would suggest please get a google cloud platform account and have access to cloud storage to really further investigate.

Hi Mike,

Thanks for the reply. My organization in the process of creating a valid account. Mean while i wanted to explore the POC. So gave a try. Do u mean to say that the 200 status response which i have got while running the list bucket service is not even valid one ?? I mean u mean to say that my webmethods google storage connection configuration doesn’t even interact with GCP ??

Hi Vinod,

If you want to see if the connection does actually establish between your connection to GCP, I suggest you to adjust the IS server logger subsystems for cloudstreams to TRACE.

From the log, you’ll get the details.

Hi Mike,

Thanks for the reply. I have enabled the logs as suggested and attached the screen shot for the same. I assume my connection is successful. Please have a look and let me know if my assumption is correct. (Marked in red is the output of list buckets service)

Also as you are aware access token will gets expired after as hour. So in order to renew the access token i have configured the refresh token. I have provided required parameters like access token, refresh token, refresh url, consumer secret, consumer id, refresh url request as “custom ESB service” and refresh esb custom service as “wm.cloudstreams.google.cloudstorage.refreshToken:customRefreshToken”. But unable to renew the access token after it gets expired (Getting unauthorized error if i run the list bucket service after an hour). Again i need to manually disable the connection and update the access token and then enable the connection. Please clarify on this if i am doing anything wrong.


I suggest you to raise a ticket to SAG for support.

Hi Nike,

I have raised an incident with SAG. Also I would like to know from u if u have faced any issues with refresh token like me.