Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9230283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:47:14+00:00 2026-06-18T05:47:14+00:00

I need to call a rest web service in playframework 2 and I need

  • 0

I need to call a rest web service in playframework 2 and I need to send a query parameter which is an array. In regular html I would send it like:

GET http://host.com?a=1&a=2&a=3

But when I do it when I try to do it with the playframework 2 WS api I do the next:

Map<String,String[]> paramMap = new HashMap<String, String[]>();
paramMap.put("a",new String[]{"value1","value2"});

WS.WSRequestHolder holder = WS.url("http://host.com");

Set<String> keys = paramMap.keySet();
for (int i = 0; i < paramMap.get(key).length; i++)
{
    holder.setQueryParameter(key, paramMap.get(key)[i]);
}

And the first time that setQueryParamater() arrives, everything goes perfect but the second time I get a NullPointerException and paramMap.get(key)[i] is not null. Is this possible? is there any workaround?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:47:15+00:00Added an answer on June 18, 2026 at 5:47 am

    Ok, it seems to be a bug in play-framework, but solved in 2.1 version.

    https://play.lighthouseapp.com/projects/82401/tickets/360-bug-in-wsjava-setqueryparameter-leads-to-npe-when-adding-a-query-parameter-twice

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a REST web service call using PUT, I need to send JSON that
We need to provide a simple REST-like web service interface for communicating with a
I need to call a REST web service that provides an XML feed of
We have created RESTful web services using Spring's REST support. We need to call
I am developing REST web services using Jersey and I need to call a
I need to call my WCF REST Service with multiple parameters with the POST
i need to consume a web api, which is located here http://46.253.202.174:8080/ws-api/v1/rest/zdata/codesByJurAndUsage?jur=Boston,%20MA&usg=barber I don't
I'm adding an API to a Symfony-application which should act as a REST web-service.
I have a Silverlight client that I need to call a web service. The
i used Zend Rest Controller for developing a web service, and now i need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.