From the documentation of pub.oauth:getToken pub.oauth:getToken at built in services guide ,
pub.oauth:getToken WmPublic. Requests an access token from the Integration Server acting as the authorization server.
In this case, the Authorization server is external, this is unlikely to work.
As a first step, you can find what Auth mechanism the server is looking for, to return a token and proceed from there.
Also tagging @Suresh_Ganta , perhaps this could be achieved with a CloudStreams connector?
Also tagging @michael6 for any thoughts.
-NP
#Integration-Server-and-ESB#webMethods#Service-Designer#CloudStreams#Flow-and-Java-services