Operating System - OpenVMS
1752782 Members
6253 Online
108789 Solutions
New Discussion юеВ

Re: Webservice Axis2 - JNI Global Section Access

 
EEnhcw
Occasional Advisor

Webservice Axis2 - JNI Global Section Access

We are trying to deploy a web service from a OpenVMS 8.4 box.

The desired result is to expose the results generated by legacy C and fortran code on the OpenVMS side to a web based client. The web service will use java JNI and retrieve data from GLOBAL SECTIONS from openVMS according to inputs from the webservice client.

The webservice is hosted on
OpenVMS8.4 on Alpha,
Apache Tomcat using AXIS 2 for OpenVMS (Axis2 Version 1.3),
java version "1.5.0"



The client is developed using NetBeans 6.9 on a windows platform using the WSDL file generated from AXIS2.

What we are able to do:

1. JNI and Global sections:
We have working code in java that is successfully able to load a native library (.exe image) and access global section data and output data as desired. No issues when using System.loadLibrary at this point. The .exe image was installed and the loadLibrary used a logical name to this image.

2. Webservices:
We are able to create basic webservices hosted from openVMS which do not need to load any native libraries.

What we need:

1. We need to create a web service that is able to successfully load the native libraries required by the JNI routines in order to access the global section data.

We suspect out webservice fails during execution of System.loadLibrary("blah");
What is the default library path?

The Error we run into:
javax.xml.ws.soap.SOAPFaultException: no EXAMPLE1.exe in java.library.path


2. How do we package the .aar archive?
How to setup AXIS2 properties to point to java.library.path? (currently no value exists for path)
Where should the native library reside?
How do we link the webservice to this library?
Is there anything else we need to add in the services.xml file to point to the library?

Shifting gears here: Not concerned with the previews issue
1. Is gSOAP a better solution?
2. Other alternative solutions to create webservices on openvms with heavy C and Fortran code that need to be accessed.
6 REPLIES 6
Bojan Nemec
Honored Contributor

Re: Webservice Axis2 - JNI Global Section Access

EEnhcw,

I have no experience with Tomcat and Axis2 on VMS, but I have some experience with a similar exception when calling System.loadLibrary().

In my case I need to add a parameter when starting Java (it was started from a C program with JNI), but I think that you can add the parameter to the java command. The parameter sets the library path and must be a UNIX name specification. So if your shareable exe resides on dev:[dir.subdir].

-Djava.library.path=/dev/dir/subdir/

The logical pointing to the exe was also defined.

I have no Tomcat installed on VMS, so I have no clue where to put the parameter. Search the Tomcat startup procedure to see where Tomcat is started with the java command. Looking to the Linux startup procedure I can see that you have two symbols in which you can set aditional parameters: JAVA_OPTS and CATALINA_OPTS when starting the Tomcat main class org.apache.catalina.startup.Bootstrap.

Hope that helps

Bojan
John Apps
Occasional Advisor

Re: Webservice Axis2 - JNI Global Section Access

I do not have all my documentation with me as i am on the road, but can, if necessary, dig out the necessay bits and pieces to make what you are trying to do with Tomcat and Axis.
However, if you do not already have a Java environment set up on VMS (and Integrity would be much better if Java is the was you wish to go), then I do suggest using gSOAP as:
1. it is pure C, i.e., no Java required and has plugins for Apace and WASD

2. very fast (no, I will not say here how much faster, but it is significant)

3. since it is native code, calling your existing modules to access the global section data will be very easy
http://gsoaponopenvms.blogspot.com/ is a place to start.
Should you have further questions, do send an email to the addresses given on the above URL page.
How many beans make 5?
EEnhcw
Occasional Advisor

Re: Webservice Axis2 - JNI Global Section Access

Bojan,
Thanks for the reply
We tried setting the library path using the format you suggested in CATALINA_OPTS, however we are still getting the same results. The library path in axis is still blank.
EEnhcw
Occasional Advisor

Re: Webservice Axis2 - JNI Global Section Access

John,
Thanks for the reply.

Would you mind sending documentation for both? We actually emailed you last week about gSOAP. We currently have gSOAP installed and are in the process of getting it functional.

Do you have any examples on how to create a web interface for the client using gSOAP?
Bojan Nemec
Honored Contributor

Re: Webservice Axis2 - JNI Global Section Access

EEnhcw,

Prhaps you can try to change the System.loadLibrary method to the System.load() method. This method takes a complete path to the shareable image. I dont know how the path must be written (UNIX od VMS format), but you probably can put a logical name pointing to the image.

Bojan
John Apps
Occasional Advisor

Re: Webservice Axis2 - JNI Global Section Access

@EEnhcw
Could you please send a reminder to my Gmail account on this? I am onsite with a customer and tend to forget things...I also have no idea who EEnhcw is and cannot translate into the person who requested a gSOAP kit - sorry!

Cheers, John
How many beans make 5?