dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #07195
Re: Problem reading data values with the web api
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@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxx> wrote:
>>
>>> You can also replace .XML with .json for an alternative view.
>>> On May 15, 2015 6:19 AM, "Jason Pickering" <jason.p.pickering@xxxxxxxxx>
>>> 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@xxxxxxxxx>
>>>> 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@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-users
>>>> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>> 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
Follow ups
References