2013-07-23 5 views

답변

0

이는 RPC-XML 요청으로 알려진 것입니다. 문서에 지정된 방식으로 형식화 된 웹 요청을 작성하게됩니다. 진행 방법은 사용할 언어에 따라 다릅니다. 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();