diff --git a/pom.xml b/pom.xml
index 96b2c77..08a77d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,6 +127,7 @@
1.6
+
javax.servlet
javax.servlet-api
diff --git a/src/test/java/com/nexacro/spring/resolve/NexacroDataResolveTest.java b/src/test/java/com/nexacro/spring/resolve/NexacroDataResolveTest.java
new file mode 100644
index 0000000..3216a57
--- /dev/null
+++ b/src/test/java/com/nexacro/spring/resolve/NexacroDataResolveTest.java
@@ -0,0 +1,307 @@
+package com.nexacro.spring.resolve;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import junit.framework.Assert;
+
+import org.apache.commons.io.IOUtils;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.MvcResult;
+import org.springframework.test.web.servlet.ResultHandler;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.View;
+
+import com.nexacro.spring.NexacroConstants;
+import com.nexacro.spring.servlet.NexacroInterceptor;
+import com.nexacro.spring.view.NexacroView;
+import com.nexacro.xapi.data.PlatformData;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(locations = { "classpath*:spring/context-servlet.xml" } )
+public class NexacroDataResolveTest {
+
+ /*
+new test method.
+
+MockMvcBuilders.standaloneMvcSetup(
+ new TestController()).build()
+ .perform(get("/form"))
+ .andExpect(status().isOk())
+ .andExpect(content().type("text/plain"))
+ .andExpect(content().string("hello world")
+);
+
+vs
+old test method.
+
+TestController controller = new TestController();
+MockHttpServletRequest req = new MockHttpRequest();
+MockHttpSerlvetResponse res = new MockHttpResponse();
+ModelAndView mav = controller.form(req, res);
+assertThat(res.getStatus(), is(200));
+assertThat(res.getContentType(), is(“text/plain”));
+assertThat(res.getContentAsString (), is(“content”));
+
+ */
+
+ @Autowired
+ private WebApplicationContext wac;
+
+ private MockMvc mockMvc;
+
+ @Before
+ public void init() {
+
+ mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
+
+ // 단일 Controller Test
+// mockMvc = MockMvcBuilders.standaloneSetup(new SampleController())
+// .setCustomArgumentResolvers(new NexacroMethodArgumentResolver()).build();
+ }
+
+ @Test
+ public void testDefaultProcessing() throws Exception {
+
+ MvcResult andReturn = mockMvc.perform(get("/default").content("")).andExpect(status().isOk()).andReturn();
+
+ HandlerInterceptor[] interceptors = andReturn.getInterceptors();
+ Assert.assertEquals("interceptor count does not match..", 1, interceptors.length);
+
+ if(!(interceptors[0] instanceof NexacroInterceptor)) {
+ Assert.fail(NexacroInterceptor.class+" not defined.");
+ }
+
+ ModelAndView modelAndView = andReturn.getModelAndView();
+ Object platformDataObj = modelAndView.getModelMap().get(NexacroConstants.ATTRIBUTE.NEXACRO_PLATFORM_DATA);
+ Assert.assertNotNull(NexacroConstants.ATTRIBUTE.NEXACRO_PLATFORM_DATA +" must be exist in model attribute.", platformDataObj);
+
+ if(!(platformDataObj instanceof PlatformData)) {
+ Assert.fail(NexacroConstants.ATTRIBUTE.NEXACRO_PLATFORM_DATA +" must be PlatformData instance.");
+ }
+
+ View view = modelAndView.getView();
+ if(!(view instanceof NexacroView)) {
+ Assert.fail("result rendering should be "+NexacroView.class);
+ }
+
+ }
+
+ // 데이터셋의 컬럼의 order는 처리하지 않는다.
+ @Test
+ public void testResolveDataSetToBean() throws Exception {
+
+ // dataset row type....
+ String requestFileName = "src/test/java/com/nexacro/spring/resolve/httpRequest.xml";
+ InputStream requestInputStream = new FileInputStream(new File(requestFileName));
+ byte[] byteArray = IOUtils.toByteArray(requestInputStream);
+
+ MvcResult andReturn = mockMvc.perform(get("/DataSetToBean").content(byteArray).contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andReturn();
+
+ MockHttpServletResponse servletResponse = andReturn.getResponse();
+ String actualResult = servletResponse.getContentAsString();
+
+ String responseFileName = "src/test/java/com/nexacro/spring/resolve/httpResponse.xml";
+ InputStream responseInputStream = new FileInputStream(new File(responseFileName));
+ String expectedResult = IOUtils.toString(responseInputStream);
+
+ Assert.assertEquals("result data has not resolved.", expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void testResolveDataSetToMap() throws Exception {
+
+ String requestFileName = "src/test/java/com/nexacro/spring/resolve/httpRequest.xml";
+ InputStream requestInputStream = new FileInputStream(new File(requestFileName));
+ byte[] byteArray = IOUtils.toByteArray(requestInputStream);
+
+ MvcResult andReturn = mockMvc.perform(get("/DataSetToMap").content(byteArray).contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andReturn();
+
+ MockHttpServletResponse servletResponse = andReturn.getResponse();
+ String actualResult = servletResponse.getContentAsString();
+
+ String responseFileName = "src/test/java/com/nexacro/spring/resolve/httpResponseMap.xml";
+ InputStream responseInputStream = new FileInputStream(new File(responseFileName));
+ String expectedResult = IOUtils.toString(responseInputStream);
+
+ Assert.assertEquals("result data has not resolved.", expectedResult, actualResult);
+
+// DataDeserializer deserializer = DataSerializerFactory.getDeserializer(PlatformType.CONTENT_TYPE_XML);
+// PlatformData readData = deserializer.readData(new FileReader(new File(responseFileName)), null, PlatformType.DEFAULT_CHAR_SET);
+// DataSet expectedDataSet = readData.getDataSet("dsResult");
+//
+// // Map 변환 시 column의 order를 처리하지 않기 때문에 데이터셋으로 비교한다.
+// readData = deserializer.readData(new StringReader(actualResult), null, PlatformType.DEFAULT_CHAR_SET);
+// DataSet actualDataSet = readData.getDataSet("dsResult");
+//
+// Assert.assertTrue("Result 'DataSet' structure not same.", expectedDataSet.equalsStructure(actualDataSet));
+// Assert.assertTrue("Result 'DataSet' data should be same.", expectedDataSet.equalsData(actualDataSet));
+
+ }
+
+ @Test
+ public void testResolveVariable() throws Exception {
+
+ String requestFileName = "src/test/java/com/nexacro/spring/resolve/httpRequest.xml";
+ InputStream requestInputStream = new FileInputStream(new File(requestFileName));
+ byte[] byteArray = IOUtils.toByteArray(requestInputStream);
+
+ MvcResult andReturn = mockMvc.perform(get("/Variable").content(byteArray).contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andReturn();
+
+ MockHttpServletResponse servletResponse = andReturn.getResponse();
+ String actualResult = servletResponse.getContentAsString();
+
+ String responseFileName = "src/test/java/com/nexacro/spring/resolve/httpResponseVariable.xml";
+ InputStream responseInputStream = new FileInputStream(new File(responseFileName));
+ String expectedResult = IOUtils.toString(responseInputStream);
+
+ Assert.assertEquals("result data has not resolved.", expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void testSupportedParameter() throws Exception {
+
+ mockMvc.perform(get("/SupportedParameter").content("").contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"));
+
+ }
+
+ @Test
+ public void testNotEnterRequiredDataSet() throws Exception {
+
+ mockMvc.perform(get("/NotEnterRequiredDataSet").content("").contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andDo(new ResultHandler() {
+ @Override
+ public void handle(MvcResult result) throws Exception {
+ Exception resolvedException = result.getResolvedException();
+ if(resolvedException == null) {
+ Assert.fail("if you do not enter the mandatory parameters should result in an exception.");
+ }
+ if(!(resolvedException instanceof MissingNexacroParameterException)) {
+ Assert.fail("if you do not enter a mandatory parameter 'MissingNexacroParameterException' exceptions should be occured.");
+ }
+ }
+ });
+
+ }
+
+ @Test
+ public void testNotEnterRequiredVariable() throws Exception {
+
+ mockMvc.perform(get("/NotEnterRequiredVariable").content("").contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andDo(new ResultHandler() {
+ @Override
+ public void handle(MvcResult result) throws Exception {
+ Exception resolvedException = result.getResolvedException();
+ if(resolvedException == null) {
+ Assert.fail("if you do not enter the mandatory parameters should result in an exception.");
+ }
+ if(!(resolvedException instanceof MissingNexacroParameterException)) {
+ Assert.fail("if you do not enter a mandatory parameter 'MissingNexacroParameterException' exceptions should be occured.");
+ }
+ }
+ });
+
+ }
+
+ @Test
+ public void testOptionalDataSet() throws Exception {
+
+ mockMvc.perform(get("/OptionalDataSet").content("").contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andDo(new ResultHandler() {
+ @Override
+ public void handle(MvcResult result) throws Exception {
+ Exception resolvedException = result.getResolvedException();
+ if(resolvedException != null) {
+ Assert.fail("parameter is not mandatory");
+ }
+ }
+ });
+
+ }
+
+ @Test
+ public void testOptionalVariable() throws Exception {
+
+ mockMvc.perform(get("/OptionalVariable").content("").contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("text/xml;charset=UTF-8"))
+ .andDo(new ResultHandler() {
+ @Override
+ public void handle(MvcResult result) throws Exception {
+ Exception resolvedException = result.getResolvedException();
+ if(resolvedException != null) {
+ Assert.fail("parameter is not mandatory");
+ }
+ }
+ });
+
+ }
+
+ @Test
+ public void testUnsupportedVoidMethod() throws Exception {
+
+ // void 메서드의 경우 NexacroView에서 처리 하지 않는다.
+
+ mockMvc.perform(get("/Void").content("").contentType(MediaType.TEXT_XML))
+ .andExpect(status().isOk()).andDo(new ResultHandler() {
+ @Override
+ public void handle(MvcResult result) throws Exception {
+ // nothing
+ }
+ })
+ .andExpect(content().string(new BaseMatcher() {
+ @Override
+ public boolean matches(Object response) {
+ String responseString = (String) response;
+ if(responseString.equals("")) {
+ return true;
+ }
+ return false;
+ }
+ @Override
+ public void describeTo(Description desc) {
+ desc.appendText("must be empty response. NexacroView should not be processed.");
+ }
+ }));
+ }
+
+}
diff --git a/src/test/java/com/nexacro/spring/resolve/NexacroExceptionResolveTest.java b/src/test/java/com/nexacro/spring/resolve/NexacroExceptionResolveTest.java
new file mode 100644
index 0000000..289b7d7
--- /dev/null
+++ b/src/test/java/com/nexacro/spring/resolve/NexacroExceptionResolveTest.java
@@ -0,0 +1,165 @@
+package com.nexacro.spring.resolve;
+
+import java.io.StringReader;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.MvcResult;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.context.WebApplicationContext;
+
+import com.nexacro.spring.NexacroConstants;
+import com.nexacro.spring.NexacroException;
+import com.nexacro.spring.data.NexacroResult;
+import com.nexacro.xapi.data.PlatformData;
+import com.nexacro.xapi.data.Variable;
+import com.nexacro.xapi.tx.DataDeserializer;
+import com.nexacro.xapi.tx.DataSerializerFactory;
+import com.nexacro.xapi.tx.PlatformException;
+import com.nexacro.xapi.tx.PlatformType;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(locations = { "classpath*:spring/context-servlet.xml" } )
+public class NexacroExceptionResolveTest {
+
+ @Autowired
+ private WebApplicationContext wac;
+
+ private MockMvc mockMvc;
+
+ @Before
+ public void init() {
+ mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
+ }
+
+ @Test
+ public void testNexacroException() throws Exception {
+
+ MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get("/NexacroException").content(""))
+ // 200 ok
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andReturn();
+
+ // resolved exception..
+ Exception resolvedException = result.getResolvedException();
+ Assert.assertNotNull("Exception should be resolved.", resolvedException);
+
+ // check response
+ String responseString = result.getResponse().getContentAsString();
+
+ PlatformData readData = readData(responseString);
+
+ // check errorcode
+ Variable errorCodeVariable = readData.getVariable(NexacroConstants.ERROR.ERROR_CODE);
+ Assert.assertNotNull("ErrorCode must be not null. an exception occurs should be the exception information(nexacro ErrorCode, ErrorMsg) is returned", errorCodeVariable);
+ // defined ErrorCode
+ int expectedErrorCode = -88853;
+ int actualErrorCode = errorCodeVariable.getInt();
+ Assert.assertEquals("Variable 'ErrorCode' must be '-88853'.", expectedErrorCode, actualErrorCode);
+
+ // check errormsg
+ Variable errorMsgVariable = readData.getVariable(NexacroConstants.ERROR.ERROR_MSG);
+ Assert.assertNotNull("ErrorMsg must be not null. an exception occurs should be the exception information(nexacro ErrorCode, ErrorMsg) is returned", errorMsgVariable);
+ String expectedErrorMsg = "errorMsg=user message, stackMessage=nexacro exception";
+ String actualErrorMsg = errorMsgVariable.getString();
+ Assert.assertEquals("Variable 'ErrorMsg' must be transfered defined message.", expectedErrorMsg, actualErrorMsg);
+
+ }
+
+ @Test
+ public void testAnotherException() throws Exception {
+
+ MvcResult result = mockMvc.perform(MockMvcRequestBuilders.get("/AnotherException").content(""))
+ // 200 ok
+ .andExpect(MockMvcResultMatchers.status().isOk())
+ .andReturn();
+
+ // resolved exception..
+ Exception resolvedException = result.getResolvedException();
+ Assert.assertNotNull("Exception should be resolved.", resolvedException);
+
+ // check response
+ String responseString = result.getResponse().getContentAsString();
+
+ PlatformData readData = readData(responseString);
+
+ // check errorcode
+ Variable errorCodeVariable = readData.getVariable(NexacroConstants.ERROR.ERROR_CODE);
+ Assert.assertNotNull("ErrorCode must be not null. an exception occurs should be the exception information(nexacro ErrorCode, ErrorMsg) is returned", errorCodeVariable);
+ // default errorCode
+ int expectedErrorCode = -1;
+ int actualErrorCode = errorCodeVariable.getInt();
+ Assert.assertEquals("Variable 'ErrorCode' must be '-1'.", expectedErrorCode, actualErrorCode);
+
+ // check errormsg
+ Variable errorMsgVariable = readData.getVariable(NexacroConstants.ERROR.ERROR_MSG);
+ Assert.assertNotNull("ErrorMsg must be not null. an exception occurs should be the exception information(nexacro ErrorCode, ErrorMsg) is returned", errorMsgVariable);
+ String expectedErrorMsg = "another exception";
+ String actualErrorMsg = errorMsgVariable.getString();
+ Assert.assertEquals("Variable 'ErrorMsg' must be transfered defined message.", expectedErrorMsg, actualErrorMsg);
+
+ }
+
+ @Test
+ public void testSendUserExceptionMessage() {
+
+ }
+
+ @Test
+ public void testSendStackMessage() {
+ // ExceptionResolver의 설정값을 변경해서 Test. 별도 Config를 설정하자.
+ }
+
+ private PlatformData readData(String responseString) {
+ PlatformData readData = null;
+ DataDeserializer deserializer = DataSerializerFactory.getDeserializer(PlatformType.CONTENT_TYPE_XML);
+ try {
+ readData = deserializer.readData(new StringReader(responseString), null, PlatformType.DEFAULT_CHAR_SET);
+ } catch (PlatformException e) {
+ Assert.fail("response string deserialize failed. e=" + e.getMessage());
+ }
+
+ return readData;
+ }
+
+
+ @Controller
+ public static class ExceptionController {
+
+ @RequestMapping("/NexacroException")
+ public NexacroResult throwNexacroException() throws NexacroException {
+
+ boolean occuredException = true;
+ if(occuredException) {
+ throw new NexacroException("nexacro exception", -88853, "user message");
+ }
+
+ return new NexacroResult();
+ }
+
+ @RequestMapping("/AnotherException")
+ public NexacroResult throwAnotherException() throws Exception {
+
+ boolean occuredException = true;
+ if(occuredException) {
+ throw new IllegalAccessException("another exception");
+ }
+
+ return new NexacroResult();
+ }
+
+ }
+
+}
diff --git a/src/test/java/com/nexacro/spring/resolve/NexacroHandlerMethodReturnValueHandlerTest.java b/src/test/java/com/nexacro/spring/resolve/NexacroHandlerMethodReturnValueHandlerTest.java
new file mode 100644
index 0000000..fde1e9f
--- /dev/null
+++ b/src/test/java/com/nexacro/spring/resolve/NexacroHandlerMethodReturnValueHandlerTest.java
@@ -0,0 +1,59 @@
+package com.nexacro.spring.resolve;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.stereotype.Controller;
+import org.springframework.test.web.servlet.MvcResult;
+import org.springframework.test.web.servlet.ResultHandler;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.view.JstlView;
+import org.springframework.web.servlet.view.UrlBasedViewResolver;
+
+import com.nexacro.spring.NexacroConstants;
+import com.nexacro.spring.data.NexacroResult;
+import com.nexacro.spring.view.NexacroView;
+
+public class NexacroHandlerMethodReturnValueHandlerTest {
+
+ @Test
+ public void testNexacroResult() throws Exception {
+
+ UrlBasedViewResolver viewResolver = new UrlBasedViewResolver();
+ viewResolver.setViewClass(JstlView.class);
+
+ NexacroView view = new NexacroView();
+
+ NexacroHandlerMethodReturnValueHandler returnValueHandler = new NexacroHandlerMethodReturnValueHandler();
+ returnValueHandler.setView(view);
+
+ standaloneSetup(new PersonController()).setViewResolvers(viewResolver).setCustomReturnValueHandlers(returnValueHandler).build()
+ .perform(get("/resolveView").content(""))
+ .andExpect(status().isOk())
+ .andExpect(model().size(1)) // platformData
+ .andExpect(model().attributeExists(NexacroConstants.ATTRIBUTE.NEXACRO_PLATFORM_DATA))
+ .andDo(new ResultHandler() {
+ @Override
+ public void handle(MvcResult result) throws Exception {
+ if(!(result.getModelAndView().getView() instanceof NexacroView)) {
+ Assert.fail("Redering View expected<"+NexacroView.class+">. but was<"+ result.getModelAndView().getView()+">");
+ }
+ }
+ });
+ }
+
+ @Controller
+ private static class PersonController {
+
+ @RequestMapping(value="/resolveView", method=RequestMethod.GET)
+ public NexacroResult resolveView() {
+ NexacroResult view = new NexacroResult();
+ return view;
+ }
+ }
+}
diff --git a/src/test/java/com/nexacro/spring/resolve/TestController.java b/src/test/java/com/nexacro/spring/resolve/TestController.java
new file mode 100644
index 0000000..3237a1b
--- /dev/null
+++ b/src/test/java/com/nexacro/spring/resolve/TestController.java
@@ -0,0 +1,173 @@
+package com.nexacro.spring.resolve;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Required;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import com.nexacro.spring.NexacroException;
+import com.nexacro.spring.annotation.ParamDataSet;
+import com.nexacro.spring.annotation.ParamVariable;
+import com.nexacro.spring.data.NexacroFileResult;
+import com.nexacro.spring.data.NexacroFirstRowHandler;
+import com.nexacro.spring.data.NexacroResult;
+import com.nexacro.spring.data.support.bean.DefaultBean;
+import com.nexacro.xapi.data.DataSet;
+import com.nexacro.xapi.data.DataSetList;
+import com.nexacro.xapi.data.PlatformData;
+import com.nexacro.xapi.data.VariableList;
+import com.nexacro.xapi.tx.HttpPlatformRequest;
+import com.nexacro.xapi.tx.HttpPlatformResponse;
+
+@Controller
+public class TestController {
+
+ @RequestMapping(value="/default", method={RequestMethod.GET})
+ public NexacroResult methodDefaultProcessing() throws NexacroException {
+ return new NexacroResult();
+ }
+
+ @RequestMapping(value="/DataSetToBean", method={RequestMethod.GET})
+ public NexacroResult methodDataSetToBean(@ParamDataSet(name="ds") List dsList
+ , @ParamDataSet(name="ds") DataSet ds) throws NexacroException {
+ if(dsList == null || ds == null) {
+ throw new NexacroException("DataSet 'ds' have not been resolved");
+ }
+
+ if(dsList.size() != 2 || ds.getRowCount() != 2) {
+ throw new NexacroException("DataSet 'ds' data have not been resolved. expectedRowCount="+2+", actual="+ds.getRowCount());
+ }
+
+ NexacroResult result = new NexacroResult();
+ result.addDataSet("dsResult", dsList);
+
+ return result;
+ }
+
+ @RequestMapping(value="/DataSetToMap", method={RequestMethod.GET})
+ public NexacroResult methodDataSetToMap(@ParamDataSet(name="ds") List