You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2010 |
Jan
(1) |
Feb
(2) |
Mar
(6) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
| 2011 |
Jan
(4) |
Feb
(18) |
Mar
(9) |
Apr
(7) |
May
(6) |
Jun
(13) |
Jul
(11) |
Aug
(7) |
Sep
(12) |
Oct
(28) |
Nov
(12) |
Dec
(11) |
| 2012 |
Jan
(20) |
Feb
(21) |
Mar
(19) |
Apr
(12) |
May
(44) |
Jun
(23) |
Jul
(14) |
Aug
(26) |
Sep
(23) |
Oct
(7) |
Nov
(42) |
Dec
(15) |
| 2013 |
Jan
(62) |
Feb
(20) |
Mar
(14) |
Apr
(52) |
May
(29) |
Jun
(46) |
Jul
(20) |
Aug
(55) |
Sep
(27) |
Oct
(53) |
Nov
(29) |
Dec
(21) |
| 2014 |
Jan
(35) |
Feb
(44) |
Mar
(12) |
Apr
(37) |
May
(24) |
Jun
(17) |
Jul
(13) |
Aug
(1) |
Sep
(4) |
Oct
(13) |
Nov
(1) |
Dec
(1) |
| 2015 |
Jan
(11) |
Feb
(8) |
Mar
(10) |
Apr
(7) |
May
(17) |
Jun
(11) |
Jul
(13) |
Aug
(14) |
Sep
(6) |
Oct
(3) |
Nov
(7) |
Dec
(3) |
| 2016 |
Jan
(1) |
Feb
(4) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
(10) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
|
From: Jean-Paul D. <jpd...@ci...> - 2010-04-06 08:56:07
|
Hello,
I'm trying to use the StreamingOutput facility to send a server-side
generated Pdf to a client.
When I'm decoding the client-sided InputStream I have a
"ChunkedInputStream - Error parsing trailer headers" Exception
What am I missing ?
Help would be *very* appreciated,
JeP
SERVER SIDE
===========
@POST
@Path("/map2pdf")
@Consumes("application/xml")
@Produces("application/pdf")
public StreamingOutput Map2PdfRestfulStreamingImpl(GetMap2Pdf msg) throws
NamingException, IOException {
return new Map2PdfStreamingOutput(msg);
}
/*
* an inner class that implements the StreamingOutput interface
*/
private class Map2PdfStreamingOutput implements StreamingOutput {
GetMap2Pdf msg;
public Map2PdfStreamingOutput(GetMap2Pdf msg) {
this.msg = msg;
}
public void write(OutputStream output) throws IOException,
WebApplicationException {
...............
// -- response processing
try {
createPdfFacade.generatePDF(request, pdfSize0);
ByteArrayOutputStream os = createPdfFacade.getOutputStream();
os.writeTo(output);
os.close();
} catch (BusinessInputFault bif) {
throw new WebApplicationException(bif,
Response.Status.INTERNAL_SERVER_ERROR);
}
}
}
CLIENT SIDE
===========
// ==== RESTful HTTP call
ClientExecutor clientExecutor = new ApacheHttpClientExecutor(new
HttpClient(
new MultiThreadedHttpConnectionManager()));
ClientRequestFactory clientRequestFactory = new
ClientRequestFactory(clientExecutor, new URI(map2PdfServer));
ClientRequest request = clientRequestFactory.createRequest(map2PdfUrl);
// RESTful content negotiation
request.accept("application/pdf");
request.body(MediaType.APPLICATION_XML, getMap2Pdf);
// -- sends request
ClientResponse<InputStream> response = request.post(InputStream.class);
Integer status = response.getStatus();
System.out.println("status: " + status);
// gets HTTP headers
MultivaluedMap<String, String> map = response.getHeaders();
Set<String> keys = map.keySet();
for (String key : keys)
System.out.println("key: " + key + "\t value: " + map.get(key));
// gets HTTP body content
InputStream is = response.getEntity();
// -- writes Pdf file
String ext = curMedia.substring(curMedia.indexOf("/") + 1);
writeToFile(is, ext + "_" + extension);
Console
=======
status: 200
key: Content-Type value: [application/pdf]
key: X-Powered-By value: [Servlet 2.5; JBoss-5.0/JBossWeb-2.1]
key: Transfer-Encoding value: [chunked]
key: Server value: [Apache-Coyote/1.1]
key: Date value: [Fri, 02 Apr 2010 12:03:25 GMT]
Exception
=========
64422 [main] ERROR org.apache.commons.httpclient.ChunkedInputStream - Error
parsing trailer headers
org.apache.commons.httpclient.ProtocolException: Unable to parse header:
?u"???
?q???t????m??TH??
at
org.apache.commons.httpclient.HttpParser.parseHeaders(HttpParser.java:202)
at
org.apache.commons.httpclient.ChunkedInputStream.parseTrailerHeaders(ChunkedInputStream.java:322)
|
|
From: Adam B. <ab...@lb...> - 2010-03-23 19:49:03
|
I am wrestling with marshalling a simple ArrayList<String> collection.
In the case of XML, I am trying to obtain something like the following:
<status-values>
<status>some status string</status>
<status>some other status string</status>
</status-values>
Currently, I have the following interface:
@Path("/")
public interface RestService
{
@GET
@Path("status/list")
@Produces("text/xml"), "application/xml", "application/json", "application/x-yaml"})
@Wrapped(element = "status-values")
List<String> getStatusValuesList();
@GET
@Path("status/response")
@Produces({"text/xml", "application/xml", "application/json", "application/x-yaml"})
@Wrapped(element = "status-values")
Response getStatusValuesResponse();
}
and I have tried the following impls:
public class RestServiceImpl implements RestService
{
@Override
public List<String> getStatusValuesList()
{
return dataProvider.getStatusValues();
}
@Override
public Response getStatusValuesResponse()
{
List<String> statuses = dataProvider.getStatusValues();
return Response.ok(new GenericEntity<List<String>>(statuses){}).build();
}
}
Each approach throws:
org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: application/xml
The exception is thrown because I am unsure how to specify the ArrayList values are Strings (not xml fragments) and should be wrapped in <status/> tags.
Given the quality of this API I think I am missing something obvious/simple. Any direction would be much appreciated. I'm using version 1.2.1.GA.
--adam
|
|
From: Jesus M. R. <jm...@gm...> - 2010-03-16 13:33:41
|
On Tue, Mar 16, 2010 at 9:05 AM, Lars Ræder Clausen <lr...@am...> wrote:
> Could be something that the RestEasy-modified version of Jackson
> causes. Here's a sample web service of mine:
>
> Interface:
> @Path("/moduletype")
> public interface ModuleTypeWS {
> @GET
> @Path("/{id:[0-9]*}")
> @Produces({"application/xml","application/json"})
> public ModuleType get(@PathParam("id") long id);
> }
>
> Implementation:
> @Stateless
> public class ModuleTypeWSBean implements ModuleTypeWS {
> @EJB private ModuleTypeDao moduleTypeDao;
>
> @Override
> public ModuleType get(@PathParam("id") long id) {
> final ModuleType type = moduleTypeDao.get(id);
> return type;
> }
> }
>
> Its output looks like this (with pretty-printing turned on):
>
> {
> "name" : "Elster A1800",
> "resource" : [ {
> "moduleType" : {
> "id" : "106"
> }},
> ...
> ]
> }
>
> I'm using the JacksonJaxbJsonProvider that comes with Jackson.
Maybe that's the trick. That's pretty much what I want but my
project is not using jackson right now.
jesus
|
|
From: Jesus M. R. <jm...@gm...> - 2010-03-16 12:59:00
|
Thanks for responding again Lars. If I take out (name = "jsontest"), the resulting JSON actually uses the classname: jsonTestObject. Any other ideas as to how to get it to generate "natural" json? jesus On Tue, Mar 16, 2010 at 2:48 AM, Lars Ræder Clausen <lr...@am...> wrote: > I would say it's because you're naming the object in @XmlRootElement. > > -Lars > > On Mon, Mar 15, 2010 at 9:25 PM, Jesus M. Rodriguez <jm...@gm...> wrote: >> Lars, >> >> Sure here's the JsonTestObject code: http://pastie.org/870667 >> >> jesus >> >> On Mon, Mar 15, 2010 at 4:20 PM, Lars Ræder Clausen <lr...@am...> wrote: >>> Yes, there is, we do it. But it might interfere with the way you get >>> your XML. Without seeing your JsonTestObject class, I can't tell why >>> it's doing it that way. >>> >>> -Lars >>> >>> On Mon, Mar 15, 2010 at 7:55 PM, Jesus M. Rodriguez <jm...@gm...> wrote: >>>> I'm looking at switching from jersey to resteasy. I have an object >>>> that is annotated with jaxb. >>>> I have a TestResource class that I want to produce both XML and natural json. >>>> >>>> @GET >>>> @Path("/gettest") >>>> @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) >>>> public JsonTestObject gettest() { >>>> >>>> JsonTestObject parent1 = new JsonTestObject(); >>>> parent1.setName("parent1"); >>>> parent1.setStringList(new ArrayList<String>()); >>>> parent1.setParent(null); >>>> >>>> List<String> stringlist = new ArrayList<String>(); >>>> stringlist.add("string2"); >>>> stringlist.add("string3"); >>>> JsonTestObject parent = new JsonTestObject(); >>>> parent.setName("parentname"); >>>> parent.setParent(parent1); >>>> parent.setStringList(stringlist); >>>> >>>> stringlist.add("child"); >>>> JsonTestObject jto1 = new JsonTestObject(); >>>> jto1.setName("myname"); >>>> jto1.setParent(parent); >>>> jto1.setStringList(stringlist); >>>> >>>> >>>> return jto1; >>>> } >>>> >>>> In jersey, I get natural json: >>>> >>>> testjsonobject get: >>>> {"name":"myname","parent":{"name":"parentname","parent":{"name":"parent1"},"stringList":["string2","string3","child"]},"stringList":["string2","string3","child"]} >>>> >>>> but with resteasy, I get the mapped jettison format: >>>> >>>> testjsonobject get: >>>> {"jsontest":{"name":"myname","parent":[{"name":"parentname"},{"name":"parent1"}]},"stringList":["string2","string3","child","string2","string3","child"]} >>>> >>>> Is there a way to get the xml and "natural" json support with resteasy? >>>> >>>> Sincerely, >>>> jesus rodriguez >>>> >>>> ------------------------------------------------------------------------------ >>>> Download Intel® Parallel Studio Eval >>>> Try the new software tools for yourself. Speed compiling, find bugs >>>> proactively, and fine-tune applications for parallel performance. >>>> See why Intel Parallel Studio got high marks during beta. >>>> http://p.sf.net/sfu/intel-sw-dev >>>> _______________________________________________ >>>> Resteasy-users mailing list >>>> Res...@li... >>>> https://lists.sourceforge.net/lists/listinfo/resteasy-users >>>> >>> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Resteasy-users mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-users >> > |
|
From: Jesus M. R. <jm...@gm...> - 2010-03-15 20:26:23
|
Lars, Sure here's the JsonTestObject code: http://pastie.org/870667 jesus On Mon, Mar 15, 2010 at 4:20 PM, Lars Ræder Clausen <lr...@am...> wrote: > Yes, there is, we do it. But it might interfere with the way you get > your XML. Without seeing your JsonTestObject class, I can't tell why > it's doing it that way. > > -Lars > > On Mon, Mar 15, 2010 at 7:55 PM, Jesus M. Rodriguez <jm...@gm...> wrote: >> I'm looking at switching from jersey to resteasy. I have an object >> that is annotated with jaxb. >> I have a TestResource class that I want to produce both XML and natural json. >> >> @GET >> @Path("/gettest") >> @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) >> public JsonTestObject gettest() { >> >> JsonTestObject parent1 = new JsonTestObject(); >> parent1.setName("parent1"); >> parent1.setStringList(new ArrayList<String>()); >> parent1.setParent(null); >> >> List<String> stringlist = new ArrayList<String>(); >> stringlist.add("string2"); >> stringlist.add("string3"); >> JsonTestObject parent = new JsonTestObject(); >> parent.setName("parentname"); >> parent.setParent(parent1); >> parent.setStringList(stringlist); >> >> stringlist.add("child"); >> JsonTestObject jto1 = new JsonTestObject(); >> jto1.setName("myname"); >> jto1.setParent(parent); >> jto1.setStringList(stringlist); >> >> >> return jto1; >> } >> >> In jersey, I get natural json: >> >> testjsonobject get: >> {"name":"myname","parent":{"name":"parentname","parent":{"name":"parent1"},"stringList":["string2","string3","child"]},"stringList":["string2","string3","child"]} >> >> but with resteasy, I get the mapped jettison format: >> >> testjsonobject get: >> {"jsontest":{"name":"myname","parent":[{"name":"parentname"},{"name":"parent1"}]},"stringList":["string2","string3","child","string2","string3","child"]} >> >> Is there a way to get the xml and "natural" json support with resteasy? >> >> Sincerely, >> jesus rodriguez >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Resteasy-users mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-users >> > |
|
From: Jesus M. R. <jm...@gm...> - 2010-03-15 18:55:46
|
I'm looking at switching from jersey to resteasy. I have an object
that is annotated with jaxb.
I have a TestResource class that I want to produce both XML and natural json.
@GET
@Path("/gettest")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public JsonTestObject gettest() {
JsonTestObject parent1 = new JsonTestObject();
parent1.setName("parent1");
parent1.setStringList(new ArrayList<String>());
parent1.setParent(null);
List<String> stringlist = new ArrayList<String>();
stringlist.add("string2");
stringlist.add("string3");
JsonTestObject parent = new JsonTestObject();
parent.setName("parentname");
parent.setParent(parent1);
parent.setStringList(stringlist);
stringlist.add("child");
JsonTestObject jto1 = new JsonTestObject();
jto1.setName("myname");
jto1.setParent(parent);
jto1.setStringList(stringlist);
return jto1;
}
In jersey, I get natural json:
testjsonobject get:
{"name":"myname","parent":{"name":"parentname","parent":{"name":"parent1"},"stringList":["string2","string3","child"]},"stringList":["string2","string3","child"]}
but with resteasy, I get the mapped jettison format:
testjsonobject get:
{"jsontest":{"name":"myname","parent":[{"name":"parentname"},{"name":"parent1"}]},"stringList":["string2","string3","child","string2","string3","child"]}
Is there a way to get the xml and "natural" json support with resteasy?
Sincerely,
jesus rodriguez
|
|
From: Tony G. <tgi...@gm...> - 2010-03-05 15:25:49
|
I'm trying to work with the client side software and the documentation seems sparse... I have a service that responds to a form submission, included in that form is a file upload. It's not clear at all to me how to annotate that method on the client side to do the submission. Am I missing something obvious? Tony Giaccone |
|
From: Lars R. C. <lr...@am...> - 2010-02-25 16:51:03
|
We have a fairly large JBoss-based system in which we use RESTeasy for a number of our web services. Jackson just came onto our radar as a much better alternative for the various JAXB JSON implementations, and I would like to use it. However, two of the three descriptions of how to enable Jackson with RESTeasy don't apply in our system: We don't use Maven, so we can't just add something to our Maven config, and we don't have an explicit application class that extends javax.ws.rs.core.Application since we just use @Path annotations and resteasy.jndi.resources specs to designate our web services. I have tried the third approach, mentioned in <URL:http://wiki.fasterxml.com/JacksonFAQ?highlight=(\bCategoryJackson\b)>, of making files in META-INF/services/javax.ws.rs.ext.MessageBodyReader and -Writer, but that has no visible effect, I still end up with Jettison-generated JSON. I cannot remove the superfluous JAXB/Jettison jar files, as JBoss depends on them. I have successfully used Jackson in unit tests that don't touch upon RESTeasy, and really like it, so how should I add it when we don't use Maven or Application? Thanks in advance, -Lars |
|
From: Knut H. <knu...@to...> - 2010-02-22 14:47:43
|
Hi,
I have a problem, that my service should always respond in UTF-8 and I
set the @Produces accordingly (
"...;charset=UTF-8")). My service method returns a string containing
german umlauts.
Unfortunately, the service returns those umlauts encoded in ISO8859-1
(or so) and not in UTF-8.
I did a litte debugging and found out that the StringTextStar writeTo
method does a o.getBytes() on the result String, but
does not provide the required codeset, or alternatively the
entityStream.write does not use a codeset, so that I assume
it takes the codeset from the locale the server runs in. In my view, the
writeTo() method should use the codeset as specified
in the mediaType (if given). Do you have easy methods to extract the
charset from the mediaType?
To test, just write a little hello world service:
<code>
@GET
@Path("/hello")
@Produces("text/plain;charset=UTF-8")
public String hello(@Context HttpServletRequest request) {
return "Hallo schnöde Welt!" + request.toString();
}
</code>
--
------------------------------------------------------------
Knut H. Hertel
TOLERANT Software GmbH & Co. KG, Forststr.7, 70174 Stuttgart
Tel +49 711 490 448 56, Fax +49 711 490 448 36
knu...@to..., http://www.tolerant-software.de/
Persönlich haftender Gesellschafter: TOLERANT Software Verwaltungs-GmbH,
Amtsgericht Stuttgart, HRB 730593
Vertretungsberechtigte Geschäftsführer: Dr. Markus Eberspächer, Stefan Sedlacek, Jörg Vogler
Registergericht: Amtsgericht Stuttgart, HRA 724238
|
|
From: Stevi D. <ste...@gm...> - 2010-01-21 19:57:10
|
I'm having a hard time figuring out where to look for the cause of the following problem, so I'm trying to rule in/out the various elements. My problem is this -- very occasionally, I have a RESTEasy web service call that delays for about 60 seconds between the time the code completes and the time the response is returned. In one recent example, the two service calls, which manage the database transactions, etc. using Spring and Hibernate, made by request took 87 milliseconds, while the entire http request took 60267 milliseconds. (FWIW, I'm using a tool called beet (http://beet.sourceforge.com/) to track the duration of the http-request and my high level service calls.) We're using RESTEasy 1.2.1.GA (although I saw this with 1.1.GA as well), on a clustered WebSphere 6.1 server (4 nodes) that's behind an IBM ODR Request Router. We're using Castor for marshalling/unmarshalling with some custom logic for handling nested relationships. The calls these are happening to usually return in under 500 milliseconds, and if the call is repeated, it works fine. I'm not seeing any specific pattern to when the calls happened (not closely clustered, for example, and doesn't seem to be triggered by high load created using load testing tools). For additional information we've been having issues with the ODR queuing requests for up to 60 seconds (as noted by comparing the apache http server request log timestamps with the beet logged timestamps for the same http requests). And this only happens in our QA environment. I've not yet seen it happen in our Test environment, which is supposed to be set up the same, but we've consistently seen network issues in QA that don't happen in Test (although the fact QA is usually under slightly more load may account for that). All of this makes me suspect some network problem, but I'm at a loss how to isolate the issue to prove/disprove this. It feels almost like it's the reverse of the request router queuing the request, that there's something causing the response to just hang before completing. Amusingly, we haven't found any evidence it ever happened during our performance testing. If anybody has any suggestions for how to isolate the cause of this problem, it would be a huge help. Thanks in advance for any help! Sincerely, Stevi |
|
From: Tony G. <tgi...@gm...> - 2009-12-04 16:46:59
|
I have a form on a web page,
<form action="http://localhost:8080/testApp/services/putdata/fileup"
method="POST" enctype="multipart/form-data">
<table>
<tr>
<td colspan="2">Hello world</td>
</tr>
<tr>
<td>Name : </td>
<td><input type="TEXT" name="firstName" >
</tr>
<tr>
<td>Language :</td>
<td> <select name="pickOption">
<option>option 1</option>
<option>option 2</option>
</select>
</td>
</tr>
<tr>
<td>Select file</td>
<td> <input name="uploadFile" type="file"> </td>
</tr>
<tr>
<td colspan="2"> <input type="submit" value="Say it!" />
</tr>
</table>
</form>
I use the following code to try and process it.
@POST
@Path("/fileup")
@Consumes("multipart/form-data")
public String post2(MultipartFormDataInput input)
{
return "Got a form to process";
}
And this is the message I'm getting:
java.lang.NoSuchFieldError: TEXT_PLAIN_WITH_CHARSET_US_ASCII_TYPE
org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl.<init>(MultipartInputImpl.java:48)
org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInputImpl.<init>(MultipartFormDataInputImpl.java:29)
Any pointers on where I'm going wrong???
Tony Giaccone
|
|
From: ravi <mou...@gm...> - 2009-12-01 13:59:17
|
Hello,
I have the following problem, can you please let me know how to fix it.
I have the following object as DTO which will be sent to the user as
response.
public class myDTO {
private String name;
private Map<String, String> attributes;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Map<String, String> getAttributes() {
return this.attributes;
}
public void setAttributes(Map<String, String> attributes) {
this.attributes = attributes;
}
}
For the above DTO, the JSON response looks like:
entry: {
"name": "test",
"attributes" : {
entry : {
[
{"key":"test11","value":"value11"},
{"key":"test13","value":"value13"}
]
}
}
}
But I want my attributes to be returned as:
attribtues : {
test11: "value11",
test12: "value12"
}
Is there any way I could do this? I am using default providers.
thanks in advance
ravi
|
|
From: Ryan M. <rya...@gm...> - 2008-11-23 19:32:56
|
Test |
|
From: Ryan J. M. <ry...@da...> - 2008-11-23 19:32:20
|
Testing again |
|
From: Ryan J. M. <ry...@da...> - 2008-11-23 19:26:01
|
|
From: Ryan J. M. <ry...@da...> - 2008-11-23 19:24:13
|
Testing |