Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 8
Registered: ‎12-04-2010
My Device: 8520
My Carrier: devloper
Accepted Solution

Restful Jax-RS web service

plz tell me anyone how to use POST mehod in RESTful Jax-rs web servises.

through GET method i am able to send request and getting response with respect through 

but in POST i am not able to do.

how to call POST method from web servise

plz help me

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Restful Jax-RS web service

Hi pallu,

 

Can you provide some more information:

 

- What OS version are you using on the device

- Are you attempting to do this via the Browser or in a WebWorks application

- Have you tried doing the same thing in chrome/safari?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
New Contributor
Posts: 8
Registered: ‎12-04-2010
My Device: 8520
My Carrier: devloper

Re: Restful Jax-RS web service

hi tneil,

Thanks for replay actually i am new for blackberry development 

 

i want a restful webservise it provide data  to may appliction in xml format


1) i am develop appl in blackberry 8520 using 4.6.0 jar version after that i want communicate database.  

in my project request send by get method to the  restful Jax-rs webservise with w.r.t that request  corresponding data is fetch in to the data base & show in xml format on  web browser & in my project getting data by using parsing this xml format.

  

but i want to request send by POST method to the  restful Jax-rs webservise but i don't no how to call post method in restful jax-rs webservise

 

i am try this things in Apach tomcate Browser.

some  links restfiul webservise

http://www.vogella.de/articles/REST/article.html

 

I am try implement this by POST method but unable to call this method

 

 

@Path("/users")
 public class UserResource {
 @POST
 @Path("/upload")
 @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
 @Produces(MediaType.TEXT_PLAIN)  
 public static Response upload(
                @FormParam("name") String name,
                @FormParam("content") String content)
                throws Exception {
          System.out.println(" you get your content as String2222");
        
        return Response.ok().build();
 }