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

Lamrani April 23, 2012

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

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012
0 votes
Lamrani April 23, 2012

know i have this error,

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

0 votes
Lamrani April 23, 2012

now not know

Suggest an answer

Log in or Sign up to answer