[Resteasy-users] Where to go for authorization examples?
In the book, Restful Java with JAXRS there are examples up through chapter 11. I need examples with tests for chapter 12, Authentication and Authorization with JaxRS. Where can I get them? Sincerely, Nick Skriloff , ME , MCP, SCJP Information Technology Specialist Darden Information Services Voice 434 243 5025 Fax 434 243 2279 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 https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Where to go for authorization examples?
Suppose the example in Chapter 11 had paths all under basic authentication with a login of admin and password of password. This is explained some in Chapter 12 I need an example of a test that would be able to login and prove the container got back the userPrincipal off the Request/Response HttpClient client = new HttpClient(); { setup the authorization credentials GetMethod method = new GetMethod(http://localhost:8080/ejb-integration-war/basic;); int status = client.executeMethod(method); I need something like the below line Assert.assertEquals(admin, method.getResponse().getUserPrincipal()); method.releaseConnection(); } Nick -Original Message- From: Bill Burke [mailto:bbu...@redhat.com] Sent: Friday, January 11, 2013 10:39 AM To: resteasy-users@lists.sourceforge.net Subject: Re: [Resteasy-users] Where to go for authorization examples? What do you actually want to do? JAXRS security is left up to web container on the server side, and is fully implementation dependent on the client. On the client side, its configuring Apache HC Client. On the server side, its configuring web.xml and setting your web tier to do SSL/HTTPS. On 1/11/2013 10:30 AM, Skriloff, Nicholas wrote: In the book, Restful Java with JAXRS there are examples up through chapter 11. I need examples with tests for chapter 12, Authentication and Authorization with JaxRS. Where can I get them? Sincerely, Nick Skriloff , ME , MCP, SCJP Information Technology Specialist Darden Information Services Voice 434 243 5025 Fax 434 243 2279 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 https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com -- 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 -- 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
[Resteasy-users] newbie question: help with example
I downloaded JBoss AS7 7.1.1.Final (Brontes). I start it up. I add a simple management user with the add-user.bat file. I downloaded resteasy-jaxrs-2.3.5 and started looking at the example ejb-integration. In C:\projects\restEasy\resteasy-jaxrs-2.3.5.Final-all\resteasy-jaxrs-2.3.5.Final\examples\ejb-integration I run Mvn clean install It starts and then I get an error below. What am I doing wrong? [INFO] Could not find manifest file: C:\projects\restEasy\resteasy-jaxrs-2.3.5.Final-all\resteasy-jaxrs-2.3.5.Final\exam ples\ejb-integration\ear\target\ejb-integration-ear-2.3.5.Final\META-INF\MANIFEST.MF - Generating one [INFO] Building jar: C:\projects\restEasy\resteasy-jaxrs-2.3.5.Final-all\resteasy-jaxrs-2.3.5.Final\examples\ejb-integra tion\ear\target\ejb-integration.ear [INFO] [INFO] --- jboss-maven-plugin:1.3.1:deploy (jboss-deploy) @ ejb-integration-ear --- [INFO] Deploying C:\projects\restEasy\resteasy-jaxrs-2.3.5.Final-all\resteasy-jaxrs-2.3.5.Final\examples\ejb-integration \ear/target/ejb-integration.ear to JBoss. [INFO] No server specified for authentication - using defaults [INFO] [INFO] Reactor Summary: [INFO] [INFO] Resteasy JAX-RS EJB Test .. SUCCESS [0.340s] [INFO] EJB test - EJB SUCCESS [1.124s] [INFO] Basic Integration Test SUCCESS [0.464s] [INFO] Basic Integration Test FAILURE [0.908s] [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 3.049s [INFO] Finished at: Thu Dec 27 16:43:35 EST 2012 [INFO] Final Memory: 19M/219M [INFO] [ERROR] Failed to execute goal org.codehaus.mojo:jboss-maven-plugin:1.3.1:deploy (jboss-deploy) on project ejb-integrati on-ear: Mojo error occurred: http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByNamename=jboss.system:servi ce%3DMainDeployermethodName=deployargType=java.net.URLarg0=file:C:\projects\restEasy\resteasy-jaxrs-2.3.5.Final-all\r esteasy-jaxrs-2.3.5.Final\examples\ejb-integration\ear/target/ejb-integration.ear - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn goals -rf :ejb-integration-ear C:\projects\restEasy\resteasy-jaxrs-2.3.5.Final-all\resteasy-jaxrs-2.3.5.Final\examples\ejb-integration Sincerely, Nick Skriloff , ME , MCP, SCJP Information Technology Specialist Darden Information Services Voice 434 243 5025 Fax 434 243 2279 skrilo...@darden.virginia.edu -- 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
[Resteasy-users] Newbie question REST
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? 2) Should I upgrade to latest RESTeasy eventhough I am presently running EAP6 unmodified to get the lastest and greatest? 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 { ... @GET @Produces(application/xml) public ActionRolesData[] getActionRoles() throws SystemException { Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011234: JAX-RS resource edu.darden.regi strar.session.unchecked.UncheckedCodeTablesBean does not correspond to a view on the EJB UncheckedCodeTables. @Path anno tations can only be placed on classes or interfaces that represent a local, remote or no-interface view of an EJB. at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:81) What am I doing wrong? Sincerely, Nick Skriloff , ME , MCP, SCJP Information Technology Specialist Darden Information Services Voice 434 243 5025 Fax 434 243 2279 skrilo...@darden.virginia.edu -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users