Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9068647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:14:27+00:00 2026-06-16T17:14:27+00:00

I’ve never tried this before but I’m trying to use PHP to get data

  • 0

I’ve never tried this before but I’m trying to use PHP to get data about an exchange account (for example the number of emails in the Inbox and the amount of unread email in the inbox). Just for the record, the PHP server is on a different domain than the exchange server.

My PHP server is running on:
– System: Linux
– PHP Version 5.3.3
– cURL Information 7.19.7
– cURL NTLM Yes
– Soap Client and server enabled

The Excahnge is running:
– Version 14.1 or Exchange 2010 SP1

I have tried 3 PHP libraries that all return a very similar error. The Heartspring Exchange Web Services for PHP, PHP-EWS and EWSWrapper libraries.

As all 3 libraries require, I downloaded the three files from the exchange server and placed them in the appropriate location on the PHP server web directory:
– Services.wsdl (used both uppercase and lovercase first letter)
– messages.xsd
– types.xsd

I also added the ExchangeServiceBinding to Services.wsdl and pointed the soap:address location to the exchange servers Exchange.asmx (I tested the link and it´s correct).

I get a very similar error message with all 3 libraries, here is the full error from EWSWrapper:

    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: 
    Parsing Schema: can't import schema from 
    '/var/www/vhosts/domain.com/EWSWrapper/wsdl/types.xsd'in 
    /var/www/vhosts/domain.com/EWSWrapper/NTLMSoapClient/Exchange.php:52 
    Stack trace: #0 
    /var/www/vhosts/domain.com/EWSWrapper/NTLMSoapClient/Exchange.php(52):
    SoapClient->SoapClient('/var/www/vhosts...', Array) 
    #1 
    /var/www/vhosts/domain.com/EWSWrapper/ExchangeWebServices.php(483): 
    NTLMSoapClient_Exchange->__construct('/var/www/vhosts...', Array) 
    #2 
    /var/www/vhosts/domain.com/EWSWrapper/ExchangeWebServices.php(235): 
    ExchangeWebServices->initializeSoapClient() 
    #3 
    /var/www/vhosts/domain.com/EWSWrapper/EWSWrapper.php(529): 
    ExchangeWebServices->FindFolder(Object(EWSType_FindFolderType)) 
    #4 
    /var/www/vhosts/domain.com/EWSWrapper/test in
    /var/www/vhosts/domain.com/EWSWrapper/NTLMSoapClient/Exchange.php on line 52

The Exchange.php:52 points to:

parent::__construct($wsdl, $options);

The ExchangeWebServices.php(483) points to:

protected function initializeSoapClient() {
        return new NTLMSoapClient_Exchange(
            dirname(__FILE__).'/wsdl/services.wsdl',
            array(
                'user' => $this->username,
                'password' => $this->password,
                'location' => 'https://'.$this->server.'/EWS/Exchange.asmx',
            )); // end return
    } // end function initializeSoapClient()

There I tried having the server path (/var/www/…) and also the web url path (http://domain.com/…) to the services.wsdl and also the server location, that changes nothing exept for the urls in the error code above.

The ExcahngeWebServices.php(235) point to:

public function FindFolder($request) {
        $request->getAsSOAP();
        return $this->initializeSoapClient()->{__FUNCTION__}($request);
    } // end function FindFolder()

It´s seems that there might be an issue with the $request, as the next trace EWSWrapper.php(529) point to:

// make the actual call
        $response = $this->ews->FindFolder($request);

        return $response;

Any help would be appreciated as an extensive Google and Stack Exchange search has not helped. I would think that the path to the types.xsd is wrong or something wrong with the $request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:14:28+00:00Added an answer on June 16, 2026 at 5:14 pm

    I traced the problem to a possible Bug in PHP or a possible solution for some users that are not effected by the bug:

    1. Bug #61463: cant import schema when using https soapservice

    2. Storing services.wsdl, types.xsd and messages.xsd locally but referring the schema import in services.wsdl to the exchange servers messages.xsd and also in messages.xsd referring the schema import to the exchange servers types.xsd (instead of the locally stored ones that for some reason can not be imported in my case).

    After that I no longer get the Parsing Schema: can't import schema from error with at least the code provided in Talking SOAP With Exchange.

    I´m actually still getting the schema import error on the posted server in the original post. But NOT on another test server running PHP 5.2.7. I´m guessing that the PHP BUG is not effecting that test server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I want to construct a data frame in an Rcpp function, but when I
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.