Given request
"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.openkm.com">
<soapenv:Header/>
<soapenv:Body>
<ws:login>
<!--Optional:-->
<user>TestUser</user>
<!--Optional:-->
<password>TestUser</password>
</ws:login>
</soapenv:Body>
</soapenv:Envelope>
"""
When soap action 'http://ws.openkm.com/OKMAuth/login'
Then status 200
* def token = //return结果= response={soap:Envelope={={soap:Body={ns2:loginResponse={={return=a866fb4f-47e4-4895-ac13-2118b6c025c8},@={xmlns:ns2=ws.openkm.com}},@={xmlns:soap=schemas.xmlsoap.org/soap/envelope}}},responseStatus=200,_responseStatus=200=-1,responseCookies=null,令牌=a866fb4f-47e4-4895-ac13-2118b6c025c8}
我从一个请求中得到了这个答复。我怎样才能从身体中得到“回报”或“象征”?
发布于 2017-12-12 01:38:14
您似乎还没有阅读过关于呼叫功能的文档。除非您清楚它的工作原理,否则我建议您根本不使用call。
我仍然无法读取您的响应XML,所以我不能说//return是否真的获得了您想要的值。假设是这样的,现在您已经将它分配给了一个名为result的变量,在RequestToken.feature中是正确的。现在,试试这个:
# this result will again contain a variable 'result'
* def result = call creator
* def return = result.result
* print return除非你仔细阅读医生,否则我帮不上忙。
https://stackoverflow.com/questions/47756777
复制相似问题