Coder Social home page Coder Social logo

DTD are not supported by SOAP about php-ews HOT 12 CLOSED

garethp avatar garethp commented on August 10, 2024
DTD are not supported by SOAP

from php-ews.

Comments (12)

Garethp avatar Garethp commented on August 10, 2024 1

Can you show me your code? I'm not really sure what a DTD is. Also, are you able to tell me what version of the library you're using it? Line 128 should just be a }, but like 127 should look like return parent::__call($name, $args);, which is where I would expect the error to be thrown.

The actual link shouldn't work, because it's a reference, like a namespace for XML. You can see that if you look at Resources/wsdl/types.xsd

from php-ews.

Garethp avatar Garethp commented on August 10, 2024 1

That is really interesting. Quick fix though, change that to outlook.office365.com

from php-ews.

Garethp avatar Garethp commented on August 10, 2024 1

No problems. I test against outlook365 myself, so you saying you were having an issue with it sparked something

from php-ews.

thefoxlab avatar thefoxlab commented on August 10, 2024

Thanks sir for reply

Yes, Here is my code:

require_once "vendor/autoload.php";

//Include the API
use garethp\ews\API;
use garethp\ews\API\ExchangeWebServices;
use garethp\ews\API\Enumeration;
use garethp\ews\API\Type;


//Create and build the client
$server = "outlook.office.com";
$username = "MYEMAIL";
$password = "PSSWORD";

$api = API::withUsernameAndPassword($server, $username, $password);
$calendar = $api->getCalendar();

$start = new DateTime('2016-05-11 8:00 AM');
$end = new DateTime('2016-05-11 9:00 AM');

$createdItemIds = $calendar->createCalendarItems(array(
    'Subject' => 'Test BY API',
    'Start' => $start->format('c'),
    'End' => $end->format('c')
));
echo "Event is created <br/>";
echo "<pre> <strong>EVENT ID:: </strong>"; print_r($createdItemIds[0]->getId());
exit;

I have installed this repository though composer.

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

In NTLMSoapClient, can you do a var_dump($request) on line 212 and past the XML output either here or in a gist?

from php-ews.

thefoxlab avatar thefoxlab commented on August 10, 2024

Here is XML output

<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages"><SOAP-ENV:Header><ns1:RequestServerVersion Version="Exchange2010"/></SOAP-ENV:Header><SOAP-ENV:Body><ns2:GetFolder><ns2:FolderShape><ns1:BaseShape>Default</ns1:BaseShape></ns2:FolderShape><ns2:FolderIds><ns1:DistinguishedFolderId Id="calendar"/></ns2:FolderIds></ns2:GetFolder></SOAP-ENV:Body></SOAP-ENV:Envelope>

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

Can you confirm that you have the Resources/wsdl/services.wsdl file?

from php-ews.

thefoxlab avatar thefoxlab commented on August 10, 2024

<-- xml was here -->

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

Thanks for that. What's the URL that you enter in your $server variable

from php-ews.

thefoxlab avatar thefoxlab commented on August 10, 2024

$server = "outlook.office.com";

from php-ews.

thefoxlab avatar thefoxlab commented on August 10, 2024

Actually, I've a 365 office account and i am trying to create event in my calendar with this library.. It's works fine before but have issues since yesterday.. I have tried code in two different server.. But have same problem. Since then, I'm trying to find solution but hard luck :(

from php-ews.

thefoxlab avatar thefoxlab commented on August 10, 2024

OMG!!!

Yay!! It's works.. Thank you so much for helping me to find it.. 👍

from php-ews.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.