錄制完腳本,像往常一樣,給腳本增加了手動關聯(lián)的函數(shù)去獲取接口的返回值,并沒有用web service自帶的去獲取返回值。腳本如下:
web_reg_save_param("returnCode", "LB=HTTP\/1.1", "RB=OK", "Ord=1", "NotFound=ERROR", LAST); web_service_call( "StepName=getDownloadKey_102", "SOAPMethod=MusicPaymentService.MusicPayment.getDownloadKey", "ResponseParam=response", "WSDL=http://192.168.104.51:28080/jboss-net/services/MusicPayment?wsdl", "UseWSDLCopy=1", "Snapshot=t1259034940.inf", BEGIN_ARGUMENTS, "xml:event=<event><DID>00000</DID><DIDPwd>222222" "333333</DIDPwd><MSISDN>{MSISDN}</MSISDN><NAS_GGSN_ID>10.10.10." "10</NAS_GGSN_ID><accessPlatformID>" "0021010</accessPlatformID><contentID>" "123456789012345678</contentID><copyRightID>123456789012</copyRightID><feeKind>" "03</feeKind><oprSrc>2</oprSrc><oprType>0</oprType>" "<recieverNumber>{recieverNumber}" "</recieverNumber><role>000</role><roleCode>000</roleCode><size>1024</size>" "<subscriptionKind>002</subscriptionKind><terminalID>0001</terminalID><validCode>" "</validCode></event>", END_ARGUMENTS, BEGIN_RESULT, END_RESULT, LAST); lr_log_message("returnCode is : %s",lr_eval_string ("{returnCode}")); |
回放的時候就出問題了,總是報“Warning: The string 'returnCode' with parameter delimiters is not a parameter.”的錯誤,日志輸出也是“returnCode is :{returnCode}”。