Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ews = Meteor.npmRequire('node-ews');
- var username = 'administrator@exch2013.local';
- var password = 'Pa$$w0rd';
- var host = '192.168.50.192';
- process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
- ews.ignoreSSL = true;
- ews.auth(username, password, host);
- ews.run('GetFolder',
- {
- body: {
- FolderShape: {
- BaseShape: 'Default'
- },
- FolderIds: {
- DistinguishedFolderId: {
- attributes: {
- Id: 'inbox'
- }
- }
- }
- },
- headers: {
- 'http://schemas.microsoft.com/exchange/services/2006/types': [{
- RequestServerVersion: {
- attributes: {
- Version: 'Exchange2013'
- }
- }
- }]
- }
- }, function(err, result) {
- console.log("Here is the result");
- console.log(JSON.stringify(result, null, 2));
- console.log("==========================================================");
- console.log("Here is error");
- console.log(JSON.stringify(err, null, 2));
- console.log("==========================================================");
- }
- );
- {
- "root": {
- "Envelope": {
- "Body": {
- "Fault": {
- "faultcode": "a:ErrorSchemaValidation",
- "faultstring": {
- "attributes": {
- "xml:lang": "en-US"
- },
- "$value": "The request failed schema validation: The element 'GetFolder' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'body' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'FolderShape' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'."
- },
- "detail": {
- "ResponseCode": "ErrorSchemaValidation",
- "Message": "The request failed schema validation.",
- "MessageXml": {
- "LineNumber": "1",
- "LinePosition": "478",
- "Violation": "The element 'GetFolder' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'body' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'FolderShape' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'."
- }
- }
- }
- }
- }
- },
- "response": {
- "statusCode": 500,
- "body": "<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode><faultstring xml:lang="en-US">The request failed schema validation: The element 'GetFolder' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'body' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'FolderShape' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'.</faultstring><detail><e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode><e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message><t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><t:LineNumber>1</t:LineNumber><t:LinePosition>478</t:LinePosition><t:Violation>The element 'GetFolder' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'body' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'FolderShape' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'.</t:Violation></t:MessageXml></detail></s:Fault></s:Body></s:Envelope>",
- "headers": {
- "cache-control": "private",
- "transfer-encoding": "chunked",
- "content-type": "text/xml; charset=utf-8",
- "server": "Microsoft-IIS/8.5",
- "request-id": "55604f74-3d8a-4c38-9013-f73b1bb46c8e",
- "x-targetbeserver": "exsrv2013.exch2013.local",
- "x-diaginfo": "EXSRV2013",
- "x-aspnet-version": "4.0.30319",
- "set-cookie": [
- "exchangecookie=80f1a4a9812e48e198b1aedd5647dbbb; expires=Fri, 02-Jun-2017 11:04:40 GMT; path=/; HttpOnly",
- "X-BackEndCookie=S-1-5-21-3055284827-1559891991-3414097450-500=u56Lnp2ejJqBz8bGmZvGnsnSzsnGndLLmc/J0p3LmcbSzpqcyczHx8+azsfJgYHJ0M3Qzc/Oyd/OzsXOy8XLz9++sg==; expires=Thu, 02-Jun-2016 11:14:40 GMT; path=/EWS; secure; HttpOnly"
- ],
- "persistent-auth": "true",
- "x-powered-by": "ASP.NET",
- "x-feserver": "EXSRV2013",
- "date": "Thu, 02 Jun 2016 11:04:39 GMT"
- },
- "request": {
- "uri": {
- "protocol": "https:",
- "slashes": true,
- "auth": null,
- "host": "192.168.50.192",
- "port": 443,
- "hostname": "192.168.50.192",
- "hash": null,
- "search": null,
- "query": null,
- "pathname": "/EWS/Exchange.asmx",
- "path": "/EWS/Exchange.asmx",
- "href": "https://192.168.50.192/EWS/Exchange.asmx"
- },
- "method": "post",
- "headers": {
- "Content-Type": "text/xml; charset=utf-8",
- "SOAPAction": ""http://schemas.microsoft.com/exchange/services/2006/messages/GetFolder"",
- "Connection": "keep-alive",
- "Authorization": "NTLM TlRMTVNTUAADAAAAGAAYAIAAAAAYABgAmAAAAAAAAABIAAAAOAA4AEgAAAAAAAAAgAAAAAAAAACwAAAABYKIogUBKAoAAAAPYQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBAAGUAeABjAGgAMgAwADEAMwAuAGwAbwBjAGEAbAC6qN2n2xCgUgAAAAAAAAAAAAAAAAAAAAAF0f9pc5Kjl/rW+LUJhdYADmJV2IBc1Zw=",
- "content-length": 863
- }
- }
- },
- "body": "<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode><faultstring xml:lang="en-US">The request failed schema validation: The element 'GetFolder' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'body' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'FolderShape' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'.</faultstring><detail><e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode><e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message><t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><t:LineNumber>1</t:LineNumber><t:LinePosition>478</t:LinePosition><t:Violation>The element 'GetFolder' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has invalid child element 'body' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'FolderShape' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'.</t:Violation></t:MessageXml></detail></s:Fault></s:Body></s:Envelope>"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement