Thanks for your replies.
I already have the wrapper service created for the java service. I am currently using the flow service to read the global variables and passing these as input parameters to the java service.
I am trying to find a way to avoid this and get the global variables read from the java service itself.