Loopback 3 connector soap getaddrinfo ENOTFOUND

16 views
Skip to first unread message

joseph pascual

unread,
Jun 25, 2017, 9:34:58 AM6/25/17
to LoopbackJS
I just started a new LoopbackJS 3 App and would like to use the soap connector plugin. I'm trying to connect to a Soap server and here's my server/datasource.json config.

{
 
"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"
   
}
 
}
}


Using the ppsrSoapDS key as datasource I tried to call the API generated using the datasource generator similar to this procedure

This is what my API Explorer looks like.


Calling the POST /RegisterOperationsSoap11/Ping API and providing the following parameters (tested that a single parameter like this works in PHP)
{
 
"PingRequest": {
   
"CustomersRequestMessageId": "20170625100625000000" // sample value
 
}
}


I received the following error.
{
 
"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)"
 
}
}

Can anyone here enlighten me with my problem? I'm new to Loopback Soap and any Node Soap. Thank you.

Reply all
Reply to author
Forward
0 new messages