DASISH / dwan-backend

DASISH Task 5.6. Annotation framework backend
0 stars 1 forks source link

Message: The request sent by the client was syntactically incorrect. #5

Closed nostneji closed 10 years ago

nostneji commented 10 years ago

I used the latest version of client (LRECdemo) with server lux17.mpi.nl/ds/webannotator-basic. Annotation was not saved because server got some syntax error. I verified the sent xml-data against DASISH-schema.xsd and it was ok.

Sent request:

"POST /ds/webannotator-basic/api/annotations?store=true"
<?xml version="1.0" encoding="UTF-8"?>
  <annotation xmlns="http://www.dasish.eu/ns/addit"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xsi:schemaLocation="http://www.dasish.eu/ns/addit http://dasish.eu/DASISH-schema.xsd"
                            xmlns:xhtml="http://www.w3.org/1999/xhtml"
                            URI="https://lux17.mpi.nl/ds/webannotator-basic/api/annotations/00000000-0000-0000-2014-072812390200"
                            ownerRef="https://lux17.mpi.nl/ds/webannotator-basic/api/principals/00000000-0000-0000-2014-072812390200">
  <headline>Python's birthday</headline>
  <lastModified>2014-07-28T09:37:02.000Z</lastModified>
  <body>
    <xmlBody>
      <mimeType>application/xml+xhtml</mimeType>
      <xhtml:span title="December 1989" style="background-color: rgb( 44, 254,  81);color:rgb(0,0,0);">December 1989</xhtml:span>
    </xmlBody>
  <body>
  <targets>
    <targetInfo ref="https://lux17.mpi.nl/ds/webannotator-basic/api/targets/00000000-0000-0000-2014-072812390200">
<link>http://en.wikipedia.org/wiki/Python_(programming_language)#xpointer(start-point(string-range(//div[@id="toc"]/following-sibling::blockquote[1]/p[1]/text()[1],'',23))/range-to(string-range(//div[@id="toc"]/following-sibling::blockquote[1]/p[1]/text()[1],'',36)))</link>
     <version>2014-07-28T09:37:02.000Z</version>
   </targetInfo>
 </targets>
 <permissions public="read"/>
</annotation>

Received response:

HTTP/1.1 400 Bad Request
<html><head><title>Apache Tomcat/6.0.37 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - Bad Request</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Bad Request</u></p><p><b>description</b> <u>The request sent by the client was syntactically incorrect.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.37</h3></body></html>
nostneji commented 10 years ago

This problem is a blocker, please check the backend and web server logs in order to understand a reason of that error. Last time I runned the tests was around 26.08.2014 07:33 UTC. I can reproduce this error in my computer every time with DWAN client in Firefox 31.0 browser and with test scripts from https://github.com/DASISH/dwan-testing/tree/master/scripts.

olhsha commented 10 years ago

Pls, have a look at my e-mail form 27/06. The correct xml file of the annotation to be sent to webannotator-basic should be like the one below. It must be compliant with the newer version of the schema http://lux17.mpi.nl/schemacat/schemas/s16/files/DASISH-schema.xsd. The frontend for this schema is under development. Stephanie is working on it. Once it is fixed, we update webannotator for shibboleth users as well, so both shibbolized and basic-authentication version will be synchronized. I hope it will happened on tomorrow 26/09, when Stephanie is here.

Moreover, it is a bit strange but in the xml you have sent there is no closing tag for , but I see opening tag instead. I hope that this is a typo, but not what is sent by the client.

<?xml version="1.0" encoding="UTF-8"?> <annotation xmlns="http://www.dasish.eu/ns/addit" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dasish.eu/ns/addit http://lux17.mpi.nl/schemacat/schemas/s16/files/DASISH-schema.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml" xml:id="A0000000-0000-0000-2014-072812390200" href="/ds/webannotator-basic/api/annotations/A0000000-0000-0000-2014-072812390200">

/ds/webannotator-basic/api/principals/00000000-0000-0000-2014-072812390200
<headline>Python's birthday</headline>
<lastModified>2014-07-28T09:37:02.000Z</lastModified>
<body>
    <xmlBody>
        <mimeType>application/xml+xhtml</mimeType>
        <xhtml:span title="December 1989" style="background-color: rgb( 44, 254,  81);color:rgb(0,0,0);">December 1989/xhtml:span
    </xmlBody>
 </body>
        <targets>
            <targetInfo href="/ds/webannotator-basic/api/targets/00000000-0000-0000-2014-072812390200">
                <link>http://en.wikipedia.org/wiki/Python_(programming_language)#xpointer(start-point(string-range(//div[@id="toc"]/following-sibling::blockquote[1]/p[1]/text()[1],'',23))/range-to(string-range(//div[@id="toc"]/following-sibling::blockquote[1]/p[1]/text()[1],'',36)))</link>
                <version>2014-07-28T09:37:02.000Z</version>
            </targetInfo>
        </targets>
        <permissions public="read"/>

olhsha commented 10 years ago

It looks like the xml is parsed by the git-hub in its way, so I will sent it to you via the e-mail.

olhsha commented 10 years ago

Following our mailing, it seems to be solved. Yes?

nostneji commented 10 years ago

Yes, something was changed on Tuesday, because on the morning I still got described error and on the evening the same test run without error.