Problem reading data values with the web api

Hi

I am trying to read data values using the web api, and followed the developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

This error happens when even typing the request on the browser this way http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam

Hi Adam,
This is not an error really, but just your browser telling you that it cannot render the XML which the API returns to it. You can use Google Chrome or Firefox and you will be able to see the XML. There are also browser plugins available which will render it more human readable form.

Regards,

Jason

···

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com wrote:

Hi

I am trying to read data values using the web api, and followed the developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

This error happens when even typing the request on the browser this way http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You can also replace .XML with .json for an alternative view.

···

On May 15, 2015 6:19 AM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Adam,
This is not an error really, but just your browser telling you that it cannot render the XML which the API returns to it. You can use Google Chrome or Firefox and you will be able to see the XML. There are also browser plugins available which will render it more human readable form.

Regards,

Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com wrote:

Hi

I am trying to read data values using the web api, and followed the developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

This error happens when even typing the request on the browser this way http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi,

Thank you for your answers.

I tried that too, by directly entering the query in the browser (Chrome). I get in response an xml file that contains no value. I also tried with json. With csv, I get on the browser this more explicit message:

HTTP Status 406 -

···

On Fri, May 15, 2015 at 8:34 AM, Knut Staring knutst@gmail.com wrote:

You can also replace .XML with .json for an alternative view.

On May 15, 2015 6:19 AM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Adam,
This is not an error really, but just your browser telling you that it cannot render the XML which the API returns to it. You can use Google Chrome or Firefox and you will be able to see the XML. There are also browser plugins available which will render it more human readable form.

Regards,

Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com wrote:

Hi

I am trying to read data values using the web api, and followed the developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

This error happens when even typing the request on the browser this way http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,
Adam

Which browsers? Which version of DHIS2? Is the system running well otherwise?

Can you check the logfile in the Tomcat logs folder?

···

On Fri, May 15, 2015 at 9:45 AM, Adam Uhuru adam.uhuru@gmail.com wrote:

Hi,

Thank you for your answers.

I tried that too, by directly entering the query in the browser (Chrome). I get in response an xml file that contains no value. I also tried with json. With csv, I get on the browser this more explicit message:

HTTP Status 406 -


type Status report

message

description The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request “accept” headers ().


Apache Tomcat/7.0.26

Is there something to check on the server ?


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

On Fri, May 15, 2015 at 8:34 AM, Knut Staring knutst@gmail.com wrote:

You can also replace .XML with .json for an alternative view.

On May 15, 2015 6:19 AM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Adam,
This is not an error really, but just your browser telling you that it cannot render the XML which the API returns to it. You can use Google Chrome or Firefox and you will be able to see the XML. There are also browser plugins available which will render it more human readable form.

Regards,

Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com wrote:

Hi

I am trying to read data values using the web api, and followed the developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

This error happens when even typing the request on the browser this way http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,
Adam

I’m currently trying with curl, typing the request as described in the developer manual. I get this in catalina.out log:

  • INFO 2015-05-15 08:00:41,376 Get XML data value set for data set: g7iYkNW2YXJ, period: 201405, org unit: s4ubWiG4w51 (DataValueSetController.java [http-bio-8080-exec-76])

And within curl window:

Authorization: Basic YWRtaW46TGluS21TSVMyMDE0

User-Agent: curl/7.42.0

Accept:application/xml

< HTTP/1.1 200 OK

< Server: Apache-Coyote/1.1

< Set-Cookie: JSESSIONID=B2C948AB94C974571F2DFD519DD35CB7; Path=/; HttpOnly

< Content-Type: application/xml;charset=UTF-8

< Transfer-Encoding: chunked

< Date: Fri, 15 May 2015 08:00:41 GMT

<

<?xml version='1.0' encoding='UTF-8'?>

I also tried with my ssh connection to type the curl request directly on the server shell. Same result.

I’m using DHIS2 version 2.15

···

On Fri, May 15, 2015 at 10:48 AM, Knut Staring knutst@gmail.com wrote:

Which browsers? Which version of DHIS2? Is the system running well otherwise?

Can you check the logfile in the Tomcat logs folder?

On Fri, May 15, 2015 at 9:45 AM, Adam Uhuru adam.uhuru@gmail.com wrote:

Hi,

Thank you for your answers.

I tried that too, by directly entering the query in the browser (Chrome). I get in response an xml file that contains no value. I also tried with json. With csv, I get on the browser this more explicit message:

HTTP Status 406 -


type Status report

message

description The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request “accept” headers ().


Apache Tomcat/7.0.26

Is there something to check on the server ?

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

On Fri, May 15, 2015 at 8:34 AM, Knut Staring knutst@gmail.com wrote:

You can also replace .XML with .json for an alternative view.

On May 15, 2015 6:19 AM, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Adam,
This is not an error really, but just your browser telling you that it cannot render the XML which the API returns to it. You can use Google Chrome or Firefox and you will be able to see the XML. There are also browser plugins available which will render it more human readable form.

Regards,

Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com wrote:

Hi

I am trying to read data values using the web api, and followed the developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

