[Resteasy-users] Jackson - not marked as ignorable

2013-01-03 Thread András Csányi
Dear All,

I would like to ask some help regarding jackson and class convert to JSON.
When I post my class to the server I got this error message:

17:14:57,358 WARN  [org.jboss.resteasy.core.SynchronousDispatcher]
Failed executing POST /core/partners/addnewpartner:
org.jboss.resteasy.spi.ReaderException:
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: U
nrecognized field partnerentity (Class
com.sayusiando.java.dilib.modules.core.commons.core.entities.dto.partners.restproviders.PartnerEntityDTOClientProvider),
not marked as ignorable
 at [Source: org.apache.catalina.connector.CoyoteInputStream@1aadb3c9;
line: 1, column: 19] (through reference chain:
com.sayusiando.java.dilib.modules.core.commons.core.entities.dto.partners.restproviders.PartnerEntityD
TOClientProvider[partnerentity])

I read in the documentation that I should mark my JAXB class with
@NoJackson annotation but I don't know where can I find this
annotation. On the other hand, there is no partnerentity field in my
class. My JAXB class has this annotation as a class annotation.
@XmlRootElement(name = partnerentity)

I use Netbeans with maven and these jar are provided:

dependency
  groupIdorg.jboss.resteasy/groupId
  artifactIdresteasy-jaxrs/artifactId
  version2.3.1.GA/version
/dependency
dependency
  groupIdorg.jboss.resteasy/groupId
  artifactIdresteasy-jettison-provider/artifactId
  version2.3.1.GA/version
/dependency

Thanks in advance!

András

--
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  Trust in God and keep your gunpowder dry! - Cromwell

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Jackson - not marked as ignorable

2013-01-03 Thread András Csányi
On 3 January 2013 17:29, András Csányi sayusi.a...@sayusi.hu wrote:

According to the Internet it should be in the
org.jboss.resteasy.annotations.providers package, but my jar
(resteasy-jaxrs-2.3.1.GA), delivered by maven, contains only this
package: org.jboss.resteasy.annotations.providers.img

Despite the fact that I'm not able to use this annotation, is it
normal that the jar does not contains this annotation? Should I
upgrade to 2.3.4?

Thanks in advance!

--
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  Trust in God and keep your gunpowder dry! - Cromwell

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Newbie question REST

2013-01-03 Thread Weinan Li


-- 
Weinan Li



On Wednesday, January 2, 2013 at 10:45 PM, Bill Burke wrote:

 
 
 On 12/21/2012 4:12 PM, Skriloff, Nicholas wrote:
  I have three questions
  
  1) I want to see all the restful urls available when I start up EAP6 in
  the server.log file. How do I configure standalone.xml logging to show
  the rest easy services that are exposed and their paths?
  
 
 
 Resteasy does not have that capability. It only specifies which 
 classes have been deployed at deploy time.
 
  2) Should I upgrade to latest RESTeasy eventhough I am presently running
  EAP6 unmodified to get the lastest and greatest?
  
 
 
 Weinan made a good suggestion. Read the release notes and see if its 
 worth upgrading. But, future 2.3.x releases will probably only be done 
 within EAP. We're fully focused on 3.x now.
 
 


Bill, does that mean I could just submit patches to trunk and no need to patch 
Branch_2_3 from now on?
 
 
  3)
  
  I develop a registrar system for students to enroll into classes. One
  of the war files is registrar-student.war. I am trying to expose my
  first RESTeasy webservice. I am running EAP6, which runs resteasy 2.3.3 .
  
  I have an ejb that does code table lookups and I figured that is as good
  as place as any to start.
  
  So, I put this class in the app
  
  import javax.ws.rs.ApplicationPath;
  
  import javax.ws.rs.core.Application;
  
  @ApplicationPath(/registrarWebservices)
  
  public class RegistrarWebServicesApplication extends Application {
  
  //public class RegistrarWebServicesApplication {
  
  }
  
  I first tried adding the code below to the interface. I got the below
  error. I added the same code directly to the ejb. I got the same below
  error.
  
  @Path(/codetables)
  
  public class UncheckedCodeTablesBean implements SessionBean,
  UncheckedCodeTablesMethods {
  
 
 
 The error is what it says. You can only apply JAX-RS @PATH and method 
 annotations (@GET, etc.) to a local interface or no-interface EJB class.
 
 So, move your @Path and @GET, @Produces annotatiosn to your 
 UncheckedCodeTablesMethods interface, or make the bean a no-interface 
 bean class.
 
 Also, your EJB is very old school :) Try EJB3.x annotations?
 
 @Stateless
 public class UncheckedCodeTablesBean implements 
 UncheckedCodeTablesMethods {}
 
 
 Or even, just remove the interface entirely and just write a class.
 
 And ditch your XML of course :)
 
 -- 
 Bill Burke
 JBoss, a division of Red Hat
 http://bill.burkecentral.com
 
 --
 Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
 and much more. Keep your Java skills current with LearnJavaNow -
 200+ hours of step-by-step video tutorials by Java experts.
 SALE $49.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122612 
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net 
 (mailto:Resteasy-users@lists.sourceforge.net)
 https://lists.sourceforge.net/lists/listinfo/resteasy-users
 
 


--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] @Form and providers

2013-01-03 Thread Weinan Li


--  
Weinan Li



