This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Java-Generic Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java-Generic Interface" Watch "Java-Generic Interface" New topic
Author

Java-Generic Interface

Lisha Ahuja
Greenhorn

Joined: Mar 06, 2011
Posts: 5
Hi Team,

The current connector for accepting request to our existing system is written in C language,we had build a ".so" file by compiling c program using MF cobol.

-Cobol application calls this ".so" files and passes the required buffer.The current data structure in our application is simple string.



Current Structure:-

C Connector receives data and publish it to java program


-Now we are getting request from other modules in our organisation which are written in J2ee, PHP they want to send data through our connector.(We will define the data structure whether they should use soap or xml).

Could some one guide me what are the possible way I can go about it,How can I replace C connector by java program which can receive xml messages and parse it to string.also is there any possibility that I can use simple java program to send the xml
message from application to our system.

Any sample program for learning will be helpful.

Thanks in advance.

-Lisha
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

How about using a web service? Correct me if I am wrong?


Swastik
Lisha Ahuja
Greenhorn

Joined: Mar 06, 2011
Posts: 5
Hi Swastik,

Thanks for the reply,could you kindly guide me steps how can I go about it.

-Lisha
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

http://www.roseindia.net/webservices/buildingsimplewebservice.shtml
Lisha Ahuja
Greenhorn

Joined: Mar 06, 2011
Posts: 5
Hi Swastik,

Thanks for the link,But the issue I found is,If I am using webservice then how can the existing interface will take data from webservice.

I just have an callable routine ".so" file with me.

If required I can change my c program with some java program,The other way round what I was thinking to have a java program which will take and send the required xml message to other java program,other java program will parse the received xml file using Dom/SAx parser and give the required string which can be further published using appropriate methods...Kindly suggest.

-Lisha
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

I am bit confused about your requirement. Do you wish to call the .so from some java code, or do you wish to redefine the functionality of .so with some java code?


The other way round what I was thinking to have a java program which will take and send the required xml message to other java program,other java program will parse the received xml file using Dom/SAx parser and give the required string which can be further published using appropriate methods...Kindly suggest.
Lisha Ahuja
Greenhorn

Joined: Mar 06, 2011
Posts: 5
Hi Swastik,

It would be better if an external java application can call my ".so" file.

If not then I have to either develop some java program or webservice that will take an xml message from external application,parse it into the string format and then publish it on a java program.

-Lisha
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

Probably the first approach can be done using JNI, however as per me, the second approach looks better.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java-Generic Interface
 
Similar Threads
tomcat 5.5 connector
Screen Scraper. Fact or Fiction. :)
XML as an EDI type format...dont we need Java on each end?
[ Writing Webservices in COBOL ] url attached
Software that manipulates XML files