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: Bill B. <bb...@re...> - 2011-07-25 12:44:04
|
The jackson provider doesn't recognize jaxb annotations. You could try
the jettison plugin, but it kinda sucks. I haven't yet looked into
jackson's support for JAXB annotations.
On 7/21/11 3:39 PM, Mic...@De... wrote:
> Hi folks,
>
> I am working on a new project in which we will expose a restful
> webservice which returns json, and our stack is JBoss AS6, Weld
> 1.1.0.Final, and we are using RestEasy to provide the REST layer. I am
> trying to use the @Produces annotations to return json, and I’m having
> some luck, but would like to be able to tweak what is returned using
> either @Json* or JAXB annations. As it currently stands, these
> annotations don’t seem to be having any effect….
>
> For example, given the following annotated pojo:
>
> import javax.xml.bind.annotation.XmlRootElement;
>
> import javax.xml.bind.annotation.XmlTransient;
>
> @XmlRootElement(name = "volume")
>
> public class Volume
>
> {
>
> String name;
>
> String description;
>
> long sizeInMB;
>
> public String getName() {
>
> return name;
>
> }
>
> public void setName(String name) {
>
> this.name = name;
>
> }
>
> @XmlTransient
>
> public String getDescription() {
>
> return description;
>
> }
>
> public void setDescription(String description) {
>
> this.description = description;
>
> }
>
> public long getSizeInMB() {
>
> return sizeInMB;
>
> }
>
> public void setSizeInMB(long sizeInMB) {
>
> this.sizeInMB = sizeInMB;
>
> }
>
> public Volume(String name, String description, long sizeInMB) {
>
> super();
>
> this.name = name;
>
> this.description = description;
>
> this.sizeInMB = sizeInMB;
>
> }
>
> public Volume() {
>
> super();
>
> }
>
> }
>
> I would expect a call returning a volume to give me something like:
>
> { volume: {"name":"Volume with ID: 15","sizeInMB":1500000} }
>
> But in reality it is ignoring the JAXB annotations and providing
>
> {"name":"Volume with ID: 15","description":"This is a sample
> Volume","sizeInMB":1500000}
>
> Would you expect usage within weld to ignore the annotations? Is there
> any way to enable them?
>
> Thanks!
>
> Mike
>
>
>
> ------------------------------------------------------------------------------
> 5 Ways to Improve& Secure Unified Communications
> Unified Communications promises greater efficiencies for business. UC can
> improve internal communications as well as offer faster, more efficient ways
> to interact with customers and streamline customer service. Learn more!
> http://www.accelacomm.com/jaw/sfnl/114/51426253/
>
>
>
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Joe L. <joe...@gm...> - 2011-07-21 22:19:33
|
Mike, I think this may be relevant: http://jira.codehaus.org/browse/JACKSON-163 Last comment on that improvement ticket: "Implemented serialization side support, so that wrapping can be enabled easily by setting 'SerializationConfig.Feature.WRAP_ROOT_VALUE' to true. If so, extra single-property JSON Object is added; root name comes from value class or forced static type by default, but JAXB annotation introspector adds @XmlRootElement based override as necessary." Cheers On 21 July 2011 20:39, <Mic...@de...> wrote: > Hi folks, > > I am working on a new project in which we will expose a > restful webservice which returns json, and our stack is JBoss AS6, Weld > 1.1.0.Final, and we are using RestEasy to provide the REST layer. I am > trying to use the @Produces annotations to return json, and I’m having some > luck, but would like to be able to tweak what is returned using either > @Json* or JAXB annations. As it currently stands, these annotations don’t > seem to be having any effect…. > > > > > > For example, given the following annotated pojo: > > > > import javax.xml.bind.annotation.XmlRootElement; > > import javax.xml.bind.annotation.XmlTransient; > > > > > > @XmlRootElement(name = "volume") > > > > public class Volume > > { > > String name; > > String description; > > long sizeInMB; > > public String getName() { > > return name; > > } > > public void setName(String name) { > > this.name = name; > > } > > @XmlTransient > > public String getDescription() { > > return description; > > } > > public void setDescription(String description) { > > this.description = description; > > } > > public long getSizeInMB() { > > return sizeInMB; > > } > > public void setSizeInMB(long sizeInMB) { > > this.sizeInMB = sizeInMB; > > } > > public Volume(String name, String description, long sizeInMB) > { > > super(); > > this.name = name; > > this.description = description; > > this.sizeInMB = sizeInMB; > > } > > public Volume() { > > super(); > > > > } > > } > > > > I would expect a call returning a volume to give me something like: > > > > { volume: {"name":"Volume with ID: 15","sizeInMB":1500000} } > > > > > > But in reality it is ignoring the JAXB annotations and providing > > {"name":"Volume with ID: 15","description":"This is a sample > Volume","sizeInMB":1500000} > > > > Would you expect usage within weld to ignore the annotations? Is there any > way to enable them? > > > > Thanks! > > > > Mike > > > > ------------------------------------------------------------------------------ > 5 Ways to Improve & Secure Unified Communications > Unified Communications promises greater efficiencies for business. UC can > improve internal communications as well as offer faster, more efficient ways > to interact with customers and streamline customer service. Learn more! > http://www.accelacomm.com/jaw/sfnl/114/51426253/ > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > |
|
From: <Mic...@De...> - 2011-07-21 19:39:45
|
Hi folks,
I am working on a new project in which we will expose a restful webservice which returns json, and our stack is JBoss AS6, Weld 1.1.0.Final, and we are using RestEasy to provide the REST layer. I am trying to use the @Produces annotations to return json, and I'm having some luck, but would like to be able to tweak what is returned using either @Json* or JAXB annations. As it currently stands, these annotations don't seem to be having any effect....
For example, given the following annotated pojo:
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
@XmlRootElement(name = "volume")
public class Volume
{
String name;
String description;
long sizeInMB;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@XmlTransient
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public long getSizeInMB() {
return sizeInMB;
}
public void setSizeInMB(long sizeInMB) {
this.sizeInMB = sizeInMB;
}
public Volume(String name, String description, long sizeInMB) {
super();
this.name = name;
this.description = description;
this.sizeInMB = sizeInMB;
}
public Volume() {
super();
}
}
I would expect a call returning a volume to give me something like:
{ volume: {"name":"Volume with ID: 15","sizeInMB":1500000} }
But in reality it is ignoring the JAXB annotations and providing
{"name":"Volume with ID: 15","description":"This is a sample Volume","sizeInMB":1500000}
Would you expect usage within weld to ignore the annotations? Is there any way to enable them?
Thanks!
Mike
|
|
From: Ho Y. L. <hy....@gm...> - 2011-07-20 22:37:02
|
Hi all, Is it possible to secure rest easy in such a way that you can allow unauthenticated users to, say, GET a resource, but only permit authenticated users in the correct roles to POST. Since the resource would using the same url pattern, presumably the entry in web.xml security constraint (web-resource-collection) would cover be apply regardless and the client would be required to authenticate even if they were just trying to do a GET. An example, in case my attempt at describing the problem in a generic way fell flat on its face :p Let's say I have an API that allows you to create a bunch of "widgets". You can do so by sending an HTTP *POST *to */widgets*, but you must be authenticated. If you want to look at the list of widgets that people have created, you can do so by sending an HTTP *GET *to */widgets*, but we you don't have to be authenticated. Possible? Thanks in advance, H.Y. |
|
From: Diego S. <die...@gm...> - 2011-07-14 18:38:44
|
Hi, i have a service that upload a file. When i use a typically html form
everything works ok.
Now i try to test this using the client framework and the values of the
parameters are null.
Here is the interface:
-----------------------------------------
@Path("upload")
public interface UploadServiceJaxRS {
@POST
@Path("FileUploadServlet")
@Consumes("multipart/form-data")
public void uploadProcessPOST(@MultipartForm FileUploadForm form);
}
----------------------------------------
the POJO:
----------------------------------------
public class FileUploadForm {
private String name;
private byte[] txtFile;
public FileUploadForm() {}
public byte[] getTxtFile() {
return txtFile;
}
public String getName() {
return name;
}
@FormParam("txtFile")
@PartType("application/octet-stream")
public void setTxtFile(final byte[] txtFile) {
this.txtFile = txtFile;
}
@FormParam("name")
@PartType("text/plain")
public void setName(String name) {
this.name = name;
}
}
-------------------------------------------
and the test:
-------------------------------------------
@Test
public void testPDFCreation() throws Exception{
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
File file = new File("/tmp/test.txt");
byte[] bytes = FileUtils.getBytes(file);
FileUploadForm form = new FileUploadForm();
form.setName(file.getName());
form.setTxtFile(bytes);
UploadServiceJaxRS client =
ProxyFactory.create(UploadServiceJaxRS.class, "http://localhost:8080/e-forms
");
try {
client.uploadProcessPOST(form);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
-------------------------------------------
Inside the implementation, the form parameter comes with their attributes
with null values
Any ideas?
Thanks!
|
|
From: kwground k. <kw...@gm...> - 2011-07-07 20:18:54
|
Thanks Bill. Actually, we are still looking forward to implement OAuth 1.0a (mainly 2-legged), so if you can pinpoint any areas (within current Resteasy oauth support) we need to finish up or brush up in order to be prod ready, it would be great. appreciated! foster > Date: Thu, 07 Jul 2011 14:12:00 -0400 > From: Bill Burke <bb...@re...> > Subject: Re: [Resteasy-users] Resteasy authentication > To: res...@li... > Message-ID: <4E1...@re...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I'm very disappointed in OAuth 2.0. > > 1. It doesn't describe what the token is supposed to look like > 2. It doesn't describe the authentication protocol between client and > provider. > > So, what is the point of supporting it when half of the protocol is > application/IDP dependent? If you have requirements to filter down that > would be cool. > > SAML has its own HTTP bindings, and we support SAML in Picketlink. > > I am working on a decentralized auth protocol based on digital signatures: > > http://bill.burkecentral.com/2011/06/19/decentralized-auth-ideas/ > > > > On 7/7/11 10:58 AM, foster wrote: > > Hi Bill, > > > > Could you elaborate a bit more here? We do have plan to use OAuth, so I'm > > curious what are the areas we need to pay more attention specifically and > add > > additional work by ourselves. Also, what's > > your plan for full OAuth support? > > > > Thanks a lot! > > > > foster > > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > valuable. > > Why? It contains a definitive record of application performance, security > > threats, fraudulent activity, and more. Splunk takes this data and makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________ > > Resteasy-users mailing list > > Res...@li... > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > > > |
|
From: Bill B. <bb...@re...> - 2011-07-07 18:12:08
|
I'm very disappointed in OAuth 2.0. 1. It doesn't describe what the token is supposed to look like 2. It doesn't describe the authentication protocol between client and provider. So, what is the point of supporting it when half of the protocol is application/IDP dependent? If you have requirements to filter down that would be cool. SAML has its own HTTP bindings, and we support SAML in Picketlink. I am working on a decentralized auth protocol based on digital signatures: http://bill.burkecentral.com/2011/06/19/decentralized-auth-ideas/ On 7/7/11 10:58 AM, foster wrote: > Hi Bill, > > Could you elaborate a bit more here? We do have plan to use OAuth, so I'm > curious what are the areas we need to pay more attention specifically and add > additional work by ourselves. Also, what's > your plan for full OAuth support? > > Thanks a lot! > > foster > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: foster <kw...@gm...> - 2011-07-07 15:05:19
|
Hi Bill, Could you elaborate a bit more here? We do have plan to use OAuth, so I'm curious what are the areas we need to pay more attention specifically and add additional work by ourselves. Also, what's your plan for full OAuth support? Thanks a lot! foster |
|
From: ujay68 <uj...@gm...> - 2011-07-06 12:34:53
|
Bill, thanks. > People were having trouble with DataSource. That was probably me, on the server side. ;-) https://issues.jboss.org/browse/RESTEASY-545 > Instead of Datasource, try using InputStream or some > other media type for the part. DataSource is not a problem here if you use, eg, a javax.activation.FileDataSource, as in the code snippet of my previous post, which works fine. > Also, there is a > @org.jboss.resteasy.annotations.providers.multipart.PartType annotation > that is used to specify the Content-Type of the marshalled Multipart > map, I used that annotation to make it work at all, but this annotation is, of course, not dynamic, so if the client wants to upload files of different media types, you cannot change that dynamically. Also, the annotation is for the entire map and not per entry, so if you tried to upload several files in one request, all the files would have to have the same media type. Jay |
|
From: Bill B. <bb...@re...> - 2011-07-06 12:01:03
|
People were having trouble with DataSource. I don't remember if the
problem was fixed. Instead of Datasource, try using InputStream or some
other media type for the part.
Also, there is a
@org.jboss.resteasy.annotations.providers.multipart.PartType annotation
that is used to specify the Content-Type of the marshalled Multipart
map, I don't have an annotation to specify the content-disposition.
On 7/6/11 6:49 AM, ujay68 wrote:
> Still trying to get multipart/form-data upload to work with a Resteasy
> client ...
>
> After some experimenting, I now found out that you can add an
> @PartType annotation to the client's Map parameter, like this:
>
> @POST
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> @Produces(MediaType.APPLICATION_JSON)
> @Path("wherever")
> Object doUpload(@PartType(MediaType.APPLICATION_OCTET_STREAM)
> Map<String, DataSource> parts);
>
> And then use this as:
>
> Map<String, DataSource> parts = new HashMap<String, DataSource>();
> parts.put("file", new FileDataSource(new File("mypic.jpg")));
> Object response = client.doUpload(parts);
>
> Resteasy will then use
> org.jboss.resteasy.plugins.providers.multipart.MapMultipartFormDataWriter.
>
> That way, however, two important things are missing from the HTTP
> request (compared to a direct upload from a browser): the Content-Type
> is hard-wired to application/octet-stream because of the annotation
> and the mime part containing the file data does not have a
> Content-Disposition header with a "filename" parameter with the
> DataSource's name (in this example, this should be
> Content-Disposition: attachment; filename="mypic.jpg").
>
> Might this get fixed or do you suggest coding the upload with a
> hand-crafted request?
>
> Jay
>
>
>> Hi,
>>
>> how do I parameterize an interface method for a POST call that
>> consumes a multipart/form-data, for use with use
>> org.jboss.resteasy.client.ProxyFactory?
>>
>> The server implements something like this:
>>
>> @POST
>> @Consumes(MediaType.MULTIPART_FORM_DATA)
>> @Produces(MediaType.APPLICATION_JSON)
>> @Path("wherever")
>> public Response doFooImpl(MultipartFormDataInput object) {
>> List<InputPart> items = object.getFormDataMap().get("ITEM"); /* ... */
>> }
>>
>> In the client, I tried this:
>>
>> @POST
>> @Consumes(MediaType.MULTIPART_FORM_DATA)
>> @Produces(MediaType.APPLICATION_JSON)
>> @Path("wherever")
>> Object doFoo(Map<String, DataSource> parts);
>>
>> But when I run this, the client throws a
>>
>> java.lang.RuntimeException: could not find writer for content-type
>> multipart/form-data type: java.util.Map
>>
>> Would it be better to use a javax.mail.Multipart as a client-side
>> parameter? Or org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInputImpl
>> (if that is an "official" API class)?
>>
>> Thanks, Jay
>>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: ujay68 <uj...@gm...> - 2011-07-06 10:49:42
|
Still trying to get multipart/form-data upload to work with a Resteasy
client ...
After some experimenting, I now found out that you can add an
@PartType annotation to the client's Map parameter, like this:
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@Path("wherever")
Object doUpload(@PartType(MediaType.APPLICATION_OCTET_STREAM)
Map<String, DataSource> parts);
And then use this as:
Map<String, DataSource> parts = new HashMap<String, DataSource>();
parts.put("file", new FileDataSource(new File("mypic.jpg")));
Object response = client.doUpload(parts);
Resteasy will then use
org.jboss.resteasy.plugins.providers.multipart.MapMultipartFormDataWriter.
That way, however, two important things are missing from the HTTP
request (compared to a direct upload from a browser): the Content-Type
is hard-wired to application/octet-stream because of the annotation
and the mime part containing the file data does not have a
Content-Disposition header with a "filename" parameter with the
DataSource's name (in this example, this should be
Content-Disposition: attachment; filename="mypic.jpg").
Might this get fixed or do you suggest coding the upload with a
hand-crafted request?
Jay
> Hi,
>
> how do I parameterize an interface method for a POST call that
> consumes a multipart/form-data, for use with use
> org.jboss.resteasy.client.ProxyFactory?
>
> The server implements something like this:
>
> @POST
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> @Produces(MediaType.APPLICATION_JSON)
> @Path("wherever")
> public Response doFooImpl(MultipartFormDataInput object) {
> List<InputPart> items = object.getFormDataMap().get("ITEM"); /* ... */
> }
>
> In the client, I tried this:
>
> @POST
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> @Produces(MediaType.APPLICATION_JSON)
> @Path("wherever")
> Object doFoo(Map<String, DataSource> parts);
>
> But when I run this, the client throws a
>
> java.lang.RuntimeException: could not find writer for content-type
> multipart/form-data type: java.util.Map
>
> Would it be better to use a javax.mail.Multipart as a client-side
> parameter? Or org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInputImpl
> (if that is an "official" API class)?
>
> Thanks, Jay
>
|
|
From: Michael M. <mmu...@re...> - 2011-06-29 09:58:08
|
I would start with the user guide http://docs.jboss.org/resteasy/docs/2.2.1.GA/userguide/html/ Chapter 23 should answer all your questions. Mike On 29/06/11 07:43, Srinivasrao Gunda wrote: > hi > > > This is srinu > i dont know what is multipart? what is the use of multipart? > where we use multipart in resteasy? > please clarify my doubt > > > > > > -- > Thanks & Regards.......... > Srinivasrao.Gunda > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > > > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Michael Musgrove mmu...@re... JBoss, by Red Hat Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson (USA), Charlie Peters (USA) |
|
From: Srinivasrao G. <sri...@gm...> - 2011-06-29 06:43:40
|
hi This is srinu i dont know what is multipart? what is the use of multipart? where we use multipart in resteasy? please clarify my doubt -- Thanks & Regards.......... Srinivasrao.Gunda |
|
From: Bill B. <bb...@re...> - 2011-06-28 11:23:37
|
Just look at the code of the JAXB provider. Create a independent maven module like the jAXB one does. If it works, I'll incorporate it into resteasy. On 6/28/11 5:24 AM, Seref Arikan wrote: > Greeetings, > I've been using RestEasy for a while now, and so far it has been a > great experience. I'm looking into ways of improving performance, and > Jibx's claims seem worthy of a test. > However I want o keep RestEasy in place. Is it possible to integrate > JibX into RestEasy so that XML serialization deserialization is > performed by Jibx? I'd also like to keep JSON support in place, which > is provided by RestEasy and not supported by JibX > > Given these requirements, if it is possible to achieve such a setup, > which documentation should I be looking into? Your comments would help > me save lots of time > > Best Regards > Seref > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Seref A. <ser...@ku...> - 2011-06-28 09:52:02
|
Greeetings, I've been using RestEasy for a while now, and so far it has been a great experience. I'm looking into ways of improving performance, and Jibx's claims seem worthy of a test. However I want o keep RestEasy in place. Is it possible to integrate JibX into RestEasy so that XML serialization deserialization is performed by Jibx? I'd also like to keep JSON support in place, which is provided by RestEasy and not supported by JibX Given these requirements, if it is possible to achieve such a setup, which documentation should I be looking into? Your comments would help me save lots of time Best Regards Seref |
|
From: Ted J. <te...@re...> - 2011-06-22 19:49:02
|
Thanks Bill. RESTEasy made it... easy. :-) ----- Original Message ----- From: "Bill Burke" <bb...@re...> To: res...@li... Sent: Tuesday, June 21, 2011 11:40:21 AM Subject: Re: [Resteasy-users] RESTEasy with Teiid Designer Very Cool! On 6/21/11 12:27 PM, Ted Jones wrote: > > http://community.jboss.org/wiki/RESTEasyWithTeiidDesigner > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Resteasy-users mailing list Res...@li... https://lists.sourceforge.net/lists/listinfo/resteasy-users |
|
From: ujay68 <uj...@gm...> - 2011-06-22 14:57:45
|
Hi,
how do I parameterize an interface method for a POST call that
consumes a multipart/form-data, for use with use
org.jboss.resteasy.client.ProxyFactory?
The server implements something like this:
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@Path("wherever")
public Response doFooImpl(MultipartFormDataInput object) {
List<InputPart> items = object.getFormDataMap().get("ITEM"); /* ... */
}
In the client, I tried this:
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@Path("wherever")
Object doFoo(Map<String, DataSource> parts);
But when I run this, the client throws a
java.lang.RuntimeException: could not find writer for content-type
multipart/form-data type: java.util.Map
Would it be better to use a javax.mail.Multipart as a client-side
parameter? Or org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInputImpl
(if that is an "official" API class)?
Thanks, Jay
|
|
From: Bill B. <bb...@re...> - 2011-06-21 16:46:18
|
Very Cool! On 6/21/11 12:27 PM, Ted Jones wrote: > > http://community.jboss.org/wiki/RESTEasyWithTeiidDesigner > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Ted J. <te...@re...> - 2011-06-21 16:27:18
|
http://community.jboss.org/wiki/RESTEasyWithTeiidDesigner |
|
From: Евгений Р. <ka...@tu...> - 2011-06-09 11:30:03
|
Hello everybody!
I am trying to get the client-side interceptor working within Spring
framework.
Here are the details worth mentioning:
*1)* There is no access to the web.xml configuration file from my
module.Until recently, i have successfully used the
RestClientProxyFactoryBean registered within spring context as follows:
*<bean id="client"
class="org.jboss.resteasy.client.spring.RestClientProxyFactoryBean"
p:serviceInterface="someInterface" p:baseUri="http://some.uri" />*
2) But recently, for the internal purposes i have added a client-side
interceptor.
*@Provider
@ClientInterceptor
@EncoderPrecedence
public class Interceptor implements
MessageBodyWriterInterceptor,ClientExecutionInterceptor,AcceptedByMethod{
@Override
public void write(MessageBodyWriterContext context) throws IOException,
WebApplicationException {
context.proceed();
}
@Override
public ClientResponse execute(ClientExecutionContext ctx) throws
Exception {
return ctx.proceed();
}
@Override
public boolean accept(Class declaring, Method method) {
return true;
}
}*
*3) *As i have already said there is now way for me to register a provider
in the web.xml. For that reason there came a Spring BeanPostProcessor where
i get the already initialized ResteasyProviderFactory, register my
MessageBodyWriterInterceptor and return it to the context:
*public class RestClientPostProcessor implements BeanPostProcessor {
@Override
public Object postProcessBeforeInitialization(Object bean, String
beanName) throws BeansException {
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean, String
beanName) throws BeansException {
if(bean.getClass()==RestClientProxyFactoryBean.class &&
beanName.equals("client")){
RestClientProxyFactoryBean restClient =
(RestClientProxyFactoryBean)bean;
ResteasyProviderFactory providerFactory =
restClient.getResteasyProviderFactory();
providerFactory.registerProvider(Interceptor.class);
//Need i do here something in addition, namely somehow alter the
already initialized client proxy or something
}
return bean;
}*
*4) *After that the interceptor gets sucessfully registered and appears in
the providers factory list. But, as it appeared to be after debugging the
client proxy methods do not have the newly registered interceptor, *but only
those that where registered during the default initialization*.
*5)* Continuing debugging i found out that while invoking the client proxy
method and post processing the request the method
ClientRequest#writeRequestBody being invoked which in turn refer to
getWriterInterceptors() which in turn return only the default
GZIPEncodingInterceptor because ClientInterceptorRepositoryImpl doesn't
contain my sucessfully registered interceptor.
*After all, *How do i get the interceptor which was successfully registered
programmatically within the currently initialized ResteasyProviderFactory be
invoked after each client proxy method call?
Thanx
|
|
From: Mikhail K. <mkh...@gr...> - 2011-06-08 14:46:04
|
Hello,
I'm trying to run simple Spring web app with DispatcherServlet
web.xml
<servlet>
<servlet-name>resteasy</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resteasy</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
----------------------------------------------------
resteasy-servlet.xml
<!-- Import basic SpringMVC Resteasy integration -->
<import resource="classpath:springmvc-resteasy.xml"/>
<!-- the only @Path entity -->
<bean class="com.xx.xx.xx.Devices"></bean>
----------------------------------------------------
I have
Caused by: java.lang.NullPointerException: null
at org.jboss.resteasy.links.impl.RESTUtils.getServiceMethods(RESTUtils.java:85)
~[resteasy-links-2.2.0.GA.jar:na]
at org.jboss.resteasy.links.impl.RESTUtils.addDiscovery(RESTUtils.java:52)
~[resteasy-links-2.2.0.GA.jar:na]
at org.jboss.resteasy.links.impl.LinkDecorator$1.beforeMarshal(LinkDecorator.java:27)
~[resteasy-links-2.2.0.GA.jar:na]
at com.sun.xml.bind.v2.runtime.XMLSerializer.fireBeforeMarshalEvents(XMLSerializer.java:752)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:586)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:320)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.serializeListBody(ArrayReferenceNodeProperty.java:114)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:332)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:699)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:152)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:189)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:315)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:322)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:72)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:315)
~[jaxb-impl-2.1.12.jar:2.1.12]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)
~[jaxb-impl-2.1.12.jar:2.1.12]
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
~[na:1.6.0_24]
at org.jboss.resteasy.plugins.providers.jaxb.CollectionProvider.writeTo(CollectionProvider.java:220)
~[resteasy-jaxb-provider-2.2.0.GA.jar:na]
at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117)
~[resteasy-jaxrs-2.2.0.GA.jar:na]
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.write(GZIPEncodingInterceptor.java:48)
~[resteasy-jaxrs-2.2.0.GA.jar:na]
at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:123)
~[resteasy-jaxrs-2.2.0.GA.jar:na]
at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:250)
~[resteasy-jaxrs-2.2.0.GA.jar:na]
AFAIget the core issue is the absence of Registry in a context map:
LinkDecorator.java
....
public void beforeMarshal(Object entity) {
UriInfo uriInfo = ResteasyProviderFactory.getContextData(UriInfo.class);
ResourceMethodRegistry registry = (ResourceMethodRegistry)
ResteasyProviderFactory.getContextData(Registry.class);
!!!!!! registry==null here
// find all rest service classes and scan them
RESTUtils.addDiscovery(entity, uriInfo, registry);
Unfortunately I can't find the place where Registry should be inserted
into the context map.
But it's definitely not in org.jboss.resteasy.core.SynchronousDispatcher:441
public void pushContextObjects(HttpRequest request, HttpResponse response)
{
Map contextDataMap = ResteasyProviderFactory.getContextDataMap();
contextDataMap.put(HttpRequest.class, request);
contextDataMap.put(HttpResponse.class, response);
contextDataMap.put(HttpHeaders.class, request.getHttpHeaders());
contextDataMap.put(UriInfo.class, request.getUri());
contextDataMap.put(Request.class, new RequestImpl(request));
contextDataMap.putAll(defaultContextObjects);
}
Does anybody use DispatcherServlet?
Regards
--
Sincerely yours
Mikhail (Mike) Khludnev
Developer
|
|
From: Clemens E. <lin...@gm...> - 2011-06-03 14:23:39
|
Hi Jozef,
I tried to annotate it with @Name, but unfourtunatly it didn't change a thing.
This is the full source, of both the interface and the implementation:
//Interface:
@Path("/async")
public interface AsyncTestBean {
@GET
@Path("/{message}")
public Response echoService();
}
//Implementation:
@Name("async")
@Scope(ScopeType.SESSION)
public class AsyncTest implements AsyncTestBean {
@Logger
Log log;
public Response echoService(){
log.info("polling map");
return Response.status(200).entity("hello").build();
}
}
The exception I get is:
javax.servlet.ServletException: java.lang.IllegalArgumentException: no
file extension in servlet path: /async/message
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:126)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
Without the log-statement everything works as expected.
Thanks a lot for your help, Clemens
2011/6/3 Jozef Hartinger <joz...@gm...>:
> The problem is that you're using Seam 2 injection (@Logger) in an object
> which is not a Seam component. Add @Name to turn AsyncResourceBean into a
> Seam component.
>
> On 06/01/2011 03:13 PM, Clemens Eisserer wrote:
>>
>> Hi,
>>
>> I would like to use RestEasy's EJB integration in a
>> jboss6/seam/richfaces webapp.
>> Everything seems to work file, except injection of other EJBs.
>>
>> I basically did the following:
>>
>> @Path("/async")
>> public interface AsyncResource {
>>
>> @GET
>> @Path("/{message}")
>> public Response doSomething();
>> }
>>
>>
>> @Stateless
>> public class AsyncResourceBean implements AsyncResource {
>>
>> @Logger
>> Log log;
>>
>> public Response doSomething(){
>> log.info("polling map"); //NPE
>> return Response.status(200).entity("hello").build();
>> }
>> }
>>
>> When log variable is accessed, I get the following exception, guess
>> its just caused by a NullPointerException:
>> 17:02:21,192 ERROR [org.ajax4jsf.webapp.BaseXMLFilter] Exception in
>> the filter chain: javax.servlet.ServletException:
>> java.lang.IllegalArgumentException: no file extension in servlet path:
>> /async/message
>>
>> If I remove the log statement, everything works fine again.
>>
>> Any ideas what could be wrong?
>>
>>
>> Thank you in advance, Clemens
>>
>>
>> ------------------------------------------------------------------------------
>> Simplify data backup and recovery for your virtual environment with
>> vRanger.
>> Installation's a snap, and flexible recovery options mean your data is
>> safe,
>> secure and there when you need it. Data protection magic?
>> Nope - It's vRanger. Get your free trial download today.
>> http://p.sf.net/sfu/quest-sfdev2dev
>> _______________________________________________
>> Resteasy-users mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
|
|
From: Jozef H. <joz...@gm...> - 2011-06-03 11:47:23
|
The problem is that you're using Seam 2 injection (@Logger) in an object
which is not a Seam component. Add @Name to turn AsyncResourceBean into
a Seam component.
On 06/01/2011 03:13 PM, Clemens Eisserer wrote:
> Hi,
>
> I would like to use RestEasy's EJB integration in a
> jboss6/seam/richfaces webapp.
> Everything seems to work file, except injection of other EJBs.
>
> I basically did the following:
>
> @Path("/async")
> public interface AsyncResource {
>
> @GET
> @Path("/{message}")
> public Response doSomething();
> }
>
>
> @Stateless
> public class AsyncResourceBean implements AsyncResource {
>
> @Logger
> Log log;
>
> public Response doSomething(){
> log.info("polling map"); //NPE
> return Response.status(200).entity("hello").build();
> }
> }
>
> When log variable is accessed, I get the following exception, guess
> its just caused by a NullPointerException:
> 17:02:21,192 ERROR [org.ajax4jsf.webapp.BaseXMLFilter] Exception in
> the filter chain: javax.servlet.ServletException:
> java.lang.IllegalArgumentException: no file extension in servlet path:
> /async/message
>
> If I remove the log statement, everything works fine again.
>
> Any ideas what could be wrong?
>
>
> Thank you in advance, Clemens
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
|
|
From: Clemens E. <lin...@gm...> - 2011-06-01 13:13:14
|
Hi,
I would like to use RestEasy's EJB integration in a
jboss6/seam/richfaces webapp.
Everything seems to work file, except injection of other EJBs.
I basically did the following:
@Path("/async")
public interface AsyncResource {
@GET
@Path("/{message}")
public Response doSomething();
}
@Stateless
public class AsyncResourceBean implements AsyncResource {
@Logger
Log log;
public Response doSomething(){
log.info("polling map"); //NPE
return Response.status(200).entity("hello").build();
}
}
When log variable is accessed, I get the following exception, guess
its just caused by a NullPointerException:
17:02:21,192 ERROR [org.ajax4jsf.webapp.BaseXMLFilter] Exception in
the filter chain: javax.servlet.ServletException:
java.lang.IllegalArgumentException: no file extension in servlet path:
/async/message
If I remove the log statement, everything works fine again.
Any ideas what could be wrong?
Thank you in advance, Clemens
|
|
From: Bill B. <bb...@re...> - 2011-05-31 12:49:27
|
You mean OAuth? Our OAuth support isn't recommended yet as the original contributor (employee) left for greener pastures. Or just regular authentication? Since resteasy runs in a servlet container, you can use any authentication mechanism provided by the servlet container in production. On 5/30/11 10:19 PM, Federico Gaule wrote: > Hi everyone, > > I have been reading Resteasy doc: > http://docs.jboss.org/resteasy/docs/2.0.0.GA/userguide/html/Authentication.html > about auth. > It says it is not proper for production. I have checked if there was any > other solution for auth, but i haven't found anything related. > Could anyone help me? > > Best, > Fede. > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |