It's not a secret anymore!
The moose likes Servlets and the fly likes .net client invoking java code on server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark ".net client invoking java code on server" Watch ".net client invoking java code on server" New topic

.net client invoking java code on server

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
I want to get some .NET client apps used by customers to talk to a program on our server. I suppose this would make RMI out of the question, so I'm wondering how they can communicate with the server. I figure that they could send XML summaries of transactions, but I'm not sure what the best way to do that is--just open a connection to the server and upload a stream of bytes? What about if the app needs to check to see if it's the latest version? What's the best way to send a message with my version number and IP address to a Java program on a server? Just send a stream of chars to it and have it respond with the URL for downloading the latest patch? Can my program invoke a servlet directly? I'm not asking for a solution--I just want to be steered in the best direction since there's so much stuff out there.
Eelco den Heijer
Ranch Hand

Joined: Jan 17, 2002
Posts: 61
If you have access to an HTTP client in .NET (I would think that this is the case) then doing a GET or POST to a servlet sounds like a good idea.
Another possibility is exposing your Java server side functionality as a web service.
Option nr. 3: CORBA!

== <br />Rgrds,<br />Eelco<br /> <br />SCJP, SCJD, SCBCD, SCWD, SCEA
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
I like the sound of a web service--sounds pretty friendly...especially for something as lightweight as checking versioning/updates. But what about the part where I need to upload data about a transaction, especially if a simple XML file doesn't turn out to be sufficient? Should that be handled through a web service provided by the server, or should I use one of the other routes?
What does "nr" mean? Thanks...
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
SOAP is a strong standard for XML over HTTP request and response services. You can get into it without even learning XML with tools like GLUE (very easy, Java only) or Systinet WASP (more platforms, less easy). Are you using new .NET languages? You can probably consume a SOAP service with only a few declarative statements.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Originally posted by S. C. Huey:

What does "nr" mean? Thanks...

nr. means number. So he was mentioning CORBA as option number 3.

I agree. Here's the link:
subject: .net client invoking java code on server
jQuery in Action, 3rd edition