在服务器上部署(ASMX?WSDL)时,nodeJS soap不起作用

时间:2019-08-07 12:26:55

标签: node.js npm soap service asmx

我有一个节点js服务。我使用npm soap包并对asmx服务做一些请求。它在本地工作正常,但是当我部署到服务器时不起作用。 这是我的错误日志。

server-out.js

{
  "level": 50,
  "time": 1565101146712,
  "pid": 24436,
  "hostname": "micro-services-vm",
  "reqId": 8,
  "err": {
    "type": "FastifyError",
    "message": "FST_ERR_PROMISE_NOT_FULLFILLED: Promise may not be fulfilled with 'undefined' when statusCode is not 204",
    "stack": "FastifyError [FST_ERR_PROMISE_NOT_FULLFILLED]: FST_ERR_PROMISE_NOT_FULLFILLED: Promise may not be fulfilled with 'undefined' when statusCode is not 204\n    at /home/semih.altintas/eInvoice-api/node_modules/fastify/lib/wrapThenable.js:34:30\n    at processTicksAndRejections (internal/process/task_queues.js:89:5)",
    "name": "FastifyError [FST_ERR_PROMISE_NOT_FULLFILLED]",
    "code": "FST_ERR_PROMISE_NOT_FULLFILLED",
    "statusCode": 500
  },
  "msg": "Promise may not be fulfilled with 'undefined' when statusCode is not 204",
  "v": 1
}

server-error.js

Cannot read property 'CreateUserToken' of undefined
    at /home/semih.altintas/eInvoice-api/controllers/eAccountSyncController.js:25:16
    at /home/semih.altintas/eInvoice-api/node_modules/soap/lib/soap.js:84:9
    at /home/semih.altintas/eInvoice-api/node_modules/soap/lib/soap.js:39:28
    at /home/semih.altintas/eInvoice-api/node_modules/soap/lib/wsdl/index.js:1241:17
    at Request._callback (/home/semih.altintas/eInvoice-api/node_modules/soap/lib/http.js:147:28)
    at self.callback (/home/semih.altintas/eInvoice-api/node_modules/request/request.js:185:22)
    at Request.emit (events.js:200:13)
    at Request.onRequestError (/home/semih.altintas/eInvoice-api/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:200:13)
    at TLSSocket.socketErrorListener (_http_client.js:402:9)
    at TLSSocket.emit (events.js:200:13)
    at errorOrDestroy (internal/streams/destroy.js:107:12)
    at onwriteError (_stream_writable.js:438:5)
    at onwrite (_stream_writable.js:459:5)
    at internal/streams/destroy.js:49:7
    at TLSSocket.Socket._destroy (net.js:593:3)

0 个答案:

没有答案