[wise-commits] wise SVN: r542 - in core/trunk/core/src: main/java/org/jboss/wise/core/client/impl/reflection and 1 other directories.

wise-commits at lists.jboss.org wise-commits at lists.jboss.org
Wed Mar 20 10:41:19 EDT 2013


Author: alessio.soldano at jboss.com
Date: 2013-03-20 10:41:18 -0400 (Wed, 20 Mar 2013)
New Revision: 542

Modified:
   core/trunk/core/src/main/java/org/jboss/wise/core/client/WSMethod.java
   core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodPreview.java
   core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/InvocationResultImpl.java
   core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSMethodImpl.java
   core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java
Log:
Minor refactoring to fix typo


Modified: core/trunk/core/src/main/java/org/jboss/wise/core/client/WSMethod.java
===================================================================
--- core/trunk/core/src/main/java/org/jboss/wise/core/client/WSMethod.java	2013-03-20 14:40:22 UTC (rev 541)
+++ core/trunk/core/src/main/java/org/jboss/wise/core/client/WSMethod.java	2013-03-20 14:41:18 UTC (rev 542)
@@ -39,6 +39,7 @@
 public interface WSMethod {
 
     public static final String RESULT = "result";
+    public static final String RESULTS = "results";
     public static final String TYPE_PREFIX = "type.";
 
     /**

Modified: core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodPreview.java
===================================================================
--- core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodPreview.java	2013-03-20 14:40:22 UTC (rev 541)
+++ core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodPreview.java	2013-03-20 14:41:18 UTC (rev 542)
@@ -29,7 +29,6 @@
 import java.util.Set;
 
 import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;

Modified: core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/InvocationResultImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/InvocationResultImpl.java	2013-03-20 14:40:22 UTC (rev 541)
+++ core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/InvocationResultImpl.java	2013-03-20 14:41:18 UTC (rev 542)
@@ -68,18 +68,14 @@
     /**
      * {@inheritDoc}
      * 
-     * @see org.jboss.wise.core.client.InvocationResult#getMapRequestAndResult(WiseMapper,
-     *      Map)
+     * @see org.jboss.wise.core.client.InvocationResult#getMapRequestAndResult(WiseMapper, Map)
      */
-    // TODO: demostrate with an integration test how it can be used for message
-    // enrichement in same class loader and
-    // integrating input and output in same object model
     public Map<String, Object> getMapRequestAndResult(WiseMapper mapper, Map<String, Object> inputMap) throws MappingException {
 
 	if (inputMap == null) {
 	    inputMap = new HashMap<String, Object>();
 	}
-	inputMap.put("results", originalObjects);
+	inputMap.put(WSMethod.RESULTS, originalObjects);
 	Map<String, Object> mappedResult = new HashMap<String, Object>();
 	if (mapper != null) {
 	    mappedResult.putAll(mapper.applyMapping(inputMap));

Modified: core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSMethodImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSMethodImpl.java	2013-03-20 14:40:22 UTC (rev 541)
+++ core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSMethodImpl.java	2013-03-20 14:41:18 UTC (rev 542)
@@ -68,7 +68,7 @@
 	this.initWebParams();
     }
 
-    /*
+    /**
      * Invokes this method with the provided arguments
      * 
      * @param args @return @throws WiseException If an unknown exception is
@@ -81,7 +81,7 @@
 
 	try {
 	    EndpointMethodCaller caller = new EndpointMethodCaller(this.getEndpoint(), this.getMethod(), this
-		    .getParmeterInRightPositionArray(args));
+		    .getParametersInRightPositionArray(args));
 	    Future<Object> invocation = ((WSEndpointImpl) this.getEndpoint()).getService().submit(caller);
 	    if (isOneWay()) {
 		invocation.get();
@@ -112,7 +112,7 @@
     public void writeRequestPreview(Map<String, Object> args, OutputStream os) throws InvocationException {
 	try {
 	    EndpointMethodPreview caller = new EndpointMethodPreview(this.getEndpoint(), this.getMethod(), this
-		    .getParmeterInRightPositionArray(args), os);
+		    .getParametersInRightPositionArray(args), os);
 	    ((WSEndpointImpl) this.getEndpoint()).getService().submit(caller).get();
 	} catch (Exception ite) {
 	    throw new InvocationException("Unknown exception received: " + ite.getMessage(), ite);
@@ -191,7 +191,7 @@
     /*
      * package protected method, for test purpose
      */
-    /* package */Object[] getParmeterInRightPositionArray(Map<String, Object> originalParams) {
+    /* package */Object[] getParametersInRightPositionArray(Map<String, Object> originalParams) {
 	Map<String, WebParameterImpl> webParams = this.getWebParams();
 	Object[] arrayToReturn = new Object[webParams.size()];
 	Arrays.fill(arrayToReturn, null);

Modified: core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java
===================================================================
--- core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java	2013-03-20 14:40:22 UTC (rev 541)
+++ core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java	2013-03-20 14:41:18 UTC (rev 542)
@@ -110,7 +110,7 @@
 	Map<String, Object> inputMap = new HashMap<String, Object>();
 	inputMap.put("annotation2", "foo");
 	inputMap.put("annotation1", Integer.valueOf(3));
-	Object[] array = wsMethod.getParmeterInRightPositionArray(inputMap);
+	Object[] array = wsMethod.getParametersInRightPositionArray(inputMap);
 
 	assertThat(array.length, is(3));
 	assertThat(array[0].equals(Integer.valueOf(3)), is(true));
@@ -130,7 +130,7 @@
 	inputMap.put("annotation2", "foo");
 	inputMap.put("annotation1", Integer.valueOf(3));
 	inputMap.put("unknown", Integer.valueOf(5));
-	Object[] array = wsMethod.getParmeterInRightPositionArray(inputMap);
+	Object[] array = wsMethod.getParametersInRightPositionArray(inputMap);
 
 	assertThat(array.length, is(3));
 	assertThat(array[0].equals(Integer.valueOf(3)), is(true));
@@ -154,7 +154,7 @@
 	inputMap.put("myAnnotation", Integer.valueOf(6));
 	inputMap.put("unknown2", Integer.valueOf(7));
 
-	Object[] array = wsMethod.getParmeterInRightPositionArray(inputMap);
+	Object[] array = wsMethod.getParametersInRightPositionArray(inputMap);
 
 	assertThat(array.length, is(3));
 	assertThat(array[0].equals(Integer.valueOf(3)), is(true));



More information about the wise-commits mailing list