如何使用C#在ASP.net3.5中调用/使用Java restful Web服务 [英] How to invoke/consume Java restful web service in ASP.net3.5 using C#

查看:111
本文介绍了如何使用C#在ASP.net3.5中调用/使用Java restful Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我目前正在使用asp.net 3.5设计一个Web应用程序,但是web服务是用java设计的,并生成JSON。

我想通过网络服务获取并将数据发布到数据库。



我到目前为止找到的所有文章都使用肥皂,但任何人都可以请告诉我如何使用C#在ASP.net 3.5中调用/使用Java restful Web服务



我还想知道是否可以绑定任何控件我的网络表单到网络服务器中的一个方法



请帮助我需要在截止日期前完成并且我真的很喜欢这个正确的





提前感谢您的时间

Hello everyone, I am currently designing a web application with asp.net 3.5, but the webservice is designed in java and produces JSON.
I want to get and post data to the database through the webservice.

All the articles i found so far use soap but can anyone please tell me how to invoke/consume Java restful web service in ASP.net 3.5 using C#

And i also would like to know if is possible to bind any control in my webform to a method in the webserver

Please help i need to meet a deadline and im really struglling to get this right


Thanks in advance for your time

推荐答案

您可以通过任何编程语言轻松实现宁静的Web服务还有Javascript。尝试



0)使用HTTP类向指定参数的webservice发送请求

1)从响应中获取结果

2)在.Net中使用lib或API for JSON,因为你可以解析结果

3)使用解析数据



试试要阅读使用浏览器访问服务,您可以使用C#执行类似的操作。 &安培; JSON.Net (也许您可以找到.Net的JSON请求)
Restful web service is easy you can do it by any programming language also Javascript. try

0) use HTTP classes to send request to webservice with specified parameters
1) get results from response
2) use a lib or API for JSON in .Net, for you can parse results
3) use parsed data

try to read Accessing Services Using Browsers you can do something like it with C#. & JSON.Net (maybe you can found JSON Request for .Net)


这篇关于如何使用C#在ASP.net3.5中调用/使用Java restful Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