【问题标题】:TypeError: Object #<ServerResponse> has no method 'en'类型错误:对象 #<ServerResponse> 没有方法“en”
【发布时间】:2013-05-28 17:59:38
【问题描述】:

我正在运行一个 Node.js 服务,该服务使用node-soap 将来自另一个服务的soap 响应转换为JSON,然后返回给调用者。它还可以在其他方面发挥作用,将 JSON 转换为 Soap 并将其交付给服务。

但调用几个服务时出现以下错误:

TypeError: Object #<ServerResponse> has no method 'en'
at C:\...\soap.js:47:11
at C:\...\node_modules\soap\lib\client.js:84:13
at C:\...\node_modules\soap\lib\client.js:150:24
at Request._callback (C:\...\node_modules\soap\lib\http.js:48:13)
at Request.self.callback (C:\...\node_modules\soap\node_modules\request\index.js:148:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (C:\...\node_modules\soap\node_modules\request\index.js:876:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (C:\...\node_modules\soap\node_modules\request\index.js:827:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)

我找不到任何人发布相同的错误,也找不到这可能是什么。

感谢所有帮助。

【问题讨论】:

    标签: node.js soap


    【解决方案1】:

    编辑C:\...\soap.js:47:11 并修复调用.en 而不是.on 的行。我认为这只是一个错字。

    【讨论】:

    • 你知道,你的权利。我将那行完全读为 .on 并开始查看我正在使用的库。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-08
    • 1970-01-01
    • 1970-01-01
    • 2016-10-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多