You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/06/01 22:53:22 UTC

svn commit: r179419 [3/6] - in /incubator/beehive/trunk/wsm/src: api/javax/jws/ api/javax/jws/soap/ runtime/org/apache/beehive/wsm/axis/ runtime/org/apache/beehive/wsm/axis/ant/ runtime/org/apache/beehive/wsm/axis/databinding/ runtime/org/apache/beehive/wsm/axis/handlers/ runtime/org/apache/beehive/wsm/axis/registration/ runtime/org/apache/beehive/wsm/axis/security/ runtime/org/apache/beehive/wsm/axis/security/model/ runtime/org/apache/beehive/wsm/axis/tools/ runtime/org/apache/beehive/wsm/axis/util/ runtime/org/apache/beehive/wsm/axis/util/encoding/ runtime/org/apache/beehive/wsm/databinding/ runtime/org/apache/beehive/wsm/databinding/xmlbeans/ runtime/org/apache/beehive/wsm/model/ runtime/org/apache/beehive/wsm/model/java/ runtime/org/apache/beehive/wsm/model/jsr181/ runtime/org/apache/beehive/wsm/model/wsdl/ runtime/org/apache/beehive/wsm/processor/ runtime/org/apache/beehive/wsm/processor/apt/ runtime/org/apache/beehive/wsm/registration/ runtime/org/apache/beehive/wsm/util/ runtime/org/apache/beehive/wsm/wsdl/ runtime/schema/

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanDeserializerFactory.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanDeserializerFactory.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanDeserializerFactory.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanDeserializerFactory.java Wed Jun  1 13:53:19 2005
@@ -30,8 +30,8 @@
  *
  * @author Jonathan Colwell
  */