This error happens when even typing the request on the browser this way http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,
Adam

Regards,
Adam

That xml looks perfectly well formed. Just that there are no
datavalues to be retrieved for that dataset - orgunit - period
combination.

···

On 15 May 2015 at 09:16, Adam Uhuru <adam.uhuru@gmail.com> wrote:

I'm currently trying with curl, typing the request as described in the
developer manual. I get this in catalina.out log:

* INFO 2015-05-15 08:00:41,376 Get XML data value set for data set:
g7iYkNW2YXJ, period: 201405, org unit: s4ubWiG4w51
(DataValueSetController.java [http-bio-8080-exec-76])

And within curl window:

Authorization: Basic YWRtaW46TGluS21TSVMyMDE0
User-Agent: curl/7.42.0
Accept:application/xml

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=B2C948AB94C974571F2DFD519DD35CB7; Path=/; HttpOnly
< Content-Type: application/xml;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Fri, 15 May 2015 08:00:41 GMT
<
<?xml version='1.0' encoding='UTF-8'?><dataValueSet
xmlns="http://dhis2.org/schema/dxf/2.0" dataSet="g7iYkNW2YXJ"
period="201405" orgUnit="s4ubWiG4w51"/>

I also tried with my ssh connection to type the curl request directly on the
server shell. Same result.

I'm using DHIS2 version 2.15

On Fri, May 15, 2015 at 10:48 AM, Knut Staring <knutst@gmail.com> wrote:

Which browsers? Which version of DHIS2? Is the system running well
otherwise?

Can you check the logfile in the Tomcat logs folder?

On Fri, May 15, 2015 at 9:45 AM, Adam Uhuru <adam.uhuru@gmail.com> wrote:

Hi,

Thank you for your answers.
I tried that too, by directly entering the query in the browser (Chrome).
I get in response an xml file that contains no value. I also tried with
json. With csv, I get on the browser this more explicit message:

HTTP Status 406 -

________________________________

type Status report

message

description The resource identified by this request is only capable of
generating responses with characteristics not acceptable according to the
request "accept" headers ().

________________________________

Apache Tomcat/7.0.26

Is there something to check on the server ?

On Fri, May 15, 2015 at 8:34 AM, Knut Staring <knutst@gmail.com> wrote:

You can also replace .XML with .json for an alternative view.

On May 15, 2015 6:19 AM, "Jason Pickering" <jason.p.pickering@gmail.com> >>>> wrote:

Hi Adam,
This is not an error really, but just your browser telling you that it
cannot render the XML which the API returns to it. You can use Google Chrome
or Firefox and you will be able to see the XML. There are also browser
plugins available which will render it more human readable form.

Regards,
Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru <adam.uhuru@gmail.com> >>>>> wrote:

Hi

I am trying to read data values using the web api, and followed the
developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated
with it. The document tree is shown below.

This error happens when even typing the request on the browser this
way
http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,
Adam
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

--
Regards,
Adam

--
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org

--
Regards,
Adam

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Hi Uhuru,

I generally tend to use Postman - REST Client a chrome extension for testing the web services. You can try it too.

Regards,

Michael

···

On 15 May 2015 at 04:22, Bob Jolliffe bobjolliffe@gmail.com wrote:

That xml looks perfectly well formed. Just that there are no

datavalues to be retrieved for that dataset - orgunit - period

combination.

On 15 May 2015 at 09:16, Adam Uhuru adam.uhuru@gmail.com wrote:

I’m currently trying with curl, typing the request as described in the

developer manual. I get this in catalina.out log:

  • INFO 2015-05-15 08:00:41,376 Get XML data value set for data set:

g7iYkNW2YXJ, period: 201405, org unit: s4ubWiG4w51

(DataValueSetController.java [http-bio-8080-exec-76])

And within curl window:

Authorization: Basic YWRtaW46TGluS21TSVMyMDE0

User-Agent: curl/7.42.0

Accept:application/xml

< HTTP/1.1 200 OK

< Server: Apache-Coyote/1.1

< Set-Cookie: JSESSIONID=B2C948AB94C974571F2DFD519DD35CB7; Path=/; HttpOnly

< Content-Type: application/xml;charset=UTF-8

< Transfer-Encoding: chunked

< Date: Fri, 15 May 2015 08:00:41 GMT

<

<?xml version='1.0' encoding='UTF-8'?><dataValueSet

xmlns=“http://dhis2.org/schema/dxf/2.0” dataSet=“g7iYkNW2YXJ”

period=“201405” orgUnit=“s4ubWiG4w51”/>

I also tried with my ssh connection to type the curl request directly on the

server shell. Same result.

I’m using DHIS2 version 2.15

On Fri, May 15, 2015 at 10:48 AM, Knut Staring knutst@gmail.com wrote:

Which browsers? Which version of DHIS2? Is the system running well

otherwise?

Can you check the logfile in the Tomcat logs folder?

On Fri, May 15, 2015 at 9:45 AM, Adam Uhuru adam.uhuru@gmail.com wrote:

Hi,

Thank you for your answers.

