assertEquals("service address", "http://localhost:8080/axis2/services/Service1", service.getServiceAddress());
List operations = service.getOperations();
assertEquals("operation count", 7, operations.size());
Map opmap = new HashMap();
for (int i = 0; i < operations.size(); i++) {
OperationCustom op = (OperationCustom)operations.get(i);
opmap.put(op.getOperationName(), op);
}
// getDataClass1 method and operation
OperationCustom op = (OperationCustom)opmap.get("getDataClass1");
assertNotNull("getDataClass1 operation", op);
assertEquals("getDataClass1 request message", "getDataClass1Message", op.getRequestMessageName());
assertEquals("getDataClass1 request wrapper", "getDataClass1", op.getRequestWrapperName());
assertEquals("getDataClass1 response message", "getDataClass1ResponseMessage", op.getResponseMessageName());
assertEquals("getDataClass1 response wrapper", "getDataClass1Response", op.getResponseWrapperName());
List params = op.getParameters();
assertEquals("getDataClass1 parameters count", 0, params.size());
ValueCustom ret = op.getReturn();
assertEquals("getDataClass1 returned type", "org.jibx.binding.generator.DataClass1", ret.getWorkingType());
// setDataClass1 method and operation
op = (OperationCustom)opmap.get("setDataClass1");
assertNotNull("setDataClass1 operation", op);
assertEquals("setDataClass1 request message", "setDataClass1Message", op.getRequestMessageName());
assertEquals("setDataClass1 request wrapper", "setDataClass1", op.getRequestWrapperName());
assertEquals("setDataClass1 response message", "setDataClass1ResponseMessage", op.getResponseMessageName());
assertEquals("setDataClass1 response wrapper", "setDataClass1Response", op.getResponseWrapperName());
params = op.getParameters();
assertEquals("setDataClass1 parameters count", 1, params.size());
ValueCustom param = (ValueCustom)params.get(0);
assertEquals("setDataClass1 parameter type", "org.jibx.binding.generator.DataClass1", param.getWorkingType());
assertEquals("setDataClass1 returned element name", "data", param.getXmlName());
ret = op.getReturn();
assertEquals("setDataClass1 returned type", "void", ret.getWorkingType());
// changeDataClass1 method and operation
op = (OperationCustom)opmap.get("changeDataClass1");
assertNotNull("changeDataClass1 operation", op);
assertEquals("changeDataClass1 request message", "changeDataClass1Message", op.getRequestMessageName());
assertEquals("changeDataClass1 request wrapper", "changeDataClass1", op.getRequestWrapperName());
assertEquals("changeDataClass1 response message", "changeDataClass1ResponseMessage", op.getResponseMessageName());
assertEquals("changeDataClass1 response wrapper", "changeDataClass1Response", op.getResponseWrapperName());
params = op.getParameters();
assertEquals("setDataClass1 parameters count", 2, params.size());
param = (ValueCustom)params.get(0);
assertEquals("changeDataClass1 parameter type", "int", param.getWorkingType());
assertEquals("changeDataClass1 returned element name", "index", param.getXmlName());
param = (ValueCustom)params.get(1);
assertEquals("changeDataClass1 parameter type", "org.jibx.binding.generator.DataClass1", param.getWorkingType());
assertEquals("changeDataClass1 returned element name", "data", param.getXmlName());
ret = op.getReturn();
assertEquals("changeDataClass1 returned type", "org.jibx.binding.generator.DataClass1", ret.getWorkingType());
// getTypedList method and operation
op = (OperationCustom)opmap.get("getTypedList");
assertNotNull("getTypedList operation", op);
assertEquals("getTypedList request message", "getTypedListMessage", op.getRequestMessageName());
assertEquals("getTypedList request wrapper", "getTypedList", op.getRequestWrapperName());
assertEquals("getTypedList response message", "getTypedListResponseMessage", op.getResponseMessageName());
assertEquals("getTypedList response wrapper", "getTypedListResponse", op.getResponseWrapperName());
params = op.getParameters();
assertEquals("getTypedList parameters count", 0, params.size());
ret = op.getReturn();
assertEquals("getTypedList returned type", "java.util.List", ret.getWorkingType());
assertEquals("getTypedList returned item type", "org.jibx.binding.generator.DataClass1", ret.getItemType());
assertEquals("getTypedList returned item element name", "dataClass1", ret.getItemName());
// setTypedList method and operation
op = (OperationCustom)opmap.get("setTypedList");
assertNotNull("setTypedList operation", op);
assertEquals("setTypedList request message", "setTypedListMessage", op.getRequestMessageName());
assertEquals("setTypedList request wrapper", "setTypedList", op.getRequestWrapperName());
assertEquals("setTypedList response message", "setTypedListResponseMessage", op.getResponseMessageName());
assertEquals("setTypedList response wrapper", "setTypedListResponse", op.getResponseWrapperName());
params = op.getParameters();
assertEquals("setTypedList parameters count", 1, params.size());
param = (ValueCustom)params.get(0);
assertEquals("setTypedList parameter type", "java.util.List", param.getWorkingType());
assertEquals("setTypedList parameter item type", "org.jibx.binding.generator.DataClass1", param.getItemType());
assertEquals("setTypedList parameter element name", "list", param.getXmlName());
assertEquals("setTypedList parameter item element name", "dataClass1", param.getItemName());
ret = op.getReturn();
assertEquals("setTypedList returned type", "void", ret.getWorkingType());
// getList method and operation
op = (OperationCustom)opmap.get("getList");
assertNotNull("getList operation", op);
assertEquals("getList request message", "getListMessage", op.getRequestMessageName());
assertEquals("getList request wrapper", "getList", op.getRequestWrapperName());
assertEquals("getList response message", "getListResponseMessage", op.getResponseMessageName());
assertEquals("getList response wrapper", "getListResponse", op.getResponseWrapperName());
params = op.getParameters();
assertEquals("getList parameters count", 0, params.size());
ret = op.getReturn();
assertEquals("getList returned type", "java.util.List", ret.getWorkingType());
assertEquals("getList returned item type", "java.lang.Object", ret.getItemType());
assertEquals("getList returned item element name", "item", ret.getItemName());
// setList method and operation
op = (OperationCustom)opmap.get("setList");
assertNotNull("setList operation", op);
assertEquals("setList request message", "setListMessage", op.getRequestMessageName());
assertEquals("setList request wrapper", "setList", op.getRequestWrapperName());
assertEquals("setList response message", "setListResponseMessage", op.getResponseMessageName());
assertEquals("setList response wrapper", "setListResponse", op.getResponseWrapperName());
params = op.getParameters();
assertEquals("setList parameters count", 1, params.size());
param = (ValueCustom)params.get(0);
assertEquals("setList parameter type", "java.util.List", param.getWorkingType());
assertEquals("setList parameter item type", "java.lang.Object", param.getItemType());
assertEquals("setList parameter element name", "list", param.getXmlName());
assertEquals("setList parameter item element name", "item", param.getItemName());
ret = op.getReturn();
assertEquals("setList returned type", "void", ret.getWorkingType());
}