0
votes

I am calling EWS service on internal network which has not access to Internet.

I can open EWS url with browser and verify that it is up an running. But when I try to send the SOAP request.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" 
       xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2007_SP1" />
  </soap:Header>
  <soap:Body>
    <m:GetFolder>
      <m:FolderShape>
        <t:BaseShape>IdOnly</t:BaseShape>
      </m:FolderShape>
      <m:FolderIds>
        <t:DistinguishedFolderId Id="calendar" />
      </m:FolderIds>
    </m:GetFolder>
  </soap:Body>
</soap:Envelope>

It fails with error ENOTFOUD. I am assuming that it can not connect to given address in the SOAP xml for schema definitions.

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

How to deal with this when there is no internet connection.

I am sending request from meteor.js app using lather.js library.

1

1 Answers

0
votes

The stuff that looks like URL:s, prefixed with xmlns, are just name spaces and shall not be called. A bit like namespaces in a java program (for example namespace com.sun.something) is not an url you can call.

You should just do a http POST and send the entire xml file to the soap server, which can be an internal ip number that is not on the internet.