java - How get all infomation about deployed REST services in Glassfish admin console? -


if annotate class @webservice compile , deploy glassfish. can go admin console find class click "view endpoint" link , necessary information service. how can jersey? have class @path annotation, , methods @produces, @post, @get etc. annotations. can find information these methods in glassfish? find link generated wadl file?

if have simple project, e.g., wadltest , have 2 simple classes:

package net.paulvargas.test;  import javax.ws.rs.applicationpath; import javax.ws.rs.core.application;  @applicationpath("resources") public class restconfig extends application {  } 

and:

package net.paulvargas.test;  import javax.ws.rs.get; import javax.ws.rs.path; import javax.ws.rs.produces; import javax.ws.rs.core.mediatype;  @path("test") public class test {      @get     @produces(mediatype.text_plain)     public string message() {         return "hello world!";     }  } 

you can find wadl file in:

http://localhost:8080/wadltest/resources/application.wadl 

ie:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <application xmlns="http://wadl.dev.java.net/2009/02">     <doc xmlns:jersey="http://jersey.java.net/" jersey:generatedby="jersey: 1.11.1 03/31/2012 06:49 pm"/>     <grammars/>     <resources base="http://localhost:8080/wadltest/resources/">         <resource path="test">             <method id="message" name="get">                 <response>                     <representation mediatype="text/plain"/>                 </response>             </method>         </resource>     </resources> </application> 

note: example, not require configuration file, not web.xml. well, if use java ee 6 or java ee 7. i'm using glassfish server open source edition 3.1.2.2 (build 5) , java build 1.7.0_25-b16


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -