|
脚本中请求如下:
soap_request("StepName=SQLSelect_176",
"URL=http://10.0.16.245/SqlEngineService.asmx",
"SOAPEnvelope=<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"no\"?>"
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/"
"envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi="
"\"http://www.w3.org/2001/XMLSchema-instance\">\r\n<soap:Body>\r\n"
"<SQLSelect xmlns=\"http://tempuri.org/\">\r\n<in0>NG0001</in0>\r\n"
"<in1>LZWnY0oUgGtFMo2pA3pA4pA5pA</in1>\r\n"
"<in2>true</in2>\r\n"
"</SQLSelect>\r\n</soap:Body>\r\n</soap"
":Envelope>",
"Snapshot=d74.inf",
"ResponseParam=response",
LAST);
由于<in1>节点是加密后的串,所以需要通过一个参数调用DLL加密后,然后再传
现在的做法是:
str1= "SOAPEnvelope=<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"no\"?>"
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/"
"envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi="
"\"http://www.w3.org/2001/XMLSchema-instance\">\r\n<soap:Body>\r\n"
"<SQLSelect xmlns=\"http://tempuri.org/\">\r\n<in0>NG0001</in0>\r\n"
"<in1>"
str2=</in1>\r\n"
"<in2>true</in2>\r\n"
"</SQLSelect>\r\n</soap:Body>\r\n</soap"
":Envelope>"
然后 str=str1+encode+str2
soap_request("StepName=SQLSelect_176",
"URL=http://10.0.16.245/SqlEngineService.asmx",
str,
"Snapshot=d74.inf",
"ResponseParam=response",
LAST);
觉得这个办法太笨拙,是否有更简便的办法,直接用encode替换掉请求中<in1></in1>之间的内容。 |
|