Java RPC Server and Natural client

Hi,

I have tried invoking a Java web service from Natural client via Java RPC server by importing the WSDL file into workbench and then doing the usual stuffs.

Now that instead of making a web service request, is it possible to directly call the method of the web service class from Natural client via the Java RPC server or XML RPC server?

The requirement is to avoid costly service calls and replace with Java calls instead.

Would you please advise whether this one is achieveable or not.

To be more precise, instead of invoking the web service proxy stubs from within Server.java class is it possible to call the method directly?

Thanks in advance.

Regards,
Gijish

Yes, it is a bit more programming work to call a Java method rather than using the XML / WSDL interface as you need to “hand code” the IDL and add methods to invoke your Java methods from the Java RPC Server.

Hi Douglas,

Thanks for your reply.
I have a query. You have mentioned that an IDL can be written manually and code has to be written for calling a Java class within Java RPC server.

Instead of the above steps can I use Java RMI to invoke the remote method from within Java RPC server class SystemServer.java. Is it an advisable practice to do so?

Also I could see another way of calling a Java class which is by invoking a sequence file from within Java RPC server code and inside the sequence using a SAGJavaObjectGateway to invoke the method. But i could see that this process does all the serialization stuffs and thus could not give a better justification for its usage. Also it is said that JavaObjectGateway can only call methods that take either String or ByteArray as parameters.

Is this procedure correct to use?

Thanks again in advance,
Gijish.

I’m not clear now on what you are trying to achieve. You started out asking how to call a Java web service from Natural. Are you still trying to call a web service and/or a Java application from Natural??

From your Java application or web service, you can call what ever services you need to in order to provide the service to Natural. You cannot invoke RMI from Natural.

If you have a service (web service) provided by Service Orchestrator (this is the EntireX Communicator thread, so may not be monitored by SO experts), you still need to provide access to that service from Natural, right?

So you either need Java RPC Server to access your Java classes or XML RPC Server to access web services (Java, Service Orchestrator or otherwise).

Dear Douglas,

I would like to ask a question on the reverse direction : Can we invoke Natural from Java using RMI ? or is there any other way to invoke Natural sub programs on Mainframe platform either from Java or .Net application without adding any new layer in between.

Thanks a lot in advance…

Regards,
Vinod

I’m not sure what “without adding any new layer in between” would be in this discussion. You can indeed call Natural programs on the Mainframe from Java or .Net, but most solutions involve a Natural RPC Server exposed as a Java service or web service over EntireX.