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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Handling complex type array with the twebservice component

Hi All,
I have to pass a complex type array as input parameter to the twebservice component.
I need to call CustomersCreate function(like example below in php) and pass the required arguments to that
function using twebservice component.
  $customerArray=array(array('email' => 'abcd@example.org', 'firstname' => 'first1', 'lastname' => 'last1',
'password' => 'password'),
array('email' => 'abcd1@example.org', 'firstname' => 'first2', 'lastname' => 'last2', 'password' =>
'password'));
CustomersCreate(array('sessionId'=>$sessionID2,'customerArray'=>$customerArray))

Followed this post :

http://www.talendforge.org/forum/viewtopic.php?pid=90276#p90276
I'm creating a complex array like below:

   
java.util.HashMap customer_map1 = new java.util.HashMap();
customer_map.put("email","abcd@abcd.com");
customer_map.put("firstname","first1");
customer_map.put("lastname","last1");
customer_map.put("password","password");

java.util.HashMap customer_map2 = new java.util.HashMap();
customer_map.put("email","abcd@abcd.com");
customer_map.put("firstname","first2");
customer_map.put("lastname","last2");
customer_map.put("password","password");

java.util.ArrayList values_list = new java.util.ArrayList();
java.util.ArrayList values_list1 = new java.util.ArrayList();
values_list.add(customer_map1 );
values_list.add(customer_map2 );

values_list1.add(values_list);

And passing the "values_list1" as input parameter to the CustomersCreate function of twebservice component.
Is this the correct way to pass a complex array as an input parameter or am I doing wrong?

I want to map total customerArray as input parameter but not each and every field that it has.Because
array contains multiple customer records.(Attached screen shot)
Can any one please tell me the way how I can handle this scenario?
Best regards,
sayagoud ravelly
Labels (3)
2 Replies
_AnonymousUser
Specialist III
Specialist III
Author

Can any one please guide me how can I do the mapping of a complex array with twebservice?
Thanks in advance.
_AnonymousUser
Specialist III
Specialist III
Author

Is there any wrong with my question?