1

We have created RESTful web services using Spring's REST support.

We need to call those web services from .NET aplication.

Is it possible to do this i.e. calling web services written in java from .NET?

ajm
  • 12,863
  • 58
  • 163
  • 234

3 Answers3

3

As long as you can deserialize objects serialized by the remote REST service, you wont have any difficulty using it in .NET. RESTful services are meant to be shared access multiple domains.

Especially if you plan on using WCF as a client the REST services, there is a brand new API emerging which is absolutely fantastic: http://wcf.codeplex.com/wikipage?title=WCF%20HTTP

Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
  • Our web services will be returning the JSON data. So does this changes anything? – ajm May 14 '11 at 14:18
  • No, on the contrary, it is quite nice as .NET has a good internal JSON serializer class (http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx) and there is also a very good open-source JSON library (http://json.codeplex.com/) – Teoman Soygul May 14 '11 at 14:20
  • Can we use WCF as java client too? – ajm May 14 '11 at 14:31
  • 1
    In a .NET app, WCF can be used as a client to any service provider (written in Java, C, or any other language). In a Java app, you need to use a Java REST Client api. Here is a discussion: http://stackoverflow.com/questions/221442/rest-clients-for-java – Teoman Soygul May 14 '11 at 14:34
1

Just use Spring.NET REST Client Framework using the RestTemplate : http://springframework.net/index.html#spring-rest-1.0.0-released

I think you will not get lost!

  • Bruno
bbaia
  • 1,193
  • 7
  • 8
0

REST is HTTP, so any client that can send an HTTP request to your service and unmarshal an HTTP response can interact with it.

duffymo
  • 305,152
  • 44
  • 369
  • 561