Windows Phone 7/ Silverlight 上的 Hessian?

发布于 2024-08-28 15:48:09 字数 225 浏览 5 评论 0原文

我使用 hessian 协议在服务器(java)和各种客户端应用程序之间进行通信。现在我开始开发Windows Phone 7客户端。我下载了 hessian C# 实现,但它无法针对 Windows Phone 7/silverlight 进行编译。

有人设法让它在 WP7/Silverlight 上运行吗?看起来有很多事情需要完成/更改才能使其发挥作用,如果已经有人完成了,我想避免这样做。

谢谢。

I'm using hessian protocol for communication betwee server (java) and various client applications. Now I started to develop Windows Phone 7 client. I downloaded hessian C# implementation but it does not compile for windows phone 7/silverlight.

Does anyone managed to make it work on WP7/Silverlight? It's looks like there is many thing to be done/changed to make it work, which I'd like to avoid if it has been done by someone already.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

佼人 2024-09-04 15:48:09

无法编译的是什么?我猜测该实现可能是使用套接字。请记住,Silverlight(以及 wp7)限制了您可以打开的网络连接类型...更喜欢异步 Web 请求(通过 WebRequest 类)或 WCF 服务。

您下载的代码很可能与电话/silverlight 上可用的网络类的紧凑框架版本存在问题。有关套接字支持的更多信息,请参阅此 msdn 文章:
http://msdn.microsoft.com/en- us/library/cc296248%28VS.95%29.aspx

如果您想在手机和运行 hessian 协议的服务器之间直接通信,最简单的方法可能是通过在 asp 上运行的 wcf 服务代理通信.net 服务器。

What is it that does not compile? I'm guessing that the implementation is probably using sockets. Please keep in mind that Silverlight (and thus, wp7) limits the kinds of network connections you can open ... preferring asynchronous web requests (via the WebRequest class) or WCF services.

Chances are the code you downloaded is having problems with the compact framework version of the network classes available on the phone/silverlight. See this msdn article for more information about the socket support:
http://msdn.microsoft.com/en-us/library/cc296248%28VS.95%29.aspx

If you want to communicate directly between the phone and a server running the hessian protocol the easiest way will probably be to proxy communication via a wcf service running on an asp.net server.

网白 2024-09-04 15:48:09

所以答案是你必须重写 hessian C# 实现,因为 Silverlight 4 没有很多来自 .net 移动框架的东西,主要是 Proxy 类。

So answer is you have to rewrite hessian C# implementation as Silverlight 4 doesn't have lot of stuff from .net mobile framework, mainly Proxy class.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文