简体   繁体   中英

How can I send list input to SOAP request?

My Soap request is expecting list of user IDs as input.

Below input is working fine from SOAPUI.

<UserID>1234</UserID>
<UserID>5678</USERID>
..

I tried to give same inputs from Java as an ArrayList but not working. Please advise how can I send input for my soap request from Java?

You can send array in soap request.

List<Integer> idList = new ArrayList<Integer>();
Integer[] res = idList.toArray(new Integer[0]);

ArrayList is not understood by the Web Service. You should use types which are understood by WSDL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM