Web Services Restful Services

Discussion in 'Java' started by imlakhani, Dec 16, 2009.

  1. imlakhani

    imlakhani Guest

    Need help in Rest Based Web Services ... need to pass list parameters
    in Restful services......anybody can help ?

    I am not able send list parameters via Rest ful services. I am using
    CXF 2.2.4.

    any help will be highly appreciated ?
    imlakhani, Dec 16, 2009
    #1
    1. Advertising

  2. imlakhani wrote:
    > Need help in Rest Based Web Services ... need to pass list parameters
    > in Restful services......anybody can help ?
    >
    > I am not able send list parameters via Rest ful services. I am using
    > CXF 2.2.4.
    >
    > any help will be highly appreciated ?


    I have used jdom (see www.jdom.org). A snip of code that does a post and
    gets an XML response follows:

    try {
    data = "session=" + URLEncoder.encode(session, "UTF-8")
    + "&selection" + URLEncoder.encode(selection),
    "UTF-8");
    url = new URL("https://xyz.com/vms/report_list");
    } catch (Exception e) {
    System.out.println("Exception (1) " + e.getMessage());
    }

    Document doc = PostForXML(url, data);

    if (doc == null) {
    return;
    }

    Element root = doc.getRootElement();
    Jeffrey H. Coffield, Dec 16, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wouter

    java RESTful web service

    Wouter, Mar 31, 2009, in forum: Java
    Replies:
    25
    Views:
    5,049
    Arne Vajhøj
    Apr 10, 2009
  2. ses
    Replies:
    6
    Views:
    861
  3. Matty J
    Replies:
    0
    Views:
    324
    Matty J
    Apr 20, 2008
  4. Rich Morin

    "RESTful Web Services"

    Rich Morin, Jun 8, 2007, in forum: Ruby
    Replies:
    5
    Views:
    160
    Giles Bowkett
    Jun 10, 2007
  5. Brian Wolf
    Replies:
    2
    Views:
    133
    Pierre Lecocq
    Feb 2, 2010
Loading...

Share This Page