在 R 中使用 Web 服务
场景如下:
我让 JBoss 提供 Web 服务,而 JBossWS 为我提供 wsdl。到目前为止,我已经从 .NET 和 Java 连接并使用了它(一旦我弄清楚了它就变得非常容易)。我现在正尝试对 R 做同样的事情。
有没有什么被认为是“正确的方法”?我对 R 不太熟悉,而且我的搜索也没有太多结果,所以我想我应该问一下,也许可以让我的头和墙免受一点伤害。
Here's the scenario:
I have JBoss serving a web service with JBossWS providing me with a wsdl. I have connected and used it from both .NET and Java so far (and it has been quite easy once I figured it out). I am now trying to do the same with R.
Is there anything out there considered to be "the right way" for doing this? I am not that familiar with R, and my searches have not turned up much, so I figured I'd ask and maybe spare my head and the wall a bit of damage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很幸运地使用 rJava 在 R 中重新创建了可以在 Java 中运行的东西。我使用此方法通过 R 连接到 Amazon 的 AWS Java SDK 以获取其 API。例如,这允许我 从 R 向 S3 传输文件,而无需从 R 重新创建整个连接/握手/boogieWoogie。
如果你想要更多“纯R”我认为你必须使用 RCurl 和XML 包 来获取和解析 wsdl。
I have had good luck using rJava to recreate in R something that works in Java. I use this method for connecting to Amazon's AWS Java SDK for their API with R. This allows me, for example, to transfer files to/from S3 from R without having to recreate the whole connection/handshake/boogieWoogie from R.
If you wanted to go more "pure R" I think you'll have to use some combination of RCurl and the XML package to grab and parse the wsdl.
有多种方法:
您可以保留 Java 方法并使用 rJava 围绕它进行打包
您可以使用RCurl,它用于为一些更高级别的功能提供支持包(例如访问 Google API)
我相信有一个较旧的 SSOAP< /a> Omegahat 上的软件包也可能有帮助。
There are a number of ways:
You could retain your Java approach and use the rJava package around it
You could use RCurl which is used to power a few higher-level packages (accessing Google APIs, say)
I believe there is an older SSOAP package on Omegahat which may help too.