Modified: incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java?rev=225365&r1=225364&r2=225365&view=diff ============================================================================== --- incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java (original) +++ incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java Tue Jul 26 11:02:03 2005 @@ -168,11 +168,12 @@ // void function and later set OUT parameters if needed. returnType = Void.TYPE; returnXMLType = null; - if(paraMeta.length > 1) { - outParamMap = new HashMap<String, BeehiveWsParameterMetadata>(paraMeta.length); - for(BeehiveWsParameterMetadata cpm : paraMeta) { - outParamMap.put(cpm.getWpName(), cpm); - } + } + + if(paraMeta.length > 0) { + outParamMap = new HashMap<String, BeehiveWsParameterMetadata>(paraMeta.length); + for(BeehiveWsParameterMetadata cpm : paraMeta) { + outParamMap.put(cpm.getWpName(), cpm); } } @@ -210,6 +211,11 @@ outParamMap.remove(wpm.getWpName()); // important...if this param is in.out it was in the out list also, so removeit. wpm.setWpMode(WebParam.Mode.INOUT); + // if only one param and it is INOUT adjust the method description accordingly + if (params.length == 1) { + wmm.setReturnType(Void.TYPE); + wmm.setXmlReturnType(null); + } } else { wpm.setWpMode(WebParam.Mode.IN); @@ -228,6 +234,11 @@ outParamMap.remove(wpm.getWpName()); // important...if this param is in.out it was in the out list also, so remove it. wpm.setWpMode(WebParam.Mode.INOUT); + // if only one param and it is INOUT adjust the method description accordingly + if (params.length == 1) { + wmm.setReturnType(Void.TYPE); + wmm.setXmlReturnType(null); + } } else { wpm.setWpMode(WebParam.Mode.IN);
Modified: incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/Utilities.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/Utilities.java?rev=225365&r1=225364&r2=225365&view=diff ============================================================================== --- incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/Utilities.java (original) +++ incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/Utilities.java Tue Jul 26 11:02:03 2005 @@ -72,6 +72,10 @@ public static <T extends XmlObject> T[] selectChildren(XmlObject parent, Class<T> childClass) throws IllegalAccessException, NoSuchFieldException { + if (parent == null) { + return (T[]) Array.newInstance(childClass, 0); + } + // retrieve the SchemaType from the static type field SchemaType st = (SchemaType) childClass.getField("type").get(null); XmlObject[] kids = parent.selectChildren(st.getDocumentElementName()); Modified: incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/WSDLParser.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/WSDLParser.java?rev=225365&r1=225364&r2=225365&view=diff ============================================================================== --- incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/WSDLParser.java (original) +++ incubator/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/wsdl/WSDLParser.java Tue Jul 26 11:02:03 2005 @@ -35,7 +35,10 @@ public WSDLParser(DefinitionsDocument defDoc) throws IllegalAccessException, NoSuchFieldException { this.defDoc = defDoc; - tt = defDoc.getDefinitions().getTypesArray(0); + TTypes[] typesArray = defDoc.getDefinitions().getTypesArray(); + if (typesArray != null && typesArray.length > 0) { + tt = typesArray[0]; + } schema = new Schema(tt); services = defDoc.getDefinitions().getServiceArray(); }