Loopback 3连接器soap getaddrinfo ENOTFOUND

时间:2017-06-25 12:08:41

标签: node.js soap loopbackjs getaddrinfo

我刚刚开始使用新的LoopbackJS 3应用程序,并希望使用soap连接器插件。我试图连接到Soap服务器,这是我的server / datasource.json配置。

{
  "db": {
    "name": "db",
    "connector": "memory"
  },
  "ppsrSoapDS": {
    "url": "http://schemas.ppsr.gov.au/2016/05/services",
    "name": "ppsrSoapDS",
    "wsdl": "./wsdl/schemas.ppsr.gov.au.2016.05.services.wsdl",
    "remotingEnabled": true,
    "connector": "soap",
    "soapHeaders": [{
      "element": {
        "Security": {
          "UsernameToken": {
            "Username": "<Sampleusername>",
            "Password": "<Samplepassword>"
          }
        }
      },
      "prefix": "wsse",
      "TargetEnvironment" : "Discovery",
      "namespace": "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" ,
      "hostname": "http://schemas.ppsr.gov.au/2016/05/services"
    }],
    "wsdl_options": {
      "soap_version": "SOAP_1_1", 
      "exceptions": true, 
      "trace": 1, 
      "wdsl_local_copy": true
    },
    "security" : {
      "scheme": "WS",
      "username": "<Sampleusername>",
      "password": "<Samplepassword>",
      "passwordType": "PasswordText"
    }
  }
}

使用ppsrSoapDS键作为数据源我试图调用使用与此procedure类似的数据源生成器生成的API

这就是我的API资源管理器的样子。enter image description here

调用POST /RegisterOperationsSoap11/Ping API并提供以下参数(测试像这样的单个参数在PHP中有效)

{
  "PingRequest": {
    "CustomersRequestMessageId": "20170625100625000000" // sample value
  }
}

我收到以下错误。

{
  "error": {
    "statusCode": 500,
    "name": "Error",
    "message": "getaddrinfo ENOTFOUND schemas.ppsr.gov.au schemas.ppsr.gov.au:80",
    "code": "ENOTFOUND",
    "errno": "ENOTFOUND",
    "syscall": "getaddrinfo",
    "hostname": "schemas.ppsr.gov.au",
    "host": "schemas.ppsr.gov.au",
    "port": 80,
    "stack": "Error: getaddrinfo ENOTFOUND schemas.ppsr.gov.au schemas.ppsr.gov.au:80\n    at errnoException (dns.js:28:10)\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)"
  }
}

这里的任何人都可以用我的问题来启发我吗?我是Loopback Soap和任何Node Soap的新手。谢谢。

0 个答案:

没有答案