Error invoking a Web Service that talks to JNI code
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mamoun_Hirzalla
Posted On:   Thursday, April 4, 2002 02:22 PM

I have an MFC C++ class that I wrapped using Java Native Interfaces, e.g. MyClass.cpp. I have a Java class that wraps the C++ code using JNI, called MyClass.java. The JNI code works fine. The shared library used is called MyClass.dll Now, I deploy MyClass.java as a web service using Axis beta1 and TomCat 4.0.1 using WSDD. When I invoke any native method in MyClass.java, I get InvocationTargetException. I tried to add some local method to MyClass.java and it works fine. This implies that the web service is deployed fine and can be invoked for the methods that are implemented inside the java class. It also means that there is a problem invoking the native methods that are referenced in the web service. The test client   More>>

I have an MFC C++ class that I wrapped using Java Native Interfaces, e.g. MyClass.cpp. I have a Java class that wraps the C++ code using JNI, called MyClass.java. The JNI code works fine. The shared library used is called MyClass.dll

Now, I deploy MyClass.java as a web service using Axis beta1 and TomCat 4.0.1 using WSDD.
When I invoke any native method in MyClass.java, I get InvocationTargetException. I tried to add some local method to MyClass.java and it works fine. This implies that the web service is deployed fine and can be invoked for the methods that are implemented inside the java class. It also means that there is a problem invoking the native methods that are referenced in the web service.


The test client that I use to test the Web Service, TestMyService.java loads the shared library (MyClass.dll) fine, and I have the web service invoke calls inside the client.


The question that I have: Does Axis and TomCat support deploying web services that use JNI?


If yes, is there any special trick I need to know.

Environment:

Win2000, jdk1.3.1, Tomcat 4.0.1, Axis-beta1, MSVC++6.0


Thanks,

Mamoun Hirzalla

   <<Less
About | Sitemap | Contact