calling another IS service

Hi all ,
I need to call a service of another IS service thru java service.
We have clinet.http built in service , but i need that in java services.
I searched so much in java APIs , but unable to find anything related to my req.
Suggest me how to do that or code ?
Its an urgent .

Regards ,
sevenwaves

you can call any service from java service. This will be achived by using method Service.doInvoke(…). Please do search again in this forum with “doInvoke”, you will find many useful posts.

Thanks for reply.
I tried with doInvoke…but am able to call the service of same server, not another server’s service.

see for ex : i need call service “addInt” thru https .

can u suggest what to do and hw to do

Regards ,
sevenwaves

When you want to invoke service which is available in another IS, you can use “pub.remote:invoke” service and provide service name as input to this service.

So inside doInvoke, call “pub.remote:invoke” service, and pass the arguments as service name which is available in the other IS.

For more info refer “7-1_Integration_Server_Built-In_Services_Reference.pdf”

You also need to add the ‘another IS’ as remote server on your IS and you have to give Alias of your remote IS to the pub.remote:invoke service.

Use Service.doInvoke() to call pub.client:http, if you really want to do what you’re doing from a Java service.

I assume you’re doing some simple proof of concept since calling addInt remotely seems a bit odd to do for real. :slight_smile:

I would recommend not using pub.remote:invoke. Nor doing such a call in a Java service.

Use the provided pub.client:http to do the work, that way your solution is not assuming that the called component is hosted on another IS.

Is there a specific reason you need to do this from a Java service?

Hi,
In your java service you can use ‘Context’ class and invoke the method ‘connect’ for connecting to your remote server and then use ‘invoke’ method for invoking service on remote server.
Hope this will help.

Regards,
Vikas