You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Matthew Broadhead <ma...@nbmlaw.co.uk.INVALID> on 2018/07/17 08:39:30 UTC
WebClient send multiple query same name
cxf-core-3.1.10.jar (TomEE 7.0.3)
I am trying to access an endpoint which says it wants multiple id number
parameters like. the documentation says this is allowed in http?
https://example.com/test?id=123&id=456&id=789
i tried the following
WebClient webClient = WebClient.create(baseAddress);
List<Integer> ids = selectList();
// test 1
for (Integer id : ids) {
webClient.query("id", id);
}
// test 2
webClient.query("id", ids);
// test 3
webClient.query("id", ids.toArray(new Integer[ids.size()]));
Re: WebClient send multiple query same name
Posted by Matthew Broadhead <ma...@nbmlaw.co.uk.INVALID>.
i finally checked this. it works fine. it had filtered the values
somehow to being only 1 in the list. sorry for wasting your time
On 18/07/18 11:01, Colm O hEigeartaigh wrote:
> The same works fine for me with CXF 3.1.10 and Integer types.
>
> Colm.
>
> On Tue, Jul 17, 2018 at 11:32 AM, Matthew Broadhead <
> matthew.broadhead@nbmlaw.co.uk.invalid> wrote:
>
>> i think it is version 3.1.10 packaged with TomEE 7.0.3. might be because
>> i am sending Integer type?
>>
>> On 17/07/18 12:09, Colm O hEigeartaigh wrote:
>>
>>> What version of CXF are you using? With CXF 3.2.5 I can do:
>>>
>>> WebClient client = WebClient.create(address, busFile.toString());
>>> client = client.type("application/xml");
>>>
>>> client.query("id", "1");
>>> client.query("id", "2");
>>> Response response = client.get();
>>>
>>> and the URL is:
>>>
>>> Address: http://localhost:9001/doubleit/services?id=1&id=2
>>>
>>> Colm.
>>>
>>> On Tue, Jul 17, 2018 at 9:39 AM, Matthew Broadhead <
>>> matthew.broadhead@nbmlaw.co.uk.invalid> wrote:
>>>
>>> cxf-core-3.1.10.jar (TomEE 7.0.3)
>>>> I am trying to access an endpoint which says it wants multiple id number
>>>> parameters like. the documentation says this is allowed in http?
>>>> https://example.com/test?id=123&id=456&id=789
>>>>
>>>> i tried the following
>>>> WebClient webClient = WebClient.create(baseAddress);
>>>> List<Integer> ids = selectList();
>>>> // test 1
>>>> for (Integer id : ids) {
>>>> webClient.query("id", id);
>>>> }
>>>> // test 2
>>>> webClient.query("id", ids);
>>>> // test 3
>>>> webClient.query("id", ids.toArray(new Integer[ids.size()]));
>>>>
>>>>
>>>
>
Re: WebClient send multiple query same name
Posted by Colm O hEigeartaigh <co...@apache.org>.
The same works fine for me with CXF 3.1.10 and Integer types.
Colm.
On Tue, Jul 17, 2018 at 11:32 AM, Matthew Broadhead <
matthew.broadhead@nbmlaw.co.uk.invalid> wrote:
> i think it is version 3.1.10 packaged with TomEE 7.0.3. might be because
> i am sending Integer type?
>
> On 17/07/18 12:09, Colm O hEigeartaigh wrote:
>
>> What version of CXF are you using? With CXF 3.2.5 I can do:
>>
>> WebClient client = WebClient.create(address, busFile.toString());
>> client = client.type("application/xml");
>>
>> client.query("id", "1");
>> client.query("id", "2");
>> Response response = client.get();
>>
>> and the URL is:
>>
>> Address: http://localhost:9001/doubleit/services?id=1&id=2
>>
>> Colm.
>>
>> On Tue, Jul 17, 2018 at 9:39 AM, Matthew Broadhead <
>> matthew.broadhead@nbmlaw.co.uk.invalid> wrote:
>>
>> cxf-core-3.1.10.jar (TomEE 7.0.3)
>>>
>>> I am trying to access an endpoint which says it wants multiple id number
>>> parameters like. the documentation says this is allowed in http?
>>> https://example.com/test?id=123&id=456&id=789
>>>
>>> i tried the following
>>> WebClient webClient = WebClient.create(baseAddress);
>>> List<Integer> ids = selectList();
>>> // test 1
>>> for (Integer id : ids) {
>>> webClient.query("id", id);
>>> }
>>> // test 2
>>> webClient.query("id", ids);
>>> // test 3
>>> webClient.query("id", ids.toArray(new Integer[ids.size()]));
>>>
>>>
>>
>>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: WebClient send multiple query same name
Posted by Matthew Broadhead <ma...@nbmlaw.co.uk.INVALID>.
i think it is version 3.1.10 packaged with TomEE 7.0.3. might be
because i am sending Integer type?
On 17/07/18 12:09, Colm O hEigeartaigh wrote:
> What version of CXF are you using? With CXF 3.2.5 I can do:
>
> WebClient client = WebClient.create(address, busFile.toString());
> client = client.type("application/xml");
>
> client.query("id", "1");
> client.query("id", "2");
> Response response = client.get();
>
> and the URL is:
>
> Address: http://localhost:9001/doubleit/services?id=1&id=2
>
> Colm.
>
> On Tue, Jul 17, 2018 at 9:39 AM, Matthew Broadhead <
> matthew.broadhead@nbmlaw.co.uk.invalid> wrote:
>
>> cxf-core-3.1.10.jar (TomEE 7.0.3)
>>
>> I am trying to access an endpoint which says it wants multiple id number
>> parameters like. the documentation says this is allowed in http?
>> https://example.com/test?id=123&id=456&id=789
>>
>> i tried the following
>> WebClient webClient = WebClient.create(baseAddress);
>> List<Integer> ids = selectList();
>> // test 1
>> for (Integer id : ids) {
>> webClient.query("id", id);
>> }
>> // test 2
>> webClient.query("id", ids);
>> // test 3
>> webClient.query("id", ids.toArray(new Integer[ids.size()]));
>>
>
>
Re: WebClient send multiple query same name
Posted by Colm O hEigeartaigh <co...@apache.org>.
What version of CXF are you using? With CXF 3.2.5 I can do:
WebClient client = WebClient.create(address, busFile.toString());
client = client.type("application/xml");
client.query("id", "1");
client.query("id", "2");
Response response = client.get();
and the URL is:
Address: http://localhost:9001/doubleit/services?id=1&id=2
Colm.
On Tue, Jul 17, 2018 at 9:39 AM, Matthew Broadhead <
matthew.broadhead@nbmlaw.co.uk.invalid> wrote:
> cxf-core-3.1.10.jar (TomEE 7.0.3)
>
> I am trying to access an endpoint which says it wants multiple id number
> parameters like. the documentation says this is allowed in http?
> https://example.com/test?id=123&id=456&id=789
>
> i tried the following
> WebClient webClient = WebClient.create(baseAddress);
> List<Integer> ids = selectList();
> // test 1
> for (Integer id : ids) {
> webClient.query("id", id);
> }
> // test 2
> webClient.query("id", ids);
> // test 3
> webClient.query("id", ids.toArray(new Integer[ids.size()]));
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com