I tried that too, by directly entering the query in the browser (Chrome).

I get in response an xml file that contains no value. I also tried with

json. With csv, I get on the browser this more explicit message:

HTTP Status 406 -


type Status report

message

description The resource identified by this request is only capable of

generating responses with characteristics not acceptable according to the

request “accept” headers ().


Apache Tomcat/7.0.26

Is there something to check on the server ?

On Fri, May 15, 2015 at 8:34 AM, Knut Staring knutst@gmail.com wrote:

You can also replace .XML with .json for an alternative view.

On May 15, 2015 6:19 AM, “Jason Pickering” jason.p.pickering@gmail.com

wrote:

Hi Adam,

This is not an error really, but just your browser telling you that it

cannot render the XML which the API returns to it. You can use Google Chrome

or Firefox and you will be able to see the XML. There are also browser

plugins available which will render it more human readable form.

Regards,

Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com

wrote:

Hi

I am trying to read data values using the web api, and followed the

developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated

with it. The document tree is shown below.

This error happens when even typing the request on the browser this

way

http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Adam

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Thank you.

It happens that our system contains 2 data sets, taking account of the fact that paper forms have evolved in the past (changes in the combinations of categories, mainly). Curiously, even if recent data is captured from the DHIS2 forms of the last dataset, they are only visible through the API with the oldest dataset id. Using the new dataset id won’t give any data. Could I have confirmation that things work this way ?

Best regards

···

On Fri, May 15, 2015 at 11:31 AM, Michael Mwebaze michael.mwebaze@gmail.com wrote:

Hi Uhuru,

I generally tend to use Postman - REST Client a chrome extension for testing the web services. You can try it too.

Regards,

Michael

On 15 May 2015 at 04:22, Bob Jolliffe bobjolliffe@gmail.com wrote:

That xml looks perfectly well formed. Just that there are no

datavalues to be retrieved for that dataset - orgunit - period

combination.

On 15 May 2015 at 09:16, Adam Uhuru adam.uhuru@gmail.com wrote:

I’m currently trying with curl, typing the request as described in the

developer manual. I get this in catalina.out log:

  • INFO 2015-05-15 08:00:41,376 Get XML data value set for data set:

g7iYkNW2YXJ, period: 201405, org unit: s4ubWiG4w51

(DataValueSetController.java [http-bio-8080-exec-76])

And within curl window:

Authorization: Basic YWRtaW46TGluS21TSVMyMDE0

User-Agent: curl/7.42.0

Accept:application/xml

< HTTP/1.1 200 OK

< Server: Apache-Coyote/1.1

< Set-Cookie: JSESSIONID=B2C948AB94C974571F2DFD519DD35CB7; Path=/; HttpOnly

< Content-Type: application/xml;charset=UTF-8

< Transfer-Encoding: chunked

< Date: Fri, 15 May 2015 08:00:41 GMT

<

<?xml version='1.0' encoding='UTF-8'?><dataValueSet

xmlns=“http://dhis2.org/schema/dxf/2.0” dataSet=“g7iYkNW2YXJ”

period=“201405” orgUnit=“s4ubWiG4w51”/>

I also tried with my ssh connection to type the curl request directly on the

server shell. Same result.

I’m using DHIS2 version 2.15

On Fri, May 15, 2015 at 10:48 AM, Knut Staring knutst@gmail.com wrote:

Which browsers? Which version of DHIS2? Is the system running well

otherwise?

Can you check the logfile in the Tomcat logs folder?

On Fri, May 15, 2015 at 9:45 AM, Adam Uhuru adam.uhuru@gmail.com wrote:

Hi,

Thank you for your answers.

I tried that too, by directly entering the query in the browser (Chrome).

I get in response an xml file that contains no value. I also tried with

json. With csv, I get on the browser this more explicit message:

HTTP Status 406 -


type Status report

message

description The resource identified by this request is only capable of

generating responses with characteristics not acceptable according to the

request “accept” headers ().


Apache Tomcat/7.0.26

Is there something to check on the server ?

On Fri, May 15, 2015 at 8:34 AM, Knut Staring knutst@gmail.com wrote:

You can also replace .XML with .json for an alternative view.

On May 15, 2015 6:19 AM, “Jason Pickering” jason.p.pickering@gmail.com

wrote:

Hi Adam,

This is not an error really, but just your browser telling you that it

cannot render the XML which the API returns to it. You can use Google Chrome

or Firefox and you will be able to see the XML. There are also browser

plugins available which will render it more human readable form.

Regards,

Jason

On Fri, May 15, 2015 at 3:36 AM Adam Uhuru adam.uhuru@gmail.com

wrote:

Hi

I am trying to read data values using the web api, and followed the

developer manual. I am getting this error message each time:

This XML file does not appear to have any style information associated

with it. The document tree is shown below.

This error happens when even typing the request on the browser this

way

http://domain:port/api/dataValueSets.xml?dataSet=ID1&orgUnit=ID2&period=201401

Do you know what could raise this error ?

Thank you for your help.

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Adam

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Regards,

Adam


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,
Adam