RESTful .NET 和 protobuf-net
是否可以在使用 WCF RESTful 入门套件或 OpenRasta 创建的 RESTful Web 服务中使用 protobuf-net?如果可能的话,有可用的示例或代码片段吗?我正在创建一个 .NET Web 服务,它将由 Java 客户端使用。
Is it possible to use protobuf-net in RESTful webservices created using WCF RESTful starter kit or OpenRasta? If it possible, are there any examples or code snippets available? I am creating a .NET Web Service which will be consumed by Java client.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我没有/具体地/看过它,但额外的工具可能可以帮助解决这个问题。
如果您同时使用 java 和 .NET,那么这将是一个比 protobuf-net 更大的问题;你还需要能够将它作为java端来使用。 protobuf(有线格式)是跨平台的,protobuf-net 只是一种特定的实现。
如果您首选的 REST API 允许高效的
byte[]
处理(作为消息中的 base-64 字符串,或作为原始响应),您可以将其视为二进制。如果您可以向我指出您想要使用的工具,我可以看一下,但我不能保证立即提供任何帮助。
I haven't looked at it /specifically/, but it is potentially something that extra tooling could help with.
If you are working with both java and .NET, then it is a bigger question than just protobuf-net; you'd need to be able to consume it as the java end as well. protobuf (the wire format) is cross-platform, with protobuf-net being just one specific implementation.
If your preferred REST API allows efficient
byte[]
handling (either as a base-64 string in a message, or as the raw response) you could just treat it as binary.If you can point me at the tooling you want to use, I can take a look, but I can't guarantee anything immediate.
OR 中没有对协议缓冲区的开箱即用支持,但插入新编解码器以读取和写入格式需要 5 个语言。
There is no out of box support for protocol buffer in OR, but it's a 5 linuers to plug-in a new codec to read and write the format.