On Wednesday, January 2, 2013 at 10:50 PM, András Csányi wrote:

 Dear All,
  
 I would like to get some clarification and a little help.
 I'm going to create a software which has REST service on server side
 and it will have to type of client, a native client built on Swing and
 a client based on gwt.
  
 Question 1:
 According to the documentation if I use this at server side I can
 reach the service as a form. In case of web based application a form
 is needed and the url (@Path) must be called by post method. In case
 of swing, an object is needed properly annotated and it must be posted
 by the client to server side. Do I understand correctly this part?
  
  


RESTEasy has provided a component called 'RESTEasy JS-API', which will generate 
the client side codes in javascript format, and the generated code clearly show 
to you how to build up a request correctly to a @Form and @FormParam backed 
API. You can also refer to the sample codes in 'resteasy-jsapi-testing':

https://github.com/resteasy/Resteasy/tree/master/jaxrs/resteasy-jsapi-testing

After understanding how to send/recv the data, you could build up the client 
side by yourself.
  
 @POST
 @Path(/partner/new)
 public String putNewPartner(@Form PartnerEntityDTOClient newPartnerEntityDTO) 
 {}
  
  
 Question 2:
 I will use lot of dto classes - they will have mostly string, date and
 binary stuff - and they will be moved between the client and the
 server. The protocol will be JSON. According to the documentation I
 have to create both object the request and the response object for
 every dto class to handle the JSON protocol. Do I understand
 correctly? If so, than I would like to ask whether is there any
 tutorial or blog or book which helps to write these classes?
 Unfortunately, the documentation detailed deeply enough for my
 knowledge.
  
  


You can build client side codes al by yourselves, or you can use RESTEasy 
client api:

http://docs.jboss.org/resteasy/docs/2.3.5.Final/userguide/html/RESTEasy_Client_Framework.html

I haven't tested whether it supports JSON marshal/unmarshal yet. Maybe other 
people in this list could give you more answers on this. I'll verify it later 
and tell you my findings ;-)

Sorry if I misunderstand your question. Please tell me if I've made anything 
wrong :-)
  
  
 Thanks in advance!
  
 András
  
 --
 -- Csanyi Andras (Sayusi Ando) -- http://sayusi.hu --
 http://facebook.com/andras.csanyi
 -- Trust in God and keep your gunpowder dry! - Cromwell
  
 --
 Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
 and much more. Keep your Java skills current with LearnJavaNow -
 200+ hours of step-by-step video tutorials by Java experts.
 SALE $49.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122612  
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net 
 (mailto:Resteasy-users@lists.sourceforge.net)
 https://lists.sourceforge.net/lists/listinfo/resteasy-users
  
  


--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Jackson - not marked as ignorable

2013-01-03 Thread András Csányi
On 3 January 2013 17:40, András Csányi sayusi.a...@sayusi.hu wrote:
 On 3 January 2013 17:29, András Csányi sayusi.a...@sayusi.hu wrote:

Oh, I got it! I had to add resteasy-jackson-provider something like this:

dependency
  groupIdorg.jboss.resteasy/groupId
  artifactIdresteasy-jackson-provider/artifactId
  version2.3.5.Final/version
/dependency

--
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  Trust in God and keep your gunpowder dry! - Cromwell

--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Will RestEasy work with OLD EJB

2013-01-03 Thread Weinan Li


-- 
Weinan Li



On Friday, January 4, 2013 at 10:37 AM, Skriloff, Nicholas wrote:

 Resteasy folks, 
I am converting a J2EE application that runs on JBOss 4.0.5 to 
 run on JBOSS 7.1.1 OR EAP6. 
Our EJBS are presently from J2ee version 1.3.1. J2EE 1.3  was 
 released September 24, 2001. So our EJBs are 1.1 or 2.0 .  Below is a segment 
 from our properties file.  THEY ARE ALL STATELESS SESSION BEANS.  
 j2ee.version=1.3.1
 j2ee.dir=${lib.dir}/j2sdkee${j2ee.version}
 #j2ee.jar=${j2ee.dir}/lib/j2ee.jar
I would rather not do the work of converting all the EJBS to 
 3.1-- even though it is a good idea-- if I do not have to.  I have already 
 begun some of the work.  However, based on the resteasy examples from 
 http://sourceforge.net/projects/resteasy/files/Resteasy%20JAX-RS/2.3.3.Final/resteasy-jaxrs-2.3.3.Final-all.zip
   IT LOOKS like all the examples are EJB 3.0 and 3.1.  
Will RestEasy 2.3.3 or 2.3.5 even work with EJB 1.1 or 2.0? If 
 so, if you were in my shoes would you bite the bullet and convert all the 
 ejbs or would you try to get RestEasy to work with the present EJB 1.1/2.0 
 environment?
 
 
 

If you are planning to deploy your project on JBoss AS7, then it's more a 
compatible issue of EJB and AS7. I've googled a little bit and see there are 
some migrating issues of using EJB 2.x on AS7. And I didn't find much useful 
information on using EJB1.x on AS7.

I'm not sure if anyone has verified EJB1.x + 2.x + RESTEasy will work on AS7. 
My suggestion is that you can try to build up a small project with older 
version of EJB and RESTEasy and deploy it to AS7 to see if you could manage it 
to work.
 
 
  
  
  
 Sincerely,
 Nick Skriloff , ME , MCP, SCJP
 Information Technology Specialist
 Darden Information Services
 Voice 434 243 5025  Fax 434 243 2279
 skrilo...@darden.virginia.edu (mailto:skrilo...@darden.virginia.edu)
  
 
 
 --
 Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
 much more. Get web development skills now with LearnDevNow -
 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
 SALE $99.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122812
 
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net 
 (mailto:Resteasy-users@lists.sourceforge.net)
 https://lists.sourceforge.net/lists/listinfo/resteasy-users
 
 


--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users