You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by am...@apache.org on 2007/08/15 07:48:34 UTC
svn commit: r566030 - in /webservices/axis2/trunk/java/modules/rmi:
src/org/apache/axis2/rmi/ src/org/apache/axis2/rmi/databind/
src/org/apache/axis2/rmi/metadata/ src/org/apache/axis2/rmi/types/
src/org/apache/axis2/rmi/util/ test/org/apache/axis2/rmi...
Author: amilas
Date: Tue Aug 14 22:48:33 2007
New Revision: 566030
URL: http://svn.apache.org/viewvc?view=rev&rev=566030
Log:
Add the Map support to Axis2 rmi
Added:
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/types/
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/types/MapType.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/MapTest.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass12.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/MapServiceTest.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/MapService.java
Modified:
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/Configurator.java
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/JavaObjectSerializer.java
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/XmlStreamParser.java
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Attribute.java
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Parameter.java
webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/util/Constants.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/client/RMIClientService1Test.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1.java
webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1Interface.java
Modified: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/Configurator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/Configurator.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/Configurator.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/Configurator.java Tue Aug 14 22:48:33 2007
@@ -15,6 +15,8 @@
*/
package org.apache.axis2.rmi;
+import org.apache.axis2.rmi.util.Constants;
+
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -33,6 +35,12 @@
public Configurator() {
this.extensionClasses = new ArrayList();
this.packageToNamespaceMap = new HashMap();
+ populateDefualtValues();
+ }
+
+ private void populateDefualtValues(){
+ // we want to keep key and value attributes in null names pace.
+ this.packageToNamespaceMap.put("org.apache.axis2.rmi.types", Constants.RMI_TYPE_NAMSPACE);
}
public String getNamespace(String packageName){
Modified: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/JavaObjectSerializer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/JavaObjectSerializer.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/JavaObjectSerializer.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/JavaObjectSerializer.java Tue Aug 14 22:48:33 2007
@@ -26,6 +26,7 @@
import org.apache.axis2.rmi.exception.MetaDataPopulateException;
import org.apache.axis2.rmi.exception.SchemaGenerationException;
import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.types.MapType;
import org.apache.axis2.databinding.utils.ConverterUtil;
import javax.xml.stream.XMLStreamWriter;
@@ -174,21 +175,40 @@
namespacePrefix);
} else {
- // if this is a List we convert this to an Object array
- if ((classType & Constants.COLLECTION_TYPE) == Constants.COLLECTION_TYPE) {
- elementValue = ((Collection) elementValue).toArray();
- }
- // TODO: handle maps properly
- int length = Array.getLength(elementValue);
- Object object;
- for (int i = 0; i < length; i++) {
- object = Array.get(elementValue, i);
- serialize(object,
- elementQName,
- elementType,
- writer,
- namespacePrefix);
+ if ((classType & Constants.MAP_TYPE) == Constants.MAP_TYPE) {
+ Map elementMap = (Map) elementValue;
+ Object key = null;
+ for (Iterator iter = elementMap.keySet().iterator(); iter.hasNext();) {
+ key = iter.next();
+ serialize(new MapType(key, elementMap.get(key)),
+ elementQName,
+ elementType,
+ writer,
+ namespacePrefix);
+ }
+ } else if ((classType & Constants.COLLECTION_TYPE) == Constants.COLLECTION_TYPE) {
+ // if this is a List we convert this to an Object array
+ Collection elementCollection = (Collection) elementValue;
+ for (Iterator iter = elementCollection.iterator(); iter.hasNext();) {
+ serialize(iter.next(),
+ elementQName,
+ elementType,
+ writer,
+ namespacePrefix);
+ }
+ } else {
+ int length = Array.getLength(elementValue);
+ Object object;
+ for (int i = 0; i < length; i++) {
+ object = Array.get(elementValue, i);
+ serialize(object,
+ elementQName,
+ elementType,
+ writer,
+ namespacePrefix);
+ }
}
+
}
}
Modified: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/XmlStreamParser.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/XmlStreamParser.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/XmlStreamParser.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/databind/XmlStreamParser.java Tue Aug 14 22:48:33 2007
@@ -25,6 +25,7 @@
import org.apache.axis2.rmi.util.Constants;
import org.apache.axis2.rmi.util.JavaTypeToQNameMap;
import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.types.MapType;
import org.apache.axis2.databinding.utils.ConverterUtil;
import javax.xml.stream.XMLStreamReader;
@@ -418,7 +419,6 @@
// they can not have null values so if array then we have to return the
// array object is null
// for other also it is covenient to assume like that.
- // TODO: dissable nillable true for primitives
if ((Constants.OTHER_TYPE & classType) == Constants.OTHER_TYPE){
// i.e this is not a collection type
List objectsList = (List) objectsCollection;
@@ -442,8 +442,35 @@
}
} else if ((Constants.MAP_TYPE & classType) == Constants.MAP_TYPE){
- // TODO : handle maps
- return null;
+
+ if ((objectsCollection.size() == 0) ||
+ ((objectsCollection.size() == 1) && (objectsCollection.iterator().next() == null))) {
+ return null;
+
+ } else {
+ List mapObjectsList = (List) objectsCollection;
+ MapType mapType = null;
+ Map mapObject = null;
+ if (javaClass.isInterface()) {
+ mapObject = new HashMap();
+ } else {
+ try {
+ mapObject = (Map) javaClass.newInstance();
+ } catch (InstantiationException e) {
+ throw new XmlParsingException("Can not instantiate the java class " + javaClass.getName(), e);
+ } catch (IllegalAccessException e) {
+ throw new XmlParsingException("Can not instantiate the java class " + javaClass.getName(), e);
+ }
+
+ }
+ for (Iterator iter = mapObjectsList.iterator(); iter.hasNext();) {
+ mapType = (MapType) iter.next();
+ mapObject.put(mapType.getKey(), mapType.getValue());
+ }
+
+ return mapObject;
+ }
+
} else {
throw new XmlParsingException("Unknow class type " + classType);
}
@@ -508,13 +535,13 @@
} else if ((Constants.COLLECTION_TYPE & classType) == Constants.COLLECTION_TYPE) {
objectsCollection = new ArrayList();
} else if ((Constants.MAP_TYPE & classType) == Constants.MAP_TYPE) {
- // TODO : handle maps
+ objectsCollection = new ArrayList();
}
} else {
if ((Constants.COLLECTION_TYPE & classType) == Constants.COLLECTION_TYPE) {
objectsCollection = (Collection) javaClass.newInstance();
} else if ((Constants.MAP_TYPE & classType) == Constants.MAP_TYPE) {
- // TODO: handle maps
+ objectsCollection = new ArrayList();
}
}
}
Modified: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Attribute.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Attribute.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Attribute.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Attribute.java Tue Aug 14 22:48:33 2007
@@ -16,6 +16,7 @@
package org.apache.axis2.rmi.metadata;
import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.types.MapType;
import org.apache.axis2.rmi.util.Util;
import org.apache.axis2.rmi.util.Constants;
import org.apache.axis2.rmi.metadata.xml.XmlElement;
@@ -97,7 +98,13 @@
public Attribute(PropertyDescriptor propertyDescriptor,
String namespace) {
this.propertyDescriptor = propertyDescriptor;
- this.namespace = namespace;
+ if (Constants.RMI_TYPE_NAMSPACE.equals(namespace)){
+ // for rmi defined type elements we keep attributes as unqualified
+ this.namespace = null;
+ } else {
+ this.namespace = namespace;
+ }
+
}
public void populateMetaData(Configurator configurator,
@@ -106,7 +113,7 @@
this.name = this.propertyDescriptor.getName();
this.getterMethod = this.propertyDescriptor.getReadMethod();
this.setterMethod = this.propertyDescriptor.getWriteMethod();
- Class baseClass;
+ Class baseClass = null;
try {
this.classType = Util.getClassType(this.propertyDescriptor.getPropertyType());
@@ -114,7 +121,10 @@
// i.e. if this is collection type
this.isArray = true;
baseClass = Object.class;
- // TODO : handle maps
+ } else if ((this.classType & Constants.MAP_TYPE) == Constants.MAP_TYPE){
+ // if the attribute is mep type we set a custom type for it.
+ this.isArray = true;
+ baseClass = MapType.class;
} else {
this.isArray = this.propertyDescriptor.getPropertyType().isArray();
if (this.isArray) {
Modified: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Parameter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Parameter.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Parameter.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/metadata/Parameter.java Tue Aug 14 22:48:33 2007
@@ -16,6 +16,7 @@
package org.apache.axis2.rmi.metadata;
import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.types.MapType;
import org.apache.axis2.rmi.util.Util;
import org.apache.axis2.rmi.util.Constants;
import org.apache.axis2.rmi.metadata.xml.XmlElement;
@@ -99,7 +100,10 @@
// i.e this is a collection class
this.isArray = true;
baseClass = Object.class;
- //TODO: handle map type
+ } else if ((this.classType & Constants.MAP_TYPE) == Constants.MAP_TYPE) {
+ // if the attribute is mep type we set a custom type for it.
+ this.isArray = true;
+ baseClass = MapType.class;
} else {
// populate the type for this parameter
this.isArray = this.javaClass.isArray();
Added: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/types/MapType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/types/MapType.java?view=auto&rev=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/types/MapType.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/types/MapType.java Tue Aug 14 22:48:33 2007
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.rmi.types;
+
+/**
+ * this class is uesd to represent a map type attribute
+ */
+public class MapType {
+
+ public Object key;
+ public Object value;
+
+ public MapType() {
+ }
+
+ public MapType(Object key, Object value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public Object getKey() {
+ return key;
+ }
+
+ public void setKey(Object key) {
+ this.key = key;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+}
Modified: webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/util/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/util/Constants.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/util/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/util/Constants.java Tue Aug 14 22:48:33 2007
@@ -40,4 +40,7 @@
public static final int MAP_TYPE = 0x0008;
public static final int OTHER_TYPE = 0x0010;
+ //rmi namespaces
+ public static final String RMI_TYPE_NAMSPACE = "http://ws.apache.org/rmi/types";
+
}
Modified: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/client/RMIClientService1Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/client/RMIClientService1Test.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/client/RMIClientService1Test.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/client/RMIClientService1Test.java Tue Aug 14 22:48:33 2007
@@ -21,6 +21,8 @@
import java.util.List;
import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
import junit.framework.TestCase;
@@ -64,5 +66,22 @@
axisFault.printStackTrace();
}
+ }
+
+ public void testMethod5() {
+ try {
+ Service1Interface proxy = (Service1Interface) RMIClientProxy.createProxy(Service1Interface.class,
+ "http://localhost:8085/axis2/services/Service1");
+ Map param1 = new HashMap();
+ param1.put("key1", "value1");
+ param1.put("key2", "value2");
+ Map result = proxy.method5(param1);
+ assertTrue(result.containsKey("key1"));
+ assertTrue(result.containsKey("key2"));
+ assertEquals(result.get("key1"), "value1");
+ assertEquals(result.get("key2"), "value2");
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
}
}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/MapTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/MapTest.java?view=auto&rev=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/MapTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/MapTest.java Tue Aug 14 22:48:33 2007
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.rmi.databind;
+
+import org.apache.axis2.rmi.databind.dto.TestClass12;
+import org.apache.axis2.rmi.metadata.Parameter;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Hashtable;
+
+
+public class MapTest extends DataBindTest {
+
+ public void testTestClass121(){
+
+ Class testClass = TestClass12.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass12 testObject = new TestClass12();
+ Map param1 = new HashMap();
+ param1.put("key1","value1");
+ param1.put("key2","value2");
+ testObject.setParam1(param1);
+ TestClass12 result = (TestClass12) getReturnObject(parameter, testObject);
+ assertTrue(result.getParam1().containsKey("key1"));
+ assertTrue(result.getParam1().containsKey("key2"));
+ assertEquals(result.getParam1().get("key1"),"value1");
+ assertEquals(result.getParam1().get("key2"),"value2");
+ }
+
+ public void testTestClass122(){
+
+ Class testClass = TestClass12.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass12 testObject = new TestClass12();
+ Hashtable param2 = new Hashtable();
+ param2.put("key1","value1");
+ param2.put("key2","value2");
+ testObject.setParam2(param2);
+ TestClass12 result = (TestClass12) getReturnObject(parameter, testObject);
+ assertTrue(result.getParam2().containsKey("key1"));
+ assertTrue(result.getParam2().containsKey("key2"));
+ assertEquals(result.getParam2().get("key1"),"value1");
+ assertEquals(result.getParam2().get("key2"),"value2");
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass12.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass12.java?view=auto&rev=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass12.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass12.java Tue Aug 14 22:48:33 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.rmi.databind.dto;
+
+import java.util.Map;
+import java.util.Hashtable;
+
+
+public class TestClass12 {
+
+ private Map param1;
+ private Hashtable param2;
+
+ public Map getParam1() {
+ return param1;
+ }
+
+ public void setParam1(Map param1) {
+ this.param1 = param1;
+ }
+
+ public Hashtable getParam2() {
+ return param2;
+ }
+
+ public void setParam2(Hashtable param2) {
+ this.param2 = param2;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/MapServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/MapServiceTest.java?view=auto&rev=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/MapServiceTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/MapServiceTest.java Tue Aug 14 22:48:33 2007
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.rmi.metadata;
+
+import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.exception.MetaDataPopulateException;
+import org.apache.axis2.rmi.exception.SchemaGenerationException;
+import org.apache.axis2.rmi.metadata.service.FaultService;
+import org.apache.axis2.rmi.metadata.service.MapService;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLWriter;
+import java.io.IOException;
+import java.io.FileWriter;
+
+import junit.framework.TestCase;
+
+
+public class MapServiceTest extends TestCase {
+
+ public void testGenerateSchema() {
+ Configurator configurator = new Configurator();
+ Service service = new Service(MapService.class, configurator);
+ try {
+ service.populateMetaData();
+ service.generateWSDL();
+ Definition definition = service.getWsdlDefinition();
+
+ WSDL11ToAxisServiceBuilder bulder = new WSDL11ToAxisServiceBuilder(definition, null, null);
+ bulder.populateService();
+
+ } catch (MetaDataPopulateException e) {
+ fail();
+ } catch (SchemaGenerationException e) {
+ fail();
+ } catch (IOException e) {
+ fail();
+ }
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/MapService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/MapService.java?view=auto&rev=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/MapService.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/MapService.java Tue Aug 14 22:48:33 2007
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.rmi.metadata.service;
+
+import java.util.Map;
+
+
+public class MapService {
+
+ public void method1(Map param1){
+
+ }
+}
Modified: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1.java Tue Aug 14 22:48:33 2007
@@ -15,6 +15,8 @@
*/
package org.apache.axis2.rmi.server.services;
+import java.util.Map;
+
public class Service1 implements Service1Interface {
@@ -31,6 +33,10 @@
}
public int[] mehtod4(int[] param1) {
+ return param1;
+ }
+
+ public Map method5(Map param1) {
return param1;
}
Modified: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1Interface.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1Interface.java?view=diff&rev=566030&r1=566029&r2=566030
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1Interface.java (original)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/server/services/Service1Interface.java Tue Aug 14 22:48:33 2007
@@ -1,5 +1,7 @@
package org.apache.axis2.rmi.server.services;
+import java.util.Map;
+
public interface Service1Interface {
public String method1(String param1);
@@ -9,4 +11,6 @@
public int mehtod3(int param1);
public int[] mehtod4(int[] param1);
+
+ public Map method5(Map param1);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org