[jboss-user] [JBossWS] - send HaspMap<String, ArrayList<String>> over WS
peiguo
do-not-reply at jboss.com
Thu May 1 19:59:09 EDT 2008
I have getter/setter defined for properties, but still cannot send object of this class through WS, because the JBOSS generated WSDL doesn't include correct information for ArrayList. How can I correct this?
| package org.jboss.tutorial.webservice.bean;
|
| import java.util.*;
| import java.io.*;
|
| public class Something {
| private int a;
| private double b;
|
|
| private HashMap<String, ArrayList<String>> c;
|
| public Something() {
| a = 1;
| b = 2.0;
| c = new HashMap<String, ArrayList<String>>();
| {
| ArrayList<String> arr = new ArrayList<String>();
| arr.add("This is fun");
| arr.add("Interesting");
| arr.add("What is this?");
| c.put("thought", arr);
| }
| {
| ArrayList<String> arr = new ArrayList<String>();
| arr.add("Kaveh");
| arr.add("David");
| arr.add("Costa");
| c.put("name", arr);
| }
| {
| ArrayList<String> arr = new ArrayList<String>();
| arr.add("green apple");
| arr.add("orange orange");
| arr.add("yellow mango");
| c.put("fruit", arr);
| }
| {
| ArrayList<String> arr = new ArrayList<String>();
| arr.add("they shoot horse");
| arr.add("sleppless in seattle");
| arr.add("thank you for smoking");
| c.put("movie", arr);
| }
| }
|
| public int getA() {
| return a;
| }
|
| public void setA(int a) {
| this.a = a;
| }
|
| public double getB() {
| return b;
| }
|
| public void setB(double b) {
| this.b = b;
| }
|
| public HashMap<String, ArrayList<String>> getC() {
| return c;
| }
|
| public void setC(HashMap<String, ArrayList<String>> c) {
| this.c = c;
| }
|
| public ArrayList<String> getC(String i) {
| return c.get(i);
| }
|
| public void setC(String i, ArrayList<String> c) {
| this.c.put(i, c);
| }
|
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148233#4148233
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148233
More information about the jboss-user
mailing list