This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java in General and the fly likes call .net webservice from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "call .net webservice from java" Watch "call .net webservice from java" New topic

call .net webservice from java

J Vaughan

Joined: Jun 29, 2009
Posts: 1

I am VERY new to java (about 2 days) so please excuse me if this is a very simple question, however I cannot find an answer to it after spending the last day searching.

I have a fairly significant application built in .net & have now hit upon an issue which, from my research shows that I will need to use a java applet for one small piece of functionality.

This applet will need to consume a .Net webservice for certain information, to do this in c# is very simple.

However could someone please explain to me how I can do this in Java, with a code example if at all possible, as every method I have tried so far is just throwing an exception for me ?

Thanks in advance

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45289
Welcome to JavaRanch

That is by no means a simple question: don't know how to do it myself (sorry). Since we like to restrict this forum to simple questions, I shall move your thread elsewhere. It's not really a "Java in General intermediate" question, but I think you will get more replies here than in web services or similar.
Igor Schmuzkofski

Joined: Jun 26, 2009
Posts: 2

This isn't a simple question, even less for a java-newbe! Do you know something about WSDL and other Webservice-stuff? Then you make get a try with apache-cxf (

Lilte roadmap:
1. (create wsdl)
2. generate java-code with cxf out of the wsdl
3. insert generated code to you project
4. instanciate and call the generated client

There are other WS-frameworks for java as well, but cxf is the simplest one at the moment (anybody knows a simpler framework?)

Good look :-)


Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45289
And please have another look at your private messages, "Igor".
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

I also second Apache CXF. It supports JAX-WS as well as JAX-RS.

SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
subject: call .net webservice from java
It's not a secret anymore!