This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.net web services with java!

 
Mateen Dar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i consume a web service written in C#, from with my j2se application.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should not be any different from accessing a web service implemented in any other language. That is, after all, one of the benefits of web services: that they are platform and language-independent, as long as they work according to the specifications (SOAP, WSDL, BP etc.). Try to get the WSDL for the service, and create a Java client for it. It's very possible that it will just work.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to take a good look at the WSDL before you go any further.

Make sure that it is clear of .NET specific data types like DataSet, DataTable, DataRelation, DataRow, DataColumn etc.

If any of those are in there, it may very well be impossible. It is possible to build interoperable web services with .NET, as long as your web service provider is paying attention.

On the other hand, if you build a .NET web service from one of those early tutorials that hands out a ADO.NET DataSet - you might as well forget it.

Example: look for bizarre namespaces like "xmlns:s0="xmlnet/cs/0735618011" and later


Another problem can occur if the web services provider elects to use Windows Security rather than WS-Security to secure the web service - basically restricting potential clients to Windows-based .NET clients.

You could use WebServiceStudio 2.0 to "explore" the web service if you have access to a Windows machine and don't mind installing .NET 1.1 on. (I'm not aware of the Java equivalent; also, it is two years old, so it doesn't support some of the more recent fancy stuff).
[ October 03, 2005: Message edited by: Peer Reynders ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic