全部,
我对 SPML 或网络服务完全陌生。我知道有很多关于这个问题的问题。我已经尝试了我能找到的一切。但是,我想我的问题是不知道如何格式化请求。
protected void Page_Load(object sender, EventArgs e)
{
AddRequestType addreq = new AddRequestType();
addreq.executionMode = ExecutionModeType.asynchronous;
addreq.returnData = ReturnDataType.identifier;
identity ident = new identity();
ident.username = new string[] { "jsmith" };
X509Store store = new X509Store(StoreName.TrustedPublisher, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
var cert = store.Certificates;
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;
SPMLService client = new SPMLService();
client.UseDefaultCredentials = true;
var res = client.SPMLAddRequest(addreq);
AddResponseType addresp = new AddResponseType();
//addresp.requestID={ requestID};
var status = addresp.status;
var error = addresp.error;
var error_msg = addresp.errorMessage;
}
我在计算机上有一个证书,我可以阅读该证书。非常感谢任何有关如何创建 SMPL 请求的指导。