Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon API > XML API broken with 19.5.1?

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon API  /

XML API broken with 19.5.1?

[nils.petersen@psyma.com]
nils.petersen@p…
Novice
Novice
Posts: 147
nils.petersen@psyma.com - 09:25am, Nov 13 2019

(reposting from mdbeta)

As it seems, the update from 19.5.0 to 19.5.1 broke the XML API.

We're using various automating functions (GetDomainList, GetUserInfo, SetDynamicScreen) and all of them just return an empty string.
Nothing shows up in the detail logs in \MDaemon\Logs\MdMgmtSW\ either.

Anyone using XML API and got it still working?

This PHP snippet used to work with 19.5.0:
define('MDAPIURL', 'https://mdlogtracker:xxxxxxxxxx@mail.psyma.com:3002/MdMgmtWS');

    $xml=
    '<?xml version="1.0" encoding="utf-8"?>
    <MDaemon>
        <API>
            <Request version="19.5.0" echo="1" verbose="1">
                <Operation>GetDomainList</Operation>
                <Parameters>
                    <Get>
                        <Users/>
                    </Get>
                </Parameters>
            </Request>
        </API>
    </MDaemon>';

    $ch = curl_init(MDAPIURL);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $response = curl_exec($ch);
    var_dump($response);
    curl_close($ch);

Regards
Nils



--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------

  (older msg: 4)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

nils.petersen@psyma.com (apparently) - Nov 19, 2019 5:29 am (#5 Total: 13)  

via email  

Photo of Author
nils.petersen@p…
Novice
Novice
Posts: 147
On 14.11.2019 14:54, Keith Personett wrote:

As far as the logging… Ensure that the following are set in MgmtWS.ini in the Data directory

 

[Logs]

LogHasDeviceIdEntries=No

LogHasDeviceTypeEntries=No

LogHasOperationEntries=Yes

LogHasUserEntries=Yes

LogLevel=1


Looks OK - these are the entries here:
[Logs]
HasDeviceIdEntries=No
HasDeviceTypeEntries=No
HasOperationEntries=Yes
HasUserEntries=Yes
LatestLogFile=D:\MDAEMON\LOGS\MdMgmtWS-2019-10-21.log
LogFilePrefix=MdMgmtWS
LogHasDeviceIdEntries=No
LogHasDeviceTypeEntries=No
LogHasOperationEntries=Yes
LogHasUserEntries=Yes
LogLevel=5

The leading lines Has... are legacy entries?

NP>> I think that's for ActiveSync - did anything else change as well?

 

That change affected 4 ISAPI modules, MdMgmtWS, MdAirSync, MdAutoDiscover and Mddp

 

Easiest way to verify that the API is being loaded and functioning is to just bring up the help portal by opening your browser and navigate to http[s]/{ServerName}:{Port}/{EntryUrl}

( on my main test server, for instance, https://marvel.int:444/API )


Seems that's the problem - loading https://mail.psyma.com:3002/API just results in

Not Found


Loading https://mail.psyma.com:3002/MdMgmtWS?Operation=Help does work btw.

I think I've mentioned that I tried reinstalling 19.5.1 on top (suspecting something of the kind), but that didn't change anything.

I don’t have a way to test php code… I generally test with Javascript, Powershell and C++. All of my tests with 19.5.0, 19.5.1 and 19.5.2 (internal) succeed.


You could just download and extract the current PHP 7.3 package for Windows, uncomment the line in php.ini
extension=php_curl.dll
and php snippet.php should run the script snippet.

Can you call the XML API on 19.5.1 with anything and get a result? Do you have any test code I can run here?

Best!
Nils

--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------



  (newer msg:8)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.