• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

communicate non java client with java server side components ?

 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the ways to communicate non java client with java server side components other than JNI and CORBA ?
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My client is VC++.
How can i use socket communication between VC++ client and java serrver side components ?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic