本文介绍了Powershell和XMLRPC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是一家广泛使用Powershell的Windows商店.我们还有一个Spacewalk,我想从现有Powershell脚本中轮询一些数据.通过XMLRPC公开Spacewalk API.

We are a Windows shop using Powershell extensively.We also have a Spacewalk that I would like to poll some data from as part of the existing Powershell script. Spacewalk API is exposed via XMLRPC.

我花了一些时间来搜索有关如何完成此操作的示例,但是信息确实很少.我能得到的最接近的是此链接(不再可用) https://web.archive.org/web/20080202045713/http://thepowershellguy.com/blogs/posh/archive/2008/01/31/powershell-and-xmlrpc-posh-challenge-part-12.aspx

I have spent some time searching for examples on how this can be done but the information is really scarce. The closest I could get was this link ( no longer available)https://web.archive.org/web/20080202045713/http://thepowershellguy.com/blogs/posh/archive/2008/01/31/powershell-and-xmlrpc-posh-challenge-part-12.aspx

缺乏示例使我认为我的方向是错误的.我知道new-webserviceproxy,我用它来查询Sharepoint,但是我看不到有人用它来进行XMLRPC调用.

Lack of examples makes me think that I am looking in the wrong direction. I know about new-webserviceproxy and I used it for quering Sharepoint but I don't see anyone using it for XMLRPC calls.

用Perl或Python编写调用很简单,但这在这种情况下不是我所需要的...

It is trivial to write the call in Perl or Python but this is not what I need in this specific case...

我在这里走错路了吗?

推荐答案

您是否看过 XML-RPC.NET ?您必须在C#中创建一个实现IXmlRpcProxy的XmlRpcProxyGen类,但是一旦完成,就应该能够加载该.NET程序集并使用PowerShell中的代理类.

Have you looked at XML-RPC.NET? You would have to create a XmlRpcProxyGen class in C# that implements IXmlRpcProxy but once you've done that, you should be able to load that .NET assembly and use the proxy class from PowerShell.

这篇关于Powershell和XMLRPC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!