Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java-Generic Interface

 
Lisha Ahuja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1604
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using a web service? Correct me if I am wrong?
 
Lisha Ahuja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Swastik,

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

-Lisha
 
Swastik Dey
Rancher
Posts: 1604
5
Android Java Java ME
 
Lisha Ahuja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1604
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1604
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably the first approach can be done using JNI, however as per me, the second approach looks better.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic