0

I have to set up a desktop Java client that will communicate with a .NET desktop application. The .NET application exposes its services through a webserver of its own. Rather than have my Java app frequently poll it for data changes, it was suggested that the .NET app contact my Java desktop app via a webservice or similar technique. I am not familiar with web services, but as I understand you would need some sort of web app container such as Tomcat to host it. Is there a way to set up a listening socket in my app as a webservice end point without effectively rewriting a webserver from scratch? Alternately, are there other or better ways for a .NET desktop application to talk to a Java Swing desktop application?

Rex
  • 801
  • 1
  • 17
  • 26

1 Answers1

0

If you are using JRE 6 then you can use the Endpoint.publish() method to create an in-app server and expose a service.
Refer the simple tutorial in the link to see an example of the same.
How the Endpoint.publish() works is it internally creates a light weight server and makes the SOAP service available on that location.

AdityaKeyal
  • 1,208
  • 8
  • 14
  • To add to the answer above, I think you should also take a look at this question [link](http://stackoverflow.com/questions/1292171/deploy-java-web-service-without-using-web-server) – Aditya K Apr 23 '14 at 12:06