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

This widget could not be displayed.

now not know

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 18 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

45 views 1 0
Join discussion

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