how can i display the result of my rest service before invoke it from the gadget?

Hi every one,

i developpe a gadget which have to retreive data from a rest service.

i want show the result of my rest service before communicate it with the gadget.

atlassian-plugin.xml :

--------------------------

<rest key="helloWorldRest" path="/helloworld" version="1.0">
<description>Provides hello world services.</description>
</rest>

my rest service:

-------------------

@Path("/")
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public class RestHelloWorldService {
@GET
@Path("users")
public Response getUncompletedUsers() {
return Response.ok(new User("Fred","Bloggs")).build();
}
}

class User

-------------

@XmlRootElement
public class User
{
@XmlElement
private String firstName;

@XmlElement
private String lastName;

// This private constructor isn't used by any code, but JAXB requires any
// representation class to have a no-args constructor.
private User() { }

public User(String firstName, String lastName)
{
this.firstName = firstName;
this.lastName = lastName;
}
}

i used this : http://localhost:2990/jira/rest/helloworld/1.0/users

but i had this error :

Etat HTTP 404 - /jira/rest/helloworld/1.0/users

how can display my rest service result ??

Thanks

3 answers

1 accepted

now not know

know i have this error,

Etat HTTP 401 - os_authType was 'any' and an invalid cookie was sent

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

154 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you