0

很长一段时间以来,我一直在为这个简单的问题苦苦挣扎。

我正在尝试向该网站发布 XML 请求,但我什至不知道从哪里开始。首先应该使用哪个软件?

XML 框架在文档中进行了描述(http://profiles.catalyst.harvard.edu/docs/ProfilesRNS_DisambiguationEngine.pdf

我的问题更多的是在哪里输入?

谢谢

罗曼

4

1 回答 1

0

这就是所谓的 RPC-XML 请求。您将按照文档指定的方式发出 Web 请求。您如何进行取决于您将使用的语言。在 C# 中,你会做这样的事情:

// create a web request that'll post some xml content to a web service
string url = "http://profiles.catalyst.harvard.edu/services/GetPMIDs/default.asp";
var request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = "text/xml";

// set the content length based on the data you are passing through the
// web call
var data = Encoding.UTF8.GetBytes("<generated xml here as a string>");
request.ContentLength = data.Length;

// write the data to the request stream before you actually make the 
// the request.
using (var stream = request.GetRequestStream())
    stream.Write(data, 0, data.Length);

// actually make the web request and get the response.
// this will hold the response from the request when it completes
var response = request.GetResponse().GetResponseStream();
于 2013-07-23T20:26:02.760 回答