MantisBT

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000268WebSolarLogBackendpublic2014-08-12 10:212014-09-08 15:45
Reporterkkaiser 
Assigned Tomfrijmann 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in VersionRelease 1.1.1 
Summary0000268: Enhance API.PHP return to XML file instead
DescriptionFor any other external reading of the data a more convient reply from the api.php return file would be to receive an XML file instead of the current structure.

Like the attached example i have generated manually out of the return of api.php/Live

Cheers
Karsten
TagsNo tags attached.
Attached Filesxml file icon SampleApiReturn.xml [^] (1,150 bytes) 2014-08-12 10:21
? file icon outputPVAPI [^] (981 bytes) 2014-09-02 17:38 [Show Content]

- Relationships

-  Notes
(0000471)
mfrijmann (administrator)
2014-08-12 11:37

Xml format should be possible.
We use JSON for WSL and is in most cases faster and consumes less data.
(0000476)
mfrijmann (administrator)
2014-08-21 08:58

Is this solution working for you?
(0000495)
mfrijmann (administrator)
2014-08-28 09:32

please give us an update!
(0000496)
kkaiser (reporter)
2014-09-01 11:12

Sorry didnt receive a notification.

I checked and validated the XML file - and it seems there is one issue on the file itself with an invalid element name.

http://www.w3schools.com/xml/xml_validator.asp [^] reports that <0> is not possible as element name. Numbes are not possible to be used as Element name. As well the metering part
</metering>
seems to need an open/ end tag like:
<metering></metering>
even though emtpty.

to check you should be able to open the file in any browser and the structure should be shown.

I will review the call from openhab later this week with a correct file that looks like my attached version.

Cheers
Karsten
(0000497)
mfrijmann (administrator)
2014-09-01 12:04

I checked it before committing the code and found no problems.

Here is mine Live call in XML and the XML_validator confirms that there are no issues with it.
http://www.frijmann.nl/websolarlog/json2xml.php?url=www.frijmann.nl/websolarlog/api.php/Live [^]

Please send me an email with the URL to your WSL or atleast the output of your XML.
(0000500)
kkaiser (reporter)
2014-09-02 17:40

i have uploaded my output. the json2xml.php i dont have at the moment in my stable 1.1 version.

Cheers
Karsten
(0000501)
mfrijmann (administrator)
2014-09-05 13:02

You could download json2xml.php and utils/array2xml.php place them in there directories and you could use it.
(0000505)
mfrijmann (administrator)
2014-09-08 15:45

The source can be found on SourceForge;
http://sourceforge.net/p/websolarlog/code/HEAD/tree/ [^]

The files are here;
http://sourceforge.net/p/websolarlog/code/HEAD/tree/trunk/json2xml.php [^]
http://sourceforge.net/p/websolarlog/code/HEAD/tree/trunk/utils/array2xml.php [^]

Let me known if it works!

- Issue History
Date Modified Username Field Change
2014-08-12 10:21 kkaiser New Issue
2014-08-12 10:21 kkaiser File Added: SampleApiReturn.xml
2014-08-12 11:37 mfrijmann Note Added: 0000471
2014-08-12 11:37 mfrijmann Assigned To => mfrijmann
2014-08-12 11:37 mfrijmann Status new => confirmed
2014-08-12 11:37 mfrijmann Assigned To mfrijmann =>
2014-08-21 08:49 mfrijmann Changeset attached => SourceForge trunk r1854
2014-08-21 08:58 mfrijmann Note Added: 0000476
2014-08-28 09:32 mfrijmann Assigned To => mfrijmann
2014-08-28 09:32 mfrijmann Status confirmed => feedback
2014-08-28 09:32 mfrijmann Note Added: 0000495
2014-09-01 11:12 kkaiser Note Added: 0000496
2014-09-01 11:12 kkaiser Status feedback => assigned
2014-09-01 12:04 mfrijmann Note Added: 0000497
2014-09-02 17:38 kkaiser File Added: outputPVAPI
2014-09-02 17:40 kkaiser Note Added: 0000500
2014-09-05 13:02 mfrijmann Note Added: 0000501
2014-09-08 09:56 mfrijmann Status assigned => resolved
2014-09-08 09:56 mfrijmann Fixed in Version => Release 1.1.1
2014-09-08 09:56 mfrijmann Resolution open => fixed
2014-09-08 15:45 mfrijmann Note Added: 0000505


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker