Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to call REST web service and get response in talend

I have REST web Service URL- http://XYZ:8080/WebApp/search/service
If I send following json format data using Advanced Rest Client(Chrome-extension) then I get O/p as below-
Input- 
            {
    "query": {
        "text": "i lOVE inDIA",
        "service":
    }
}

Output-
            {
        -response: {
-pos:
-0:  {
text: "lOVE"
type: "JJ"
pos: "ADJECTIVE"
}
-1:  {
text: "inDIA"
type: "NN"
pos: "NOUN"
}
-2:  {
text: "lOVE inDIA"
type: ""
pos: "NOUN"
}
}
}

I tried with tRestClient but not get succeeded.
How to implement it in Talend5.6.1
Labels (4)
14 Replies
Anonymous
Not applicable
Author

Thank you so much rhall_2.0 It's working now with  tRESTClient.
Please find scrrenshot for detail info.

0683p000009MAUn.png
Anonymous
Not applicable
Author

Glad I could be of assistance 🙂
Anonymous
Not applicable
Author

Hi rhall,
One more doubt...Now I got response in string(json/xml). but how to extract particular tag's data from that string on the fly?
eg-
Input-
{
    "query": {
        "text": "i lOVE inDIA",
        "service":
    }
}
Output-
{"response":{"ner":}]}}
now here I want only PERSON from response string, so how to extract that?
Anonymous
Not applicable
Author

Use the tExtractJSONFields component. You will need to look at the documentation for this as it is not always very straight forward working with the tExtract components.
Anonymous
Not applicable
Author

Hi rhall,
I have scenario like below-
col1   col2
1        a
1        b
1        c
2        p
2        q
3        x
3        y
3        z
I want Output as-
col1   col2
1       array={a,b,c}
2       array={p,q}
3       array={x,y,z}
I want to store col2 in array object for that i follow above instruction given by Link- https://www.talendforge.org/forum/viewt … 81#p165081.
but I am getting O/P like below-
col1   col2
1      
1      
1      
2      
2      
3      
3      
3