When importing the wsdl file from https://ourmail.server/ews/services.wsdl, I initially got a ton of "The following types, referred to in the WSDL document are not being represented in this file" in the generated services.pas.
I then downloaded the wdsl file to disk, saw that it referenced http://schemas.microsoft.com/exchange/services/2006/messages and http://schemas.microsoft.com/exchange/services/2006/types, downloaded https://ourmail.server/ews/types.xsd and https://ourmail.server/ews/messages.xsd
and modified the start of services.wdsl from
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:s="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="messages.xsd"/>
</xs:schema>
</wsdl:types>
to:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:s="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="file://d:/testing/web/exchange web services/types.xsd"/>
<xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="file://d:/testing/web/exchange web services/messages.xsd"/>
</xs:schema>
</wsdl:types>
Now the generated services.pas contains (only) these errors:
// ************************************************************************ //
// The following types, referred to in the WSDL document are not being represented
// in this file. They are either aliases[@] of other types represented or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Embarcadero types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:double - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:duration - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:time - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:base64Binary - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:boolean - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:int - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:string - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:language - "http://www.w3.org/2001/XMLSchema"[Hdr][Gbl]
// !:dateTime - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:lang - "http://www.w3.org/2001/XMLSchema"[GblAttr]
// !:nonNegativeInteger - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:anyURI - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:short - "http://www.w3.org/2001/XMLSchema"[Gbl]
What "xs:import" line can I add to resolve these?
I have searched around for the W3C's datatypes.xsd and structures.xsd and tried the same approach, but I can't get it to work.