-public class XmlBeanDeserializerFactory extends BaseDeserializerFactory {
-
+public class XmlBeanDeserializerFactory
+    extends BaseDeserializerFactory {
     public XmlBeanDeserializerFactory(Class javaType, QName xmlType) {
         super(XmlBeanDeserializer.class, xmlType, javaType);
     }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java Wed Jun  1 13:53:19 2005
@@ -23,7 +23,6 @@
 import java.lang.reflect.Array;
 import java.util.HashSet;
 import java.util.Set;
-
 import javax.xml.namespace.QName;
 
 import org.apache.axis.AxisFault;
@@ -40,51 +39,48 @@
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.impl.xb.xsdschema.LocalElement;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 import org.xml.sax.Attributes;
 
 /**
  * ****************************************************************************
- * 
+ *
  * @author Jonathan Colwell
  */
-public class XmlBeanSerializer implements Serializer {
-
+public class XmlBeanSerializer
+    implements Serializer {
     /**
      * Serialize an element named name, with the indicated attributes and value.
-     * 
-     * @param name
-     *            is the element name
-     * @param attributes
-     *            are the attributes...serialize is free to add more.
-     * @param value
-     *            is the value
-     * @param context
-     *            is the SerializationContext
+     *
+     * @param name       is the element name
+     * @param attributes are the attributes...serialize is free to add more.
+     * @param value      is the value
+     * @param context    is the SerializationContext
      */
     public void serialize(QName name, Attributes attributes, Object value,
-            SerializationContext context) throws IOException {
-        if (!(value instanceof XmlObject)) {
+                          SerializationContext context)
+        throws IOException {
+        if(!(value instanceof XmlObject)) {
             throw new IOException(((value != null)
-                    ? value.getClass().getName()
-                    : "null")
-                    + " is not an " + XmlObject.class.getName());
-        } else {
+                ? value.getClass().getName()
+                : "null")
+                + " is not an " + XmlObject.class.getName());
+        }
+        else {
             context.setWriteXMLType(null);
             context.startElement(name, attributes);
 
-            XmlCursor xCur = ((XmlObject) value).newCursor();
-            if (xCur.toFirstContentToken() == XmlCursor.TokenType.START) {
+            XmlCursor xCur = ((XmlObject)value).newCursor();
+            if(xCur.toFirstContentToken() == XmlCursor.TokenType.START) {
                 do {
                     Node n = xCur.getDomNode();
-                    if (n.getNodeType() == Node.ELEMENT_NODE) {
-                        context.writeDOMElement((Element) n);
+                    if(n.getNodeType() == Node.ELEMENT_NODE) {
+                        context.writeDOMElement((Element)n);
                     }
-                } while (xCur.toNextSibling());
+                }
+                while(xCur.toNextSibling());
             }
             context.endElement();
         }
@@ -98,21 +94,20 @@
      * Return XML schema for the specified type, suitable for insertion into the
      * <types> element of a WSDL document, or underneath an
      * <element> or <attribute> declaration.
-     * 
-     * @param javaType
-     *            the Java Class we're writing out schema for
-     * @param types
-     *            the Java2WSDL Types object which holds the context for the
-     *            WSDL being generated.
+     *
+     * @param javaType the Java Class we're writing out schema for
+     * @param types    the Java2WSDL Types object which holds the context for the
+     *                 WSDL being generated.
      * @return a type element containing a schema simpleType/complexType
      * @see org.apache.axis.wsdl.fromJava.Types
      */
-    public Element writeSchema(Class javaType, Types types) throws Exception {
+    public Element writeSchema(Class javaType, Types types)
+        throws Exception {
         try {
-            if (!XmlObject.class.isAssignableFrom(javaType)) {
+            if(!XmlObject.class.isAssignableFrom(javaType)) {
                 throw new RuntimeException(
-                        "Invalid Object type is assigned to the XMLBeanSerialization Type: "
-                                + javaType.getCanonicalName());
+                    "Invalid Object type is assigned to the XMLBeanSerialization Type: "
+                        + javaType.getCanonicalName());
             }
 
             SchemaType docType = XmlBeans.typeForClass(javaType);
@@ -120,7 +115,8 @@
             // assume that the writeSchemaForDocType wrote the schema
             // for the type and all the dependent types.
             return null;
-        } catch (Exception e) {
+        }
+        catch(Exception e) {
             e.printStackTrace();
             throw e;
         }
@@ -133,37 +129,38 @@
      * @throws Exception
      */
     private void writeSchemaForDocType(SchemaType docType, Types types)
-            throws Exception {
+        throws Exception {
         Schema mySchema = Utilities.findtSchemaDocument(docType);
 
         QName q = docType.getName();
 
         XmlObject typeNodeInWSDL = mySchema.getTypeNode(q);
 
-        if (null == typeNodeInWSDL)
+        if(null == typeNodeInWSDL)
             throw new RuntimeException(
-                    "Type for object not found in the assigned WSDL file. "
-                            + docType.getName() + " schema in: "
-                            + docType.getSourceName());
+                "Type for object not found in the assigned WSDL file. "
+                    + docType.getName() + " schema in: "
+                    + docType.getSourceName());
         //        insertDependentTypes(typeNodeInWSDL, types);
         Node n = typeNodeInWSDL.getDomNode();
         Document doc = types.createElement(
-                "element_to_get_document_useless_otherwise").getOwnerDocument();
-        Element e = (Element) doc.importNode(n, true);
+            "element_to_get_document_useless_otherwise").getOwnerDocument();
+        Element e = (Element)doc.importNode(n, true);
         try {
             types.writeSchemaElementDecl(q, e);
-        } catch (AxisFault e1) {
+        }
+        catch(AxisFault e1) {
             // this means the types was already in... fine!
             // TBD: make sure there are other types of exceptions are at least
             // reported
         }
         Set<QName> dependentTypes = new HashSet<QName>();
         getAllDependentTypes(typeNodeInWSDL, dependentTypes);
-        for (QName nxtType : dependentTypes) {
+        for(QName nxtType : dependentTypes) {
             Class nxtJavaType = null;
             // add the class if it is an xml bean
-            if (null != (nxtJavaType = q2UserClass(nxtType))
-                    && XmlObject.class.isAssignableFrom(nxtJavaType)) {
+            if(null != (nxtJavaType = q2UserClass(nxtType))
+                && XmlObject.class.isAssignableFrom(nxtJavaType)) {
                 writeSchema(nxtJavaType, types);
             }
         }
@@ -173,18 +170,18 @@
     /**
      * @param nxtType
      * @return null for classes that are not found, or if they are primitive types
-     *     * 
+     *         *
      */
     private Class q2UserClass(QName qname) {
         SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
         SchemaType st = stl.findType(qname);
-        if (st == null) {
+        if(st == null) {
             SchemaField sf = stl.findElement(qname);
-            if (sf != null)
+            if(sf != null)
                 st = sf.getType();
         }
 
-        if (st != null && !st.isBuiltinType())
+        if(st != null && !st.isBuiltinType())
             return st.getJavaClass();
         else
             return null; // for classes that are not found, or are build in
@@ -194,29 +191,27 @@
     /**
      * @param nodeInWSDL
      * @param dependentTypes
-     * @return
-     * 
-     * Walk all the nodes under the nodeInWSDL if there is an 'element' type the
-     * add its types or references to the dependent type.
+     * @return Walk all the nodes under the nodeInWSDL if there is an 'element' type the
+     *         add its types or references to the dependent type.
      */
     private void getAllDependentTypes(XmlObject nodeInWSDL,
-            Set<QName> dependentTypes) {
+                                      Set<QName> dependentTypes) {
         // scan for any node under the type that has "type" or "ref" attribute
         XmlCursor cursor = nodeInWSDL.newCursor();
-        if (cursor.toFirstChild()) { // has child
-            while (true) {
+        if(cursor.toFirstChild()) { // has child
+            while(true) {
                 getAllDependentTypes(cursor.getObject(), dependentTypes);
-                if (!cursor.toNextSibling())
+                if(!cursor.toNextSibling())
                     break;
             }
         }
-        if (nodeInWSDL.schemaType().getName().getLocalPart().equals(
-                "localElement")) {
-            LocalElement e = (LocalElement) nodeInWSDL;
+        if(nodeInWSDL.schemaType().getName().getLocalPart().equals(
+            "localElement")) {
+            LocalElement e = (LocalElement)nodeInWSDL;
 
-            if (e.isSetType())
+            if(e.isSetType())
                 dependentTypes.add(e.getType());
-            else if (e.isSetRef())
+            else if(e.isSetRef())
                 dependentTypes.add(e.getRef());
         }
         return;
@@ -226,13 +221,14 @@
     // once the WSDLProcessor is changed to an interface, remove this function
     // and use the one in the upcoming XmlBeanWSDLProcessor.
     private static <T extends XmlObject> T[] selectChildren(XmlObject parent,
-            Class<T> childClass) throws IllegalAccessException,
-            NoSuchFieldException {
+                                                            Class<T> childClass)
+        throws IllegalAccessException,
+        NoSuchFieldException {
         // retrieve the SchemaType from the static type field
-        SchemaType st = (SchemaType) childClass.getField("type").get(null);
+        SchemaType st = (SchemaType)childClass.getField("type").get(null);
         XmlObject[] kids = parent.selectChildren(st.getDocumentElementName());
-        T[] castKids = (T[]) Array.newInstance(childClass, kids.length);
-        for (int j = 0; j < castKids.length; j++) {
+        T[] castKids = (T[])Array.newInstance(childClass, kids.length);
+        for(int j = 0; j < castKids.length; j++) {
             castKids[j] = childClass.cast(kids[j]);
         }
         return castKids;

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializerFactory.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializerFactory.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializerFactory.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializerFactory.java Wed Jun  1 13:53:19 2005
@@ -30,8 +30,8 @@
  *
  * @author Jonathan Colwell
  */
-public class XmlBeanSerializerFactory extends BaseSerializerFactory {
-
+public class XmlBeanSerializerFactory
+    extends BaseSerializerFactory {
     public XmlBeanSerializerFactory(Class javaType, QName xmlType) {
         super(XmlBeanSerializer.class, xmlType, javaType);
     }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/BindingLookupService.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/BindingLookupService.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/BindingLookupService.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/BindingLookupService.java Wed Jun  1 13:53:19 2005
@@ -35,8 +35,11 @@
  * And for a given QName:
  * 		qnameA = class2qname(qname2class(qnameA)
 */
+
 public interface BindingLookupService {
-	public abstract QName class2qname(Class cls);
+    public abstract QName class2qname(Class cls);
+
     public QName class2qname(Class cls, String namespace);
-	public Class qname2class(QName qname);
+
+    public Class qname2class(QName qname);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/GenericHolder.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/GenericHolder.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/GenericHolder.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/GenericHolder.java Wed Jun  1 13:53:19 2005
@@ -20,30 +20,27 @@
 package org.apache.beehive.wsm.databinding;
 
 
-import java.lang.reflect.Field;
-
 import javax.xml.rpc.holders.Holder;
 
-/*******************************************************************************
- * 
+/**
+ * ****************************************************************************
  *
  * @author Jonathan Colwell
  */
-public class GenericHolder<T> implements Holder {
-    
+public class GenericHolder<T>
+    implements Holder {
     public T value;
-    
+
     public GenericHolder(T value) {
         this.value = value;
     }
 
-	// The blank constructore is made private so that the value is always set in the holder.  The type of the value
-	// is used by the service control to determine the type of class conversion it would need to stuff value to the
-	// holder from the soap message result.    The only way I have been able to get the type of the Value is by
-	// looking at its class, which requires that  for the value class to have been instantiated.
-    private GenericHolder() {}
-	
-	
+    // The blank constructore is made private so that the value is always set in the holder.  The type of the value
+    // is used by the service control to determine the type of class conversion it would need to stuff value to the
+    // holder from the soap message result.    The only way I have been able to get the type of the Value is by
+    // looking at its class, which requires that  for the value class to have been instantiated.
+    private GenericHolder() {
+    }
 
 
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/xmlbeans/XmlBeanTypeLookup.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/xmlbeans/XmlBeanTypeLookup.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/xmlbeans/XmlBeanTypeLookup.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/databinding/xmlbeans/XmlBeanTypeLookup.java Wed Jun  1 13:53:19 2005
@@ -20,7 +20,6 @@
 package org.apache.beehive.wsm.databinding.xmlbeans;
 
 import java.lang.reflect.Method;
-
 import javax.xml.namespace.QName;
 
 import org.apache.beehive.wsm.databinding.BindingLookupService;
@@ -32,113 +31,113 @@
 import org.apache.xmlbeans.XmlObject;
 
 
+public class XmlBeanTypeLookup
+    implements BindingLookupService {
+    static Logger logger = Logger.getLogger(XmlBeanTypeLookup.class);
+    static XmlBeanTypeLookup theLookup = new XmlBeanTypeLookup();
 
-public class XmlBeanTypeLookup implements BindingLookupService {
-	static Logger logger = Logger.getLogger(XmlBeanTypeLookup.class);
-	static XmlBeanTypeLookup theLookup = new XmlBeanTypeLookup();
-    
-	public QName class2qname( Class cls) {
-	    if (XmlObject.class.isAssignableFrom(cls)) {
+    public QName class2qname(Class cls) {
+        if(XmlObject.class.isAssignableFrom(cls)) {
             return XmlBeans.typeForClass(cls).getName();
         }
-	    return null;
-	}
-    
+        return null;
+    }
+
     public QName class2qname(Class cls, String defaultnamespace) {
         QName res = class2qname(cls);
         // for xmlbeans we can ignore default name space.
         return res;
     }
 
-	/* (non-Javadoc)
-	 * @see TypeLookUpServices#Qname2Class(javax.xml.namespace.QName)
-	 */
-	public Class qname2class(QName qname) {
-		logger.debug("Get XMLBeans class for Qname: " + qname);
-	        SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
-	        SchemaType st = stl.findType(qname);
-	        if (st == null) {
-	            SchemaField sf = stl.findElement(qname);
-	            if (sf != null) {
-	                st = sf.getType();
-	            }
-	        }
-
-	        if (st != null) {
-	            Class xmlClass = st.getJavaClass();
-
-	            //String clName = xmlClass.getName();
-	            if (st.isBuiltinType()) {
-	                Method[] declared = xmlClass.getDeclaredMethods();
-	                Class natural =
-	                    scanDeclaredMethodsForViableReturnType(declared);
-	                if (natural != null) {
-	                    return natural;
-	                }
-	                else {
-	                    // NOTE jcolwell@bea.com 2004-Nov-12 --
-	                    // XmlString declares no methods
-
-	                    if (xmlClass.isInterface()) {
-	                        for (Class cl : xmlClass.getInterfaces()) {
-	                            natural = scanDeclaredMethodsForViableReturnType
-	                                (cl.getDeclaredMethods());
-	                            if (natural != null) {
-	                                return natural;
-	                            }
-	                        }
-	                    }
-	                    else {
-	                        declared = xmlClass.getSuperclass().getDeclaredMethods();
-	                        natural = scanDeclaredMethodsForViableReturnType
-	                            (declared);
-	                        if (natural != null) {
-	                            return natural;
-	                        }
-	                    }
-	                }
-	            }
-	            return xmlClass;
-	        }
-	        else {
-	            // NOTE jcolwell@bea.com 2004-Nov-30 -- 
-	            // keep in mind that a real TMU based on a viable SOAP stack should
-	            // be used and this pure XmlBean implementation is just a fallback.
-	            return null;
-	        }
-	    }
-	
-	   private Class scanDeclaredMethodsForViableReturnType
-       (Method[] declared) {
-       /* TODO:  Does this make sense?  IT looks as if the type of the class is determined based on the
-        * method return types.  
+    /* (non-Javadoc)
+      * @see TypeLookUpServices#Qname2Class(javax.xml.namespace.QName)
+      */
+    public Class qname2class(QName qname) {
+        logger.debug("Get XMLBeans class for Qname: " + qname);
+        SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
+        SchemaType st = stl.findType(qname);
+        if(st == null) {
+            SchemaField sf = stl.findElement(qname);
+            if(sf != null) {
+                st = sf.getType();
+            }
+        }
+
+        if(st != null) {
+            Class xmlClass = st.getJavaClass();
+
+            //String clName = xmlClass.getName();
+            if(st.isBuiltinType()) {
+                Method[] declared = xmlClass.getDeclaredMethods();
+                Class natural =
+                    scanDeclaredMethodsForViableReturnType(declared);
+                if(natural != null) {
+                    return natural;
+                }
+                else {
+                    // NOTE jcolwell@bea.com 2004-Nov-12 --
+                    // XmlString declares no methods
+
+                    if(xmlClass.isInterface()) {
+                        for(Class cl : xmlClass.getInterfaces()) {
+                            natural = scanDeclaredMethodsForViableReturnType
+                                (cl.getDeclaredMethods());
+                            if(natural != null) {
+                                return natural;
+                            }
+                        }
+                    }
+                    else {
+                        declared = xmlClass.getSuperclass().getDeclaredMethods();
+                        natural = scanDeclaredMethodsForViableReturnType
+                            (declared);
+                        if(natural != null) {
+                            return natural;
+                        }
+                    }
+                }
+            }
+            return xmlClass;
+        }
+        else {
+            // NOTE jcolwell@bea.com 2004-Nov-30 --
+            // keep in mind that a real TMU based on a viable SOAP stack should
+            // be used and this pure XmlBean implementation is just a fallback.
+            return null;
+        }
+    }
+
+    private Class scanDeclaredMethodsForViableReturnType
+        (Method[] declared) {
+        /* TODO:  Does this make sense?  IT looks as if the type of the class is determined based on the
+        * method return types.
         */
-       for (Method meth : declared) {
-               
-           Class returnType = meth.getReturnType();
-           //System.out.println(returnType.getName());
-           if (!returnType.equals(Void.TYPE)) {
-               /*
-                * NOTE jcolwell@bea.com 2004-Nov-12 -- 
+        for(Method meth : declared) {
+
+            Class returnType = meth.getReturnType();
+            //System.out.println(returnType.getName());
+            if(!returnType.equals(Void.TYPE)) {
+                /*
+                * NOTE jcolwell@bea.com 2004-Nov-12 --
                 * built-in XmlBeans types may be of the following natural
                 * types:
                 * primitives, byte arrays, Strings, Calendars, BigIntegers
                 * and BigDecimals
                 */
-               if (returnType.isArray()
-                   || returnType.isPrimitive()
-                   || returnType.equals(String.class)
-                   || returnType.equals(QName.class)
-                   || returnType.equals(java.util.Calendar.class)
-                   || returnType.equals(java.math.BigDecimal.class)
-                   || returnType.equals(java.math.BigInteger.class)) {
-
-                   return returnType;
-               }
-           }
-       }
-       return null;
-   }
+                if(returnType.isArray()
+                    || returnType.isPrimitive()
+                    || returnType.equals(String.class)
+                    || returnType.equals(QName.class)
+                    || returnType.equals(java.util.Calendar.class)
+                    || returnType.equals(java.math.BigDecimal.class)
+                    || returnType.equals(java.math.BigInteger.class)) {
+
+                    return returnType;
+                }
+            }
+        }
+        return null;
+    }
 
     /**
      * @param q
@@ -147,5 +146,5 @@
     public static Class q2Class(QName q) {
         return theLookup.qname2class(q);
     }
-	
+
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java Wed Jun  1 13:53:19 2005
@@ -19,44 +19,53 @@
 
 
 import java.util.List;
-
 import javax.xml.namespace.QName;
 
 /**
  * @author Daryoush
  */
 public interface BeehiveWsMethodMetadata {
-    
     boolean isOneWay();
+
     void setOneWay(boolean oneway);
-    
-    
+
+
     String getWmAction();
+
     void setWmAction(String wmAction);
-    
+
     String getWmOperationName();
+
     void setWmOperationName(String wmOperationName);
-    
+
     String getWrName();
+
     void setWrName(String wrName);
-    
+
     String getWrTargetNamespace();
+
     void setWrTargetNamespace(String wrTargetNamespace);
-    
+
     List<BeehiveWsParameterMetadata> getParams();
+
     void addParam(BeehiveWsParameterMetadata parameter);
+
     void addParams(List<? extends BeehiveWsParameterMetadata> parameters);
-    BeehiveWsParameterMetadata  findParam(String parmName);
+
+    BeehiveWsParameterMetadata findParam(String parmName);
 
     String getJavaMethodName();
-    
+
     Class getJavaReturnType();
+
     String getJavaReturnTypeFullName();
-    
+
     QName getXmlReturnType();
+
     void setXmlReturnType(QName xmlType);
-	/**
-	 * @param javaType
-	 */
-	void setReturnType(Class javaType);
+
+    /**
+     * @param javaType
+     */
+    void setReturnType(Class javaType);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsParameterMetadata.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsParameterMetadata.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsParameterMetadata.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsParameterMetadata.java Wed Jun  1 13:53:19 2005
@@ -24,23 +24,29 @@
  * @author Daryoush
  */
 public interface BeehiveWsParameterMetadata {
-    
     boolean isWpHeader();
+
     void setWpHeader(boolean wpHeader);
-    
+
     WebParam.Mode getWpMode();
+
     void setWpMode(WebParam.Mode wpMode);
-    
+
     String getWpName();
+
     void setWpName(String wpName);
-    
+
     String getWpTargetNamespace();
+
     void setWpTargetNamespace(String wpTargetNamespace);
-    
+
     Class getJavaType();
+
     void setJavaType(Class javaType);
+
     String getJavaTypeFullName();   // this should be moved to web service elementtype later.
 
     QName getXmlType();
+
     void setXmlType(QName xmlType);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPBindingInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPBindingInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPBindingInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPBindingInfo.java Wed Jun  1 13:53:19 2005
@@ -23,34 +23,34 @@
  * @author dmehrtash
  */
 public interface BeehiveWsSOAPBindingInfo {
-  /**
-   * @return Returns the parameterStyle.
-   */
-  public abstract SOAPBinding.ParameterStyle getParameterStyle();
+    /**
+     * @return Returns the parameterStyle.
+     */
+    public abstract SOAPBinding.ParameterStyle getParameterStyle();
 
-  /**
-   * @param parameterStyle The parameterStyle to set.
-   */
-  public abstract void setParameterStyle(
-      SOAPBinding.ParameterStyle parameterStyle);
+    /**
+     * @param parameterStyle The parameterStyle to set.
+     */
+    public abstract void setParameterStyle(
+        SOAPBinding.ParameterStyle parameterStyle);
 
-  /**
-   * @return Returns the style.
-   */
-  public abstract SOAPBinding.Style getStyle();
+    /**
+     * @return Returns the style.
+     */
+    public abstract SOAPBinding.Style getStyle();
 
-  /**
-   * @param style The style to set.
-   */
-  public abstract void setStyle(SOAPBinding.Style style);
+    /**
+     * @param style The style to set.
+     */
+    public abstract void setStyle(SOAPBinding.Style style);
 
-  /**
-   * @return Returns the use.
-   */
-  public abstract SOAPBinding.Use getUse();
+    /**
+     * @return Returns the use.
+     */
+    public abstract SOAPBinding.Use getUse();
 
-  /**
-   * @param use The use to set.
-   */
-  public abstract void setUse(SOAPBinding.Use use);
+    /**
+     * @param use The use to set.
+     */
+    public abstract void setUse(SOAPBinding.Use use);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPMessageHandlerInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPMessageHandlerInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPMessageHandlerInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSOAPMessageHandlerInfo.java Wed Jun  1 13:53:19 2005
@@ -24,48 +24,48 @@
  * @author dmehrtash
  */
 public interface BeehiveWsSOAPMessageHandlerInfo {
-  /**
-   * @return Returns the className.
-   */
-  public abstract String getClassName();
-
-  /**
-   * @param className The className to set.
-   */
-  public abstract void setClassName(String className);
-
-  /**
-   * @return Returns the name.
-   */
-  public abstract String getName();
-
-  /**
-   * @param name The name to set.
-   */
-  public abstract void setName(String name);
-
-  /**
-   * @return Returns the headers.
-   */
-  public abstract Collection<String> getHeaders();
-
-  public abstract void addHeader(String header);
-
-  /**
-   * @return Returns the params.
-   */
-  public abstract Map<String, String> getParameterMap();
-
-  public abstract void addInitParam(String key, String value);
-
-  public abstract void addInitParams(Map<String, String> params);
-
-  /**
-   * @return Returns the roles.
-   */
-  public abstract Collection<String> getRoles();
+    /**
+     * @return Returns the className.
+     */
+    public abstract String getClassName();
+
+    /**
+     * @param className The className to set.
+     */
+    public abstract void setClassName(String className);
+
+    /**
+     * @return Returns the name.
+     */
+    public abstract String getName();
+
+    /**
+     * @param name The name to set.
+     */
+    public abstract void setName(String name);
+
+    /**
+     * @return Returns the headers.
+     */
+    public abstract Collection<String> getHeaders();
+
+    public abstract void addHeader(String header);
+
+    /**
+     * @return Returns the params.
+     */
+    public abstract Map<String, String> getParameterMap();
+
+    public abstract void addInitParam(String key, String value);
+
+    public abstract void addInitParams(Map<String, String> params);
+
+    /**
+     * @return Returns the roles.
+     */
+    public abstract Collection<String> getRoles();
 
-  public abstract void addRole(String role);
+    public abstract void addRole(String role);
 
-  public abstract void addRoles(Collection<String> roles);
+    public abstract void addRoles(Collection<String> roles);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSecurityRolesInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSecurityRolesInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSecurityRolesInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsSecurityRolesInfo.java Wed Jun  1 13:53:19 2005
@@ -23,21 +23,21 @@
  * @author dmehrtash
  */
 public interface BeehiveWsSecurityRolesInfo {
-  /**
-   * @return Returns the wrRolesAllowed.
-   */
-  public abstract Collection<String> getRolesAllowed();
+    /**
+     * @return Returns the wrRolesAllowed.
+     */
+    public abstract Collection<String> getRolesAllowed();
 
-  public abstract void addRolesAllowed(String role);
+    public abstract void addRolesAllowed(String role);
 
-  public abstract void addRolesAllowed(Collection<String> roles);
+    public abstract void addRolesAllowed(Collection<String> roles);
 
-  /**
-   * @return Returns the RolesReferenced.
-   */
-  public abstract Collection<String> getRolesReferenced();
+    /**
+     * @return Returns the RolesReferenced.
+     */
+    public abstract Collection<String> getRolesReferenced();
 
-  public abstract void addRolesReferenced(String role);
+    public abstract void addRolesReferenced(String role);
 
-  public abstract void addRolesReferenced(Collection<String> roles);
+    public abstract void addRolesReferenced(Collection<String> roles);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java Wed Jun  1 13:53:19 2005
@@ -17,63 +17,76 @@
  */
 package org.apache.beehive.wsm.model;
 
-import org.apache.beehive.wsm.model.java.JavaTypeInfo;
-
 import java.net.URL;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.beehive.wsm.model.java.JavaTypeInfo;
+
 /**
  * @author Daryoush
  */
 public interface BeehiveWsTypeMetadata {
-
     void initHandlersFromChainConfig(URL chainConfigURL, String chainName)
         throws Exception;
 
     String getHcFileName();
+
     void setHcFileName(String hcFileName);
-    
+
     public String getHcName();
+
     public void setHcName(String hcName);
-        
+
     String getSiValue();
+
     void setSiValue(String siValue);
-    
+
     BeehiveWsSOAPBindingInfo getSoapBinding();
+
     void setSoapBinding(BeehiveWsSOAPBindingInfo soapBinding);
-    
+
     String getWsName();
+
     void setWsName(String wsName);
-    
+
     String getWsServiceName();
+
     void setWsServiceName(String wsServiceName);
-    
+
     String getWsTargetNamespace();
+
     void setWsTargetNamespace(String wsTargetNamespace);
+
     public String[] getTargetNamespaceParts();
-    
+
     String getWsEndpointInterface();
+
     void setWsEndpointInterface(String wsEndpointInterface);
-    
+
     String getWsWsdlLocation();
+
     void setWsWsdlLocation(String wsWsdlLocation);
-    
+
     Collection<? extends BeehiveWsMethodMetadata> getMethods();
 
     public abstract BeehiveWsMethodMetadata getMethod(String methodName, Class... paramTypes);
-    
+
     /**
      * @throws ValidationException if duplicate methods are encountered or if a
-     * Document style service attempts to overload methods.
+     *                             Document style service attempts to overload methods.
      */
-    void addMethod(BeehiveWsMethodMetadata method) throws ValidationException;
-    
+    void addMethod(BeehiveWsMethodMetadata method)
+        throws ValidationException;
+
     List<? extends BeehiveWsSOAPMessageHandlerInfo> getSoapHandlers();
+
     void addSOAPHandler(BeehiveWsSOAPMessageHandlerInfo soapHandler);
-    
+
     String getClassName();
+
     void setClassName(String className);
-    
-    void merge(JavaTypeInfo jt) throws Exception;
+
+    void merge(JavaTypeInfo jt)
+        throws Exception;
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/ValidationException.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/ValidationException.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/ValidationException.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/ValidationException.java Wed Jun  1 13:53:19 2005
@@ -17,8 +17,8 @@
  */
 package org.apache.beehive.wsm.model;
 
-public class ValidationException extends Exception {
-
+public class ValidationException
+    extends Exception {
     public ValidationException() {
         super();
     }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaMethodInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaMethodInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaMethodInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaMethodInfo.java Wed Jun  1 13:53:19 2005
@@ -23,17 +23,19 @@
 import java.util.List;
 
 public interface JavaMethodInfo {
-
     boolean isPublic();
+
     boolean throwsExceptions();
 
     String getMethodName();
+
     Class getReturnType();
-    
+
     void logError(String msg);
 
     Collection<Annotation> getAnnotations();
+
     <A extends Annotation> A getAnnotation(Class<A> annotationType);
-    
+
     List<JavaParameterInfo> getParameters();
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaParameterInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaParameterInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaParameterInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaParameterInfo.java Wed Jun  1 13:53:19 2005
@@ -22,14 +22,15 @@
 import java.util.Collection;
 
 public interface JavaParameterInfo {
-
     boolean isFinal();
 
     String getName();
+
     Class getType();
-    
+
     void logError(String msg);
-    
+
     <A extends Annotation> A getAnnotation(Class<A> annotationType);
+
     Collection<Annotation> getAnnotations();
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaTypeInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaTypeInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaTypeInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/java/JavaTypeInfo.java Wed Jun  1 13:53:19 2005
@@ -23,21 +23,27 @@
 import java.util.Collection;
 
 public interface JavaTypeInfo {
-
     boolean isAbstract();
+
     boolean isFinal();
+
     boolean isPublic();
+
     boolean isInterface();
+
     boolean hasFinalize();
+
     boolean hasDefaultConstructor();
-    
+
     String getName();
+
     File getLocation();
 
     void logError(String msg);
-    
+
     <A extends Annotation> A getAnnotation(Class<A> annotationType);
+
     Collection<Annotation> getAnnotations();
-    
+
     Collection<JavaMethodInfo> getMethods();
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InitParamInfo.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InitParamInfo.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InitParamInfo.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InitParamInfo.java Wed Jun  1 13:53:19 2005
@@ -20,16 +20,16 @@
  * $Header:$
  */
 
-public class InitParamInfo implements java.io.Serializable {
-
+public class InitParamInfo
+    implements java.io.Serializable {
     private static final long serialVersionUID = 1L;
-    
+
     String name;
 
     String value;
 
     /**
-     *  
+     *
      */
     public InitParamInfo(InitParam a) {
         super();
@@ -40,7 +40,7 @@
      * @param a
      */
     private void initFromAnnotation(InitParam a) {
-        if (null != a) {
+        if(null != a) {
             setName(a.name());
             setValue(a.value());
         }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InvalidFileType.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InvalidFileType.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InvalidFileType.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/InvalidFileType.java Wed Jun  1 13:53:19 2005
@@ -18,8 +18,8 @@
  * $Header:$
  */
 
-public class InvalidFileType extends Exception {
-
+public class InvalidFileType
+    extends Exception {
     private static final long serialVersionUID = 1L;
 
     /**

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java Wed Jun  1 13:53:19 2005
@@ -23,13 +23,11 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
-
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebResult;
-
-import javax.xml.namespace.QName; // todo (mmerz@apache.org, 01/25/05): this needs to go...
+import javax.xml.namespace.QName;
 
 import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
@@ -37,34 +35,34 @@
 import org.apache.beehive.wsm.model.java.JavaMethodInfo;
 import org.apache.beehive.wsm.model.java.JavaParameterInfo;
 
-public class Jsr181MethodMetadataImpl implements BeehiveWsMethodMetadata, java.io.Serializable {
-
+public class Jsr181MethodMetadataImpl
+    implements BeehiveWsMethodMetadata, java.io.Serializable {
     private static final long serialVersionUID = 1L;
     private static final String DEFAULT_WRNAME = "return";
-    
+
     private String wmOperationName;
     private String wmAction;
     private boolean oneway = false;
     private List<BeehiveWsParameterMetadata> params =
-            new ArrayList<BeehiveWsParameterMetadata>();
+        new ArrayList<BeehiveWsParameterMetadata>();
     private String wrName;
     private String wrTargetNamespace;
     private String javaMethodName;
     private Class javaReturnType;
 
     private QName mXMLReturnType;
-    
-    public void validate() throws ValidationException {
+
+    public void validate()
+        throws ValidationException {
         return; // no validation required
     }
-    
+
     public Jsr181MethodMetadataImpl(
         String operationName,
         Class javaType,
-        QName xmlReturnType)
-    {
-    	this(operationName, javaType);
-    	setXmlReturnType(xmlReturnType);
+        QName xmlReturnType) {
+        this(operationName, javaType);
+        setXmlReturnType(xmlReturnType);
     }
 
     public Jsr181MethodMetadataImpl(String methodName, Class returnType) {
@@ -78,20 +76,20 @@
         super();
 
         // check input param
-        if (null == jm) {
+        if(null == jm) {
             jm.logError("illegal java method info: <null>");
             return;
         }
-        
+
         javaMethodName = jm.getMethodName();
         javaReturnType = jm.getReturnType();
 
         // get webMethod's webParams
         List<BeehiveWsParameterMetadata> webParams =
             new ArrayList<BeehiveWsParameterMetadata>();
-        for (JavaParameterInfo param : jm.getParameters()) {
+        for(JavaParameterInfo param : jm.getParameters()) {
             BeehiveWsParameterMetadata wspm = new Jsr181ParameterMetadataImpl(param);
-            if (null == wspm) {
+            if(null == wspm) {
                 jm.logError("cannot create metadata for web param: " + param.getName());
             }
             webParams.add(wspm);
@@ -99,47 +97,47 @@
 
         // set defaults
         setWrName(DEFAULT_WRNAME);
-        
+
         // enforce JSR-181 rules
-        if (! jm.isPublic()) {
+        if(! jm.isPublic()) {
             jm.logError("@WebMethod must be public: " + javaMethodName);
         }
-        if (null != jm.getAnnotation(Oneway.class)) {
+        if(null != jm.getAnnotation(Oneway.class)) {
             // prohibit @Oneway with @WebResult
-            if (null != jm.getAnnotation(WebResult.class)) {
+            if(null != jm.getAnnotation(WebResult.class)) {
                 jm.logError("@Oneway method " + javaMethodName + " has incompatible annotation: @WebResult");
             }
             // prohibit @Oneway with return types other than <code>void</code>
-            if (void.class != javaReturnType) {
+            if(void.class != javaReturnType) {
                 jm.logError("@Oneway method " + javaMethodName + " has illegal non-void return type: " + javaReturnType);
             }
             // prohibit @Oneway methods that throw Exceptions
-            if (jm.throwsExceptions()) {
+            if(jm.throwsExceptions()) {
                 jm.logError("@Oneway method " + javaMethodName + " must not throw checked exceptions");
             }
             // todo??? prohibit @Oneway with "OUT" and "INOUT" parameters
-                    
-            if (null != webParams) {
-                for (BeehiveWsParameterMetadata param : webParams) {
-                    if ((WebParam.Mode.OUT == param.getWpMode()) || (WebParam.Mode.INOUT == param.getWpMode())) {
+
+            if(null != webParams) {
+                for(BeehiveWsParameterMetadata param : webParams) {
+                    if((WebParam.Mode.OUT == param.getWpMode()) || (WebParam.Mode.INOUT == param.getWpMode())) {
                         jm.logError("@Oneway method " + javaMethodName + " has illegal INOUT or OUT parameter: " + param.getWpName());
                     }
                 }
             }
         }
-        
+
         // set optional annotations
         Collection<Annotation> annotations = jm.getAnnotations();
-        if (null != annotations) {
-            for (Annotation a : annotations) {
-                if (a.annotationType() == javax.jws.WebMethod.class) {
-                    initFromAnnotation((javax.jws.WebMethod) a);
+        if(null != annotations) {
+            for(Annotation a : annotations) {
+                if(a.annotationType() == javax.jws.WebMethod.class) {
+                    initFromAnnotation((javax.jws.WebMethod)a);
                 }
-                else if (a.annotationType() == javax.jws.Oneway.class) {
-                    initFromAnnotation((javax.jws.Oneway) a);
+                else if(a.annotationType() == javax.jws.Oneway.class) {
+                    initFromAnnotation((javax.jws.Oneway)a);
                 }
-                else if (a.annotationType() == javax.jws.WebResult.class) {
-                    initFromAnnotation((javax.jws.WebResult) a);
+                else if(a.annotationType() == javax.jws.WebResult.class) {
+                    initFromAnnotation((javax.jws.WebResult)a);
                 }
                 else {
                     // unknown annotation
@@ -148,20 +146,20 @@
         }
 
         // set default values
-        if ((null == getWmOperationName()) || (0 == getWmOperationName().length())) {
+        if((null == getWmOperationName()) || (0 == getWmOperationName().length())) {
             setWmOperationName(javaMethodName);
         }
-        if ((null == getWmAction()) || (0 == getWmAction().length())) {
+        if((null == getWmAction()) || (0 == getWmAction().length())) {
             setWmAction("");
         }
-        
+
         // set WebServicePARAMETERMetadata
         addParams(webParams);
     }
 
 
     private void initFromAnnotation(WebResult annotation) {
-        if (null != annotation) {
+        if(null != annotation) {
             setWrName(annotation.name());
             setWrTargetNamespace(annotation.targetNamespace());
         }
@@ -172,7 +170,7 @@
     }
 
     private void initFromAnnotation(WebMethod annotation) {
-        if (null != annotation) {
+        if(null != annotation) {
             setWmAction(annotation.action());
             setWmOperationName(annotation.operationName());
         }
@@ -224,14 +222,14 @@
     }
 
     public void addParams(List<? extends BeehiveWsParameterMetadata> parameters) {
-        if (null != parameters) {
+        if(null != parameters) {
             params.addAll(parameters);
         }
         // todo: checks
     }
 
     public void addParam(BeehiveWsParameterMetadata parameter) {
-        if (null != parameter) {
+        if(null != parameter) {
             params.add(parameter);
         }
         // todo: checks
@@ -249,9 +247,9 @@
         StringBuilder sb = new StringBuilder(getJavaMethodName());
         sb.append('(');
         boolean firstParam = true;
-        if (null != params) {
-            for (BeehiveWsParameterMetadata p : params) {
-                if (firstParam) {
+        if(null != params) {
+            for(BeehiveWsParameterMetadata p : params) {
+                if(firstParam) {
                     firstParam = false;
                 }
                 else {
@@ -263,49 +261,49 @@
         sb.append(')');
         return sb.toString();
     }
-    
+
     public String toString() {
         String signature = getJavaReturnType().toString() + " " + getJavaMethodName() + "( ";
-        for (BeehiveWsParameterMetadata p : params) {
+        for(BeehiveWsParameterMetadata p : params) {
             signature += p.getJavaType().toString() + " ";
         }
         return signature + ")";
     }
-    
+
     public boolean equals(Object o) {
-        if (! (o instanceof Jsr181MethodMetadataImpl)) {
+        if(! (o instanceof Jsr181MethodMetadataImpl)) {
             return false;
         }
-        Jsr181MethodMetadataImpl m = (Jsr181MethodMetadataImpl) o;
+        Jsr181MethodMetadataImpl m = (Jsr181MethodMetadataImpl)o;
 
         // check name
-        if (! getJavaMethodName().equals(m.getJavaMethodName())) {
+        if(! getJavaMethodName().equals(m.getJavaMethodName())) {
             return false;
         }
-        
+
         // check return type
-        if (! getJavaReturnType().equals(m.getJavaReturnType())) {
+        if(! getJavaReturnType().equals(m.getJavaReturnType())) {
             return false;
         }
-        
+
         // check all parameters (types, not names!)
-        if (params.size() != m.params.size()) {
+        if(params.size() != m.params.size()) {
             return false;
         }
-        for (int i = 0; i < params.size(); i++) {
-            if (! m.params.get(i).getJavaType().equals(params.get(i).getJavaType())) {
+        for(int i = 0; i < params.size(); i++) {
+            if(! m.params.get(i).getJavaType().equals(params.get(i).getJavaType())) {
                 return false;
             }
         }
 
         // check exceptions?
-        
+
         return true;
     }
 
     /* (non-Javadoc)
      * @see org.apache.beehive.wsm.jsr181.model.Jsr181MethodMetadata#getJavaReturnTypeFullName()
-     * 
+     *
      * NOTE THIS METHOD AND SUPPORTING METHOD SHOULD BE MOVED OUT TO A ELEMENT CLASS
      * THAT ENCAPSULATES QNAME AND CLASS
 
@@ -315,29 +313,29 @@
     }
 
     private String getClassName(Class cls) {
-            if (cls.isArray()) {
-                return getClassName(cls.getComponentType()) + "[]";
-            }
-            else {
-                return cls.getName().replace('$', '.');
-            }
+        if(cls.isArray()) {
+            return getClassName(cls.getComponentType()) + "[]";
+        }
+        else {
+            return cls.getName().replace('$', '.');
+        }
     }
-    
+
     public QName getXmlReturnType() {
-    	return mXMLReturnType;
-   }
+        return mXMLReturnType;
+    }
 
     public void setXmlReturnType(QName xmlReturnType) {
-    	mXMLReturnType = xmlReturnType;
+        mXMLReturnType = xmlReturnType;
     }
 
-	/* (non-Javadoc)
-	 * @see org.apache.beehive.wsm.jsr181.model.Jsr181MethodMetadata#setReturnType(java.lang.Class)
-	 */
-	public void setReturnType(Class javaType) {
-		this.javaReturnType = javaType;
-		
-	}
+    /* (non-Javadoc)
+      * @see org.apache.beehive.wsm.jsr181.model.Jsr181MethodMetadata#setReturnType(java.lang.Class)
+      */
+    public void setReturnType(Class javaType) {
+        this.javaReturnType = javaType;
+
+    }
 
     /* (non-Javadoc)
      * @see org.apache.beehive.wsm.jsr181.model.BeehiveWsMethodMetadata#findParam(java.lang.String)
@@ -345,10 +343,10 @@
     public BeehiveWsParameterMetadata findParam(String parmName) {
         // walk the list of parameters until the parameter with paramName is found
         // there are small number of parameters, so walking the list should be ok
-        if( null == parmName) return null;
+        if(null == parmName) return null;
         BeehiveWsParameterMetadata res = null;
-        for(BeehiveWsParameterMetadata nxtParam : params) {           
-            if( parmName.equals(nxtParam.getWpName())) {
+        for(BeehiveWsParameterMetadata nxtParam : params) {
+            if(parmName.equals(nxtParam.getWpName())) {
                 res = nxtParam;
                 break;
             }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java Wed Jun  1 13:53:19 2005
@@ -20,45 +20,44 @@
 
 import java.io.File;
 import java.io.FilenameFilter;
-import java.io.InputStream;
 import java.io.IOException;
-import java.io.OutputStream;
+import java.io.InputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.net.URL;
 
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
 import com.sun.mirror.apt.Filer;
-
-import java.net.URL;
-
 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
 
 /**
  * Encapsulates all knowledge about where and how object models are persisted.
  */
 public class Jsr181ObjectModelStore {
-    
     private final static String EXTENSION = ".ser";
     private final static String LOCATOR = ".webservices";
 
     private static boolean isMarked = false;
-    
+
     private AnnotationProcessorEnvironment env;
-    
+
     /**
      * Constructor.
+     *
      * @param env A context that is required to access the filer.
-     * TODO needs to be abstracted further.
+     *            TODO needs to be abstracted further.
      */
     public Jsr181ObjectModelStore(AnnotationProcessorEnvironment env) {
-        if (null == env) {
+        if(null == env) {
             throw new IllegalArgumentException("illegal apt environment: <null>");
         }
         this.env = env;
     }
-    
+
     /**
      * Encapsulates the encoding of the pathname for object models.
+     *
      * @param className
      * @return File
      */
@@ -72,67 +71,65 @@
      * @throws ClassNotFoundException
      */
     public static BeehiveWsTypeMetadata load(Class clazz)
-            throws IOException, ClassNotFoundException
-    {
+        throws IOException, ClassNotFoundException {
         String resourceName = getLocation(clazz.getName()).toString();
         URL url = clazz.getClassLoader().getResource(resourceName);
         return load(url.openStream());
     }
-    
+
     /**
      * @param is
      * @throws IOException
      * @throws ClassNotFoundException
      */
     public static BeehiveWsTypeMetadata load(InputStream is)
-            throws IOException, ClassNotFoundException
-    {
+        throws IOException, ClassNotFoundException {
         Jsr181TypeMetadataImpl objectModel = null;
         ObjectInputStream ois = null;
 
         try {
-            if (null == is) {
+            if(null == is) {
                 throw new IOException("cannot load object model without input stream");
             }
             ois = new ObjectInputStream(is);
-            objectModel = (Jsr181TypeMetadataImpl) ois.readObject();
+            objectModel = (Jsr181TypeMetadataImpl)ois.readObject();
         }
         finally {
-            if (null != ois) {
+            if(null != ois) {
                 ois.close();
             }
         }
 
         return objectModel;
     }
-    
+
     /**
      * Persists a given <code>objectModel</code>.
+     *
      * @param objectModel The object mode to be persisted.
      * @throws IOException If the object model cannot be persisted.
      */
     public void store(BeehiveWsTypeMetadata objectModel)
-            throws IOException
-    {
+        throws IOException {
         OutputStream os = env.getFiler().createBinaryFile(Filer.Location.CLASS_TREE, "", getLocation(objectModel.getClassName()));
         ObjectOutputStream oos = null;
         try {
-            if (null == os) {
+            if(null == os) {
                 throw new IOException("cannot persist object model without output stream");
             }
-            if (null == objectModel) {
+            if(null == objectModel) {
                 throw new IOException("cannot persist empty object model ");
             }
             oos = new ObjectOutputStream(os);
             oos.writeObject(objectModel);
-            
-            if (! isMarked) {
+
+            if(! isMarked) {
                 env.getFiler().createBinaryFile(Filer.Location.CLASS_TREE, "", new java.io.File(LOCATOR));
                 isMarked = true;
             }
         }
         finally {
-            if (null != oos) {
+            if(null != oos) {
                 oos.flush();
                 oos.close();
             }
@@ -141,16 +138,16 @@
 
     /**
      * Tries to find the class with a given <code>className</code>. If
-     * <code>className</code> is a simple name, the method tries to find a 
+     * <code>className</code> is a simple name, the method tries to find a
      * matching fully qualified class name. The respective class is then
      * loaded and returned.
+     *
      * @param className A class name; may be a fully qualified or a simple class
-     *   name.
+     *                  name.
      * @return A class with a matching name.
      */
     public static Class loadWebServiceClass(String className)
-            throws ClassNotFoundException
-    {
+        throws ClassNotFoundException {
         Class clazz = null;
         ClassLoader cl = Jsr181ObjectModelStore.class.getClassLoader();
 
@@ -158,44 +155,44 @@
         try {
             clazz = cl.loadClass(className);
         }
-        
+
         // try className as simple class name
-        catch (ClassNotFoundException e) {
+        catch(ClassNotFoundException e) {
             final File wsDirectory = new File(new File(cl.getResource(LOCATOR).getFile()).getParent());
             String fqClassName = getFullyQualifiedClassName(wsDirectory, className);
             // todo: we do this for the TCK only...
-            if (null == fqClassName) {
+            if(null == fqClassName) {
                 fqClassName = getFullyQualifiedClassName(wsDirectory, className.substring(0, className.length() - "Service".length()));
             }
             clazz = cl.loadClass(fqClassName);
         }
         return clazz;
     }
-    
+
     /**
      * Implements the algorithm for finding a class given a <code>simpleName
      * </code>: searches the directory used for persisting object models for
      * matching names.
      * TODO currently returns the first match; would an exception be the better
-     *   approach?
+     * approach?
+     *
      * @param wsDirectory The directory to be searched.
-     * @param simpleName A simple name for the class.
+     * @param simpleName  A simple name for the class.
      * @return The fully qualified class name if it can be found.
-     * @throws ClassNotFoundException If a matching fully qualified class name 
-     *   cannot be found.
+     * @throws ClassNotFoundException If a matching fully qualified class name
+     *                                cannot be found.
      */
     private static String getFullyQualifiedClassName(final File wsDirectory, final String simpleName)
-            throws ClassNotFoundException
-    {
+        throws ClassNotFoundException {
         FilenameFilter filenameFilter = new FilenameFilter() {
             public boolean accept(File dir, String name) {
                 return (wsDirectory.equals(dir) && (name.endsWith(simpleName + EXTENSION)));
             }
         };
         String fqClassName = null;
-        for (File file : wsDirectory.listFiles(filenameFilter)) {
+        for(File file : wsDirectory.listFiles(filenameFilter)) {
             String filename = file.getName();
-            if (filename.endsWith(EXTENSION)) {
+            if(filename.endsWith(EXTENSION)) {
                 fqClassName = filename.substring(0, filename.length() - EXTENSION.length());
                 break;
             }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ParameterMetadataImpl.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ParameterMetadataImpl.java?rev=179419&r1=179418&r2=179419&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ParameterMetadataImpl.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181ParameterMetadataImpl.java Wed Jun  1 13:53:19 2005
@@ -20,17 +20,15 @@
 
 import java.lang.annotation.Annotation;
 import java.util.Collection;
-
 import javax.jws.WebParam;
-
-import javax.xml.namespace.QName; // todo (mmerz@apache.org, 01/25/05): this needs to go...
+import javax.xml.namespace.QName;
 
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
 import org.apache.beehive.wsm.model.ValidationException;
 import org.apache.beehive.wsm.model.java.JavaParameterInfo;
 
-public class Jsr181ParameterMetadataImpl implements BeehiveWsParameterMetadata, java.io.Serializable {
-    
+public class Jsr181ParameterMetadataImpl
+    implements BeehiveWsParameterMetadata, java.io.Serializable {
     private static final long serialVersionUID = 1L;
 
     private String wpName;
@@ -41,7 +39,8 @@
     private QName mXMLType;
 
 
-    public void validate() throws ValidationException {
+    public void validate()
+        throws ValidationException {
         return; // no validation required
     }
 
@@ -53,23 +52,23 @@
     public Jsr181ParameterMetadataImpl(JavaParameterInfo jp) {
 
         // check input params
-        if (null == jp) {
+        if(null == jp) {
             jp.logError("illegal java parameter info: <null>");
             return;
         }
-        
+
         javaType = jp.getType();
-        
+
         // set default values
         setWpName(jp.getName());
         setWpMode(WebParam.Mode.IN);
-        
+
         // set optional annotations
         Collection<Annotation> annotations = jp.getAnnotations();
-        if (null != annotations) {
-            for (Annotation a : annotations) {
-                if (a.annotationType() == WebParam.class) {
-                    initFromAnnotation((WebParam) a);
+        if(null != annotations) {
+            for(Annotation a : annotations) {
+                if(a.annotationType() == WebParam.class) {
+                    initFromAnnotation((WebParam)a);
                 }
                 else {
                     // todo: warning -- unknown annotation
@@ -103,7 +102,7 @@
     }
 
     public String getWpTargetNamespace() {
-         return wpTargetNamespace;
+        return wpTargetNamespace;
     }
 
     public void setWpTargetNamespace(String wpTargetNamespace) {
@@ -119,8 +118,8 @@
     }
 
     private void initFromAnnotation(WebParam annotation) {
-        if (null != annotation) {
-            if (0 < annotation.name().length()) {
+        if(null != annotation) {
+            if(0 < annotation.name().length()) {
                 setWpName(annotation.name());
             }
             setWpTargetNamespace(annotation.targetNamespace());
@@ -131,7 +130,7 @@
 
     /* (non-Javadoc)
      * @see org.apache.beehive.wsm.jsr181.model.Jsr181ParameterMetadata#getJavaTypeFullName()
-     * 
+     *
      * NOTE THIS METHOD AND SUPPORTING METHOD SHOULD BE MOVED OUT TO A ELEMENT CLASS
      * THAT ENCAPSULATES QNAME AND CLASS
      */
@@ -139,15 +138,16 @@
         return getClassName(getJavaType());
 
     }
+
     private String getClassName(Class cls) {
-            if (cls.isArray()) {
-                return getClassName(cls.getComponentType()) + "[]";
-            }
-            else {
-                return cls.getName().replace('$', '.');
-            }
+        if(cls.isArray()) {
+            return getClassName(cls.getComponentType()) + "[]";
+        }
+        else {
+            return cls.getName().replace('$', '.');
+        }
     }
-    
+
     public QName getXmlType() {
         return mXMLType;
     }