On 7/6/12 10:36 AM, Melanie Reiplinger wrote:
Thanks for your efforts in helping me :-)

well I'm the guy behind that code, so I'm listening for reports and wishes over there.

I can create session now and add scopes to them, but the version where the session ID should be created automatically does not work for me (see below).

To create a session:
- If you want to decide which ID to give it, just do a PUT [stanbol-host]/ontonet/session/[ID] - If you want Stanbol to decide the ID, do a POST [stanbol-host]/ontonet/session

The first works fine, but for the second option, I get:

curl -i -X POST http://<stanbol>/ontonet/session
HTTP/1.1 405 Method Not Allowed
Allow: GET,OPTIONS,HEAD
Content-Type: text/html; charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1398
Server: Jetty(6.1.x)

(I'm presently at revision 1356930)

could you please update and rebuild ontologymanager? I'm on 1357301 here

Furthermore, at this endpoint as well as for the ontonet/ontology, PUT and DELETE are not allowed for CORS yet, so the Http requests will fail.

When doing a preflight request for PUT to

http://<stanbol>/ontonet/session/pizzaSession

I get in the response

Access-Control-Allow-Methods:
GET, POST, OPTIONS

I'm afraid I'm going to need help from other Stanbolers, as like I said I don't really dig CORS very much :(

In the revision I mentioned, I had this preflight method in the Session resource:

    @OPTIONS
    public Response handleCorsPreflight(@Context HttpHeaders headers) {
        ResponseBuilder rb = Response.ok();
enableCORS(servletContext, rb, headers, GET, POST, PUT, DELETE, OPTIONS);
        return rb.build();
    }

I thought that manually adding supported methods in the OPTIONS request was enough.

Maybe I should do that in the addCORSOrigin() call for the PUT and DELETE methods as well?

Regards,
alessandro

--
M.Sc. Alessandro Adamou

Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy

Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy


"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)

Not sent from my iSnobTechDevice

Reply via email to