|
Action()
{
int i;
int NumOfValues;
char buf[1024];
int num;
int maxnum;
web_add_auto_header("Accept-Encoding", "gzip, deflate");
web_add_auto_header("Accept-Language", "zh-cn");
web_add_auto_header("SOAPAction", "\"\"");
web_add_auto_header("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)");
lr_think_time(15);
web_add_header("Content-Type", "text/xml; charset=utf-8");
silverlight_soap_request("StepName=findAllIrpSysUsrstorclsByUsrId",
"URL=http://10.229.171.93:8080/rsp/webservices/CommonService",
"SOAPEnvelope=<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"no\"?"
"><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s"
":Body><findAllIrpSysUsrstorclsByUsrId xmlns=\"http://"
"service.app.rsp.abchina.com\"><in0>123456789012345678</in0></"
"findAllIrpSysUsrstorclsByUsrId></s:Body></s:Envelope>",
"Snapshot=t27.inf",
"ResponseParam=response",
LAST);
NumOfValues= lr_xml_get_values("XML={response}",
"Query=/Envelope/Body/findAllIrpSysUsrstorclsByUsrIdResponse/out/IrpSysUsrstorclsVO/clsId",
"ValueParam=clsId",
"SelectAll=Yes",
LAST);
for ( i = 0; i < NumOfValues; i++) {
sprintf( buf,"{clsId_%d}",i + 1 );
num = atoi(lr_eval_string(buf));
if(maxnum<num)
maxnum = num;
sprintf( buf,"max value:%d",maxnum );
}
lr_output_message(lr_eval_string( buf ));
web_add_header("Content-Type", "text/xml; charset=utf-8");
silverlight_soap_request("StepName=findUsrStorClByWhere",
"URL=http://10.229.171.93:8080/rsp/webservices/CommonService",
"SOAPEnvelope=<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"no\"?"
"><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s"
":Body><findUsrStorClByWhere xmlns=\"http://"
"service.app.rsp.abchina.com\"><in0 xmlns:i=\"http://www.w3.org/2001/"
"XMLSchema-instance\" xmlns:d4p1=\"http://vo.web.app.rsp.abchina.com\">"
"<d4p1:cfgbsl i:nil=\"true\"/><d4p1:clsId>0</d4p1:clsId><d4p1:clsidstr "
"i:nil=\"true\"/><d4p1:cltdesc i:nil=\"true\"/><d4p1:clttim i:nil=\""
"true\"/><d4p1:dspsqn i:nil=\"true\"/><d4p1:endfix i:nil=\"true\"/>"
"<d4p1:rsccod i:nil=\"true\"/><d4p1:rscfrq i:nil=\"true\"/><d4p1"
":rscfrqstr>0</d4p1:rscfrqstr><d4p1:rscnam i:nil=\"true\"/><d4p1:rsctyp"
" i:nil=\"true\"/><d4p1:rsctypstr>0</d4p1:rsctypstr><d4p1:sbjcod i:nil="
"\"true\"/><d4p1:srccod i:nil=\"true\"/><d4p1:topcount i:nil=\"true\"/>"
"<d4p1:usrId>123456789012345678</d4p1:usrId></in0></"
"findUsrStorClByWhere></s:Body></s:Envelope>",
"Snapshot=t28.inf",
"ResponseParam=response",
LAST);
lr_think_time(6);
web_add_header("Content-Type", "text/xml; charset=utf-8");
silverlight_soap_request("StepName=insertIrpSysUsrstorcls",
"URL=http://10.229.171.93:8080/rsp/webservices/CommonService",
"SOAPEnvelope=<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"no\"?"
"><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s"
":Body><insertIrpSysUsrstorcls xmlns=\"http://"
"service.app.rsp.abchina.com\"><in0 xmlns:i=\"http://www.w3.org/2001/"
"XMLSchema-instance\" xmlns:d4p1=\"http://vo.web.app.rsp.abchina.com\">"
"<d4p1:clsId>14</d4p1:clsId><d4p1:clsnam>127</d4p1:clsnam><d4p1:dspsqn"
">1</d4p1:dspsqn><d4p1:supclsId>0</d4p1:supclsId><d4p1:usrId"
">123456789012345678</d4p1:usrId></in0></insertIrpSysUsrstorcls></s"
":Body></s:Envelope>",
"Snapshot=t29.inf",
"ResponseParam=response",
LAST);
lr_think_time(5);
web_add_header("Content-Type", "text/xml; charset=utf-8");
silverlight_soap_request("StepName=insertIrpSysUsrstorcls_2",
"URL=http://10.229.171.93:8080/rsp/webservices/CommonService",
"SOAPEnvelope=<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"no\"?"
"><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s"
":Body><insertIrpSysUsrstorcls xmlns=\"http://"
"service.app.rsp.abchina.com\"><in0 xmlns:i=\"http://www.w3.org/2001/"
"XMLSchema-instance\" xmlns:d4p1=\"http://vo.web.app.rsp.abchina.com\">"
"<d4p1:clsId>15</d4p1:clsId><d4p1:clsnam>127</d4p1:clsnam><d4p1:dspsqn"
">1</d4p1:dspsqn><d4p1:supclsId>14</d4p1:supclsId><d4p1:usrId"
">123456789012345678</d4p1:usrId></in0></insertIrpSysUsrstorcls></s"
":Body></s:Envelope>",
"Snapshot=t30.inf",
"ResponseParam=response",
LAST);
return 0;
}
把取得的buf值加1,然后定义成一个参数,参数化要用,新人代码水平差,求助 |
|