This question is an exact duplicate of:
- AQL Query returns a Promise
I have been trying to get a query result from Arangodb in to my front end service (Angular 4) using soap message. I am able to get a result of the query but printed out in console.log. But how can I get it under this function (Service).
So that I can feed into the soap message:
var soap_msg = '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:examples:CheckUserNameService">' +
'<soapenv:Header/>' +
'<soapenv:Body>' +
'<urn:CheckUserNameResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">' +
'<status xsi:type="xsd:string">' + (Service) + '</status>' +
'</urn:CheckUserNameResponse>' +
'</soapenv:Body>' +
'</soapenv:Envelope>';
I posted this issue got a response saying to use await or .this(), then I have updated my code but still the error remains.
I have tried to feed in to a random variable with some string like this to check the soap msg.,
var payload = [null,"192.168.72.237"];
it works fine.There is a problem with query
var Service = db.query(aqlQuery `
LET startVertex = (FOR doc IN spec
FILTER doc.serial_no == '"123456abcde"'
LIMIT 2
RETURN doc
)[0]
FOR v IN 1 ANY startVertex belongs_to
RETURN v.ip`, {
bindVar1: 'value',
bindVar2: 'value',
}).then(function(res) {
console.log("doc" + res._result);
})
The versions are
- "node": "8.9.4"
- "arangojs": "^5.8.0",
- "express": "^4.16.2",
- "express-generator": "^4.15.5"
I don't have a clue to take it forward from here.