Message from discussion
unmanaged extension : to process List of json strings
Received: by 10.66.88.231 with SMTP id bj7mr4801270pab.45.1349103926410;
Mon, 01 Oct 2012 08:05:26 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.68.242.38 with SMTP id wn6ls23022374pbc.8.gmail; Mon, 01 Oct
2012 08:05:24 -0700 (PDT)
Received: by 10.68.125.164 with SMTP id mr4mr3958865pbb.19.1349103924965;
Mon, 01 Oct 2012 08:05:24 -0700 (PDT)
Date: Mon, 1 Oct 2012 08:05:24 -0700 (PDT)
From: Shireesh <ashirees...@gmail.com>
To: neo4j@googlegroups.com
Message-Id: <45d54f2f-a4ca-4812-b8e7-452faa3062c4@googlegroups.com>
Subject: unmanaged extension : to process List of json strings
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_2899_33522144.1349103924531"
------=_Part_2899_33522144.1349103924531
Content-Type: multipart/alternative;
boundary="----=_Part_2900_27765917.1349103924531"
------=_Part_2900_27765917.1349103924531
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Hi,
i wrote an unmanaged plugin which accepts List<Strings> as input.
@javax.ws.rs.Path("/process-json")
public class Process{
@POST
public final Response processJson(final List<String> listOfJson){
for(String json : listOfJson)
{
processJsonString(json);
}
}
}
and iam invoking this from RESTClient
POST http://localhost:7474/ext/unmanaged/process-json
Body : [{node1:[{"key1":1}]}]
Content-Type : "application/json"
But iam getting the following exception
HTTP/1.1 415 Unsupported Media Type
------=_Part_2900_27765917.1349103924531
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
Hi,<br><br>i wrote an unmanaged plugin which accepts List<Strings> as input.<br><br><br>@javax.ws.rs.Path("/process-json")<br>public class Process{<br>@POST<br>public final Response processJson(final List<String> listOfJson){<br>for(String json : listOfJson)<br>{<br> processJsonString(json);<br>}<br>}<br>}<br><br>and iam invoking this from RESTClient<br><br>POST http://localhost:7474/ext/unmanaged/process-json<br>Body : [{node1:[{"key1":1}]}]<br>Content-Type : "application/json"<br><br>But iam getting the following exception<br><br>HTTP/1.1 415 Unsupported Media Type<br><br>
------=_Part_2900_27765917.1349103924531--
------=_Part_2899_33522144.1349103924531--