| 1 |
import java.rmi.RemoteException; |
| 2 |
import java.util.ArrayList; |
| 3 |
import java.util.Date; |
| 4 |
|
| 5 |
import test.functional.SimpleBean; |
| 6 |
import test.functional.NestedBean; |
| 7 |
|
| 8 |
/* based upon GlobalTypesTest.jws */ |
| 9 |
public class AutoTypesTest { |
| 10 |
|
| 11 |
public String ping() { |
| 12 |
return "Pong"; |
| 13 |
} |
| 14 |
|
| 15 |
public SimpleBean getBean() throws RemoteException { |
| 16 |
return new SimpleBean(); |
| 17 |
} |
| 18 |
|
| 19 |
public void setBean(SimpleBean bean) throws RemoteException { |
| 20 |
// deliberately blank |
| 21 |
} |
| 22 |
|
| 23 |
public SimpleBean echoBean(SimpleBean bean) throws RemoteException { |
| 24 |
return bean; |
| 25 |
} |
| 26 |
|
| 27 |
public SimpleBean[] getBeanArray(int count) throws RemoteException { |
| 28 |
SimpleBean[] result = new SimpleBean[count]; |
| 29 |
for (int i = 0; i < count; i++) { |
| 30 |
result[i] = new SimpleBean(); |
| 31 |
result[i].setIntValue(i); |
| 32 |
} |
| 33 |
return result; |
| 34 |
} |
| 35 |
|
| 36 |
public void setBeanArray(SimpleBean[] beans) throws RemoteException { |
| 37 |
// deliberately blank |
| 38 |
} |
| 39 |
|
| 40 |
public SimpleBean[] echoBeanArray(SimpleBean[] beans) throws RemoteException { |
| 41 |
return beans; |
| 42 |
} |
| 43 |
|
| 44 |
public ArrayList getBeanArrayList(int count) throws RemoteException { |
| 45 |
ArrayList result = new ArrayList(); |
| 46 |
|
| 47 |
for (int i = 0; i < count; i++) { |
| 48 |
SimpleBean bean = new SimpleBean(); |
| 49 |
bean.setIntValue(i); |
| 50 |
result.add(bean); |
| 51 |
} |
| 52 |
|
| 53 |
return result; |
| 54 |
} |
| 55 |
|
| 56 |
public int setBeanArrayList(ArrayList beansArr) throws RemoteException { |
| 57 |
return beansArr.size(); |
| 58 |
} |
| 59 |
|
| 60 |
public NestedBean getNestedBean() throws RemoteException { |
| 61 |
NestedBean result = new NestedBean(); |
| 62 |
result.setStartDate(new Date()); |
| 63 |
result.setTestString("some test string " + result.getStartDate()); //$NON-NLS-1$ |
| 64 |
SimpleBean[] sba = new SimpleBean[3]; |
| 65 |
|
| 66 |
sba[0] = new SimpleBean(); |
| 67 |
sba[1] = new SimpleBean(); |
| 68 |
sba[2] = new SimpleBean(); |
| 69 |
|
| 70 |
sba[0].setIntValue(1); |
| 71 |
sba[1].setIntValue(2); |
| 72 |
sba[2].setIntValue(3); |
| 73 |
|
| 74 |
result.setSimpleBeanList(sba); |
| 75 |
|
| 76 |
return result; |
| 77 |
} |
| 78 |
|
| 79 |
public void setNestedBean(NestedBean value) throws RemoteException { |
| 80 |
// deliberately left blank |
| 81 |
|
| 82 |
} |
| 83 |
|
| 84 |
public NestedBean echoNestedBean(NestedBean value) throws RemoteException { |
| 85 |
return value; |
| 86 |
} |
| 87 |
|
| 88 |
} |