File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes communicate non java client with java server side components  ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "communicate non java client with java server side components  ?" Watch "communicate non java client with java server side components  ?" New topic
Author

communicate non java client with java server side components ?

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
What are the ways to communicate non java client with java server side components other than JNI and CORBA ?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
One way is web services. I've written Java JAX-RPC clients which talk to a J2EE Container's JSE (JAX-RPC service endpoint), and you can also have non-Java clients. The container vendor implements JAX-RPC servlets for the JSE, so the JSE runs in a Servlet container.

Let's say you are invoking methods on generated stubs. Based on the contents of a WSDL description of a service, a SOAP toolkit can be used to generate the stubs. (You'll have to do some research to establish what toolkits are available, I only know about how WebLogic Server generates the stubs.) These generated stubs are configured with all necessary information about the Web service and its endpoint. The client application uses the stubs to invoke remote methods available in the Web service endpoint.

The EJB 2.1 spec introduced another endpoint, the EJB endpoint. This endpoint is a stateless session bean which implements all the methods of the endpoint interface, which is a subinterface of either java.rmi.Remote or javax.ejb.EJBObject. You will still need a SOAP toolkit to generate the appropriate service interfaces to the Web service. The Web service client can then send a SOAP request to the EJB container which hosts the EJB endpoint.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Jared Richardson
author
Ranch Hand

Joined: Jun 22, 2005
Posts: 113
Originally posted by kri shan:
What are the ways to communicate non java client with java server side components other than JNI and CORBA ?


What kind of clients? If it's an HTML web page you can use straight HTML. However, you mention JNI and Corba, implying a heavy-weight program.

You can alway use straight socktets. As long as you don't try to use any type of compressed on the fly data streams, you should be fine.


Check out <b>Ship It! A Practical Guide to Shipping Software</b><br /> <br /><a href="http://www.pragmaticprogrammer.com/titles/prj/" target="_blank" rel="nofollow">http://www.pragmaticprogrammer.com/titles/prj/</a>
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
My client is VC++.
How can i use socket communication between VC++ client and java serrver side components ?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
Basically you just open streams and send bytes. Each side has to agree what the bytes mean, so it takes some planning.
I did a Java search engine talking to Perl program clients and sending binary data over permanently open socket connections - the receiving side had to know when a block of data was complete so each communication started with a byte count for the data block to follow. We also had to cope with the way each machine used byte order in representing ints.
Bill
 
jQuery in Action, 2nd edition
 
subject: communicate non java client with java server side components ?
 
Similar Threads
Best solution for my distributed application
How to build?
JSP and JavaBeans ??
C++ client connects with java server components?
@Ejb annotation does not work