Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
483 views
in Technique[技术] by (71.8m points)

qaf - Getting error on executing POST request in Qmetry

With Qmetry framework, Trying to execute the below POST request (with xml content in body). Due to client confidentiality, I have not mentioned exact URLs in the below code.

POST REQUEST:

post.sample.call={'headers':{'SoapAction':'<url here>','Content-Type':'text/xml;charset=UTF-8','Accept':'*/*','Authorization':'<authorization key here>'},'endPoint':'<endpoint here>','baseUrl':'<url here>','method':'POST','query-parameters':{},'form-parameters':{},'body':'<sending xml content here>'}

It throws error :

Caused by: java.lang.IllegalArgumentException: Passed in key must select exactly one node: post.sample.call

This works fine when run through postman. But fails with Qmetry.

Any change required in the above post method to run in qmetry? Please let me know.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Error message itself provides the reason!...

Passed in key must select exactly one node:post.sample.call

Indicates that you may have multiple entries or values of post.sample.call property. Issue most probably here is ; in value. ; is used as list separator, so if required in property value, add escape char before it. For example

text/xml;charset=UTF-8

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...