2011-04-12 22 views
0

我通過以下使用LoadRunner:負載亞軍:的InvokeMethod失敗:無法反序列化非XmlElement的節點#text路徑

<makeAtmPayment xmlns=\"http://[URL]" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" 
"<billerId>BILL01</billerId>" 
"<userId>950002</userId>" 
"<productCode>P1</productCode>" 
"<productParameter><value>923</value></productParameter>" 
"<paymentChannel>PAY01</paymentChannel>" 
"<paymentAmount>2</paymentAmount>" 
"<convenienceFee>1.50</convenienceFee>" 
"<effectiveDate>2011-04-14</effectiveDate>" 
"<accountId xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>" 
"<atmCardNumber>564373636363636</atmCardNumber>" 
"<editedConfirmationId xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>" 
"</makeAtmPayment>" 

和它拋出我下面的錯誤:

InvokeMethod failure: Unable to deserialize non XmlElement node #text in path '/makeAtmPayment/productParameter/name/#text'.

任何人都可以給我任何指針,我做錯了什麼?

謝謝!

回答

1

嘗試改變

<productParameter><value>923</value></productParameter> 

<productParameter><name>923</name></productParameter> 
0

我不明白的雙引號。在最開始有一個缺失,在xmlns = \「http:// [URL]之後沒有斜線。這可能是問題嗎?

+0

這是我的錯字,那不是問題。 .. :( – Arpit 2011-05-08 04:15:06

0

這是您自己創作的XML還是從loadrunner錄製中拾取的XML?如果是後者,則考慮記錄兩次,以查看在開發過程中需要適應的差異。如果是前者,那麼可以考慮通過應用程序的業務規則驗證XML,然後再通過LoadRunner進行提交,以確保XML獨立於您的測試工具。