首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >node-soap只向机械土耳其人发送“帮助”请求?

node-soap只向机械土耳其人发送“帮助”请求?
EN

Stack Overflow用户
提问于 2016-05-28 05:36:33
回答 1查看 69关注 0票数 2

我正在尝试使用node-soap与Amazon Mechanical Turk进行通信。我使用this wsdl初始化soap客户端,但是当我尝试为any of the operations listed in the Mechanical turk API调用client.<SomeOperation>(...)时,我发现我得到的响应不包含any of the operations listed in the Mechanical turk API调用的结果。The API documentation says that the response should contain a "Result element",但是我发现我得到的是无用的结果,如下所示:

代码语言:javascript
复制
<HelpResponse xmlns="http://requester.mturk.amazonaws.com/doc/2014-08-15">
    <OperationRequest>
        <RequestId>(something)</RequestId>
    </OperationRequest>
    <Information>
        <Request>
            <IsValid>True</IsValid>
        </Request>
        <OperationInformation>
            <Name>Please see our online documentation at http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=28</Name>
        </OperationInformation>
    </Information>
</HelpResponse>

经过进一步的调查,我发现当我尝试使用node-soap发出API请求时,问题出在node-soap发送的内容上。比方说,当我尝试调用RegisterHITType,而不是发送<RegisterHITType>元素时,它似乎发送了某种<Help>元素,如下所示:

代码语言:javascript
复制
<Help xmlns="http://requester.mturk.amazonaws.com/doc/2014-08-15">
    <Title>(something)</Title>
    <Description>(something)</Description>
    <Reward>(something)</Reward>
    <AssignmentDurationInSeconds>(something)</AssignmentDurationInSeconds>
    <AWSAccessKeyId>(something)</AWSAccessKeyId>
    <Timestamp>(something)</Timestamp>
    <Service>AWSMechanicalTurkRequester</Service>
    <Signature>(something)</Signature>
</Help>

为什么它发送此请求而不是预期的API请求?这是一个小故障的结果,还是我误解了如何使用node-soap?有没有办法解决这个问题,或者我是否需要通过一些其他方式来研究使用Mechanical Turk API?

EN

回答 1

Stack Overflow用户

发布于 2016-06-06 11:32:12

我发现node-soap可能有bug。

请尝试使用“soap ui”自行调用web服务,以确保此web服务工作正常。(在此处https://www.soapui.org下载soap-ui )

如果web服务运行良好,那么问题出在node-soap lib上。您可以通过生成soap请求消息并直接调用服务来解决此问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37492588

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档