You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/01/06 20:46:52 UTC

svn commit: r366555 [4/4] - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/types/ adb/src/org/apache/axis2/databinding/utils/ codegen/src/org/apache/axis2/schema/ codegen/src/org/apache/axis2/schema/i18n/ codegen/src/org...

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java Fri Jan  6 11:46:16 2006
@@ -30,14 +30,14 @@
 
 /**
  * This is the representation of the inflow configurations of the security
- * module
+ * module.
  */
 public class InflowConfiguration {
 	
 	private HashMap action = new HashMap();
 	
 	/**
-	 * Returns the configuration as an OMElement 
+	 * Returns the configuration as an OMElement.
 	 * @return Returns Parameter.
 	 */
 	public Parameter getProperty() {
@@ -79,7 +79,7 @@
 	}
 
 	/**
-	 * Sets the action items
+	 * Sets the action items.
 	 * @param actionItems
 	 */
 	public void setActionItems(String actionItems) {
@@ -87,15 +87,15 @@
 	}
 
 	/**
-	 * Returns the decryption property file
-	 * @return
+	 * Returns the decryption property file.
+	 * @return Returns String.
 	 */
 	public String getDecryptionPropFile() {
 		return (String)this.action.get(WSHandlerConstants.DEC_PROP_FILE);
 	}
 
 	/**
-	 * Sets the decryption property file
+	 * Sets the decryption property file.
 	 * @param decryptionPropFile
 	 */
 	public void setDecryptionPropFile(String decryptionPropFile) {
@@ -103,15 +103,15 @@
 	}
 
 	/**
-	 * Returns the password callback class name
-	 * @return
+	 * Returns the password callback class name.
+	 * @return Returns String.
 	 */
 	public String getPasswordCallbackClass() {
 		return (String)this.action.get(WSHandlerConstants.PW_CALLBACK_CLASS);
 	}
 
 	/**
-	 * Sets the password callback class name
+	 * Sets the password callback class name.
 	 * @param passwordCallbackClass
 	 */
 	public void setPasswordCallbackClass(String passwordCallbackClass) {
@@ -119,7 +119,7 @@
 	}
 
 	/**
-	 * Returns the signature property file
+	 * Returns the signature property file.
 	 * @return Returns String.
 	 */
 	public String getSignaturePropFile() {
@@ -127,7 +127,7 @@
 	}
 
 	/**
-	 * Sets the signature property file
+	 * Sets the signature property file.
 	 * @param signaturePropFile
 	 */
 	public void setSignaturePropFile(String signaturePropFile) {
@@ -135,7 +135,7 @@
 	}
 	
 	/**
-	 * Sets whether signature confirmation should be enabled or not
+	 * Sets whether signature confirmation should be enabled or not.
 	 * @param value
 	 */
 	public void setEnableSignatureConfirmation(boolean value) {
@@ -144,7 +144,7 @@
 	}
 	
 	/**
-	 * Returns whether signature confirmation should be enabled or not
+	 * Returns whether signature confirmation should be enabled or not.
 	 * @return Returns String.
 	 */
 	public String getEnableSignatureConfirmation() {

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TrustException.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TrustException.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TrustException.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TrustException.java Fri Jan  6 11:46:16 2006
@@ -83,7 +83,7 @@
     }
     
     /**
-     * This can be used to set a custom message in the exception
+     * This is used to set a custom message in the exception.
      * @param faultCode
      * @param msg
      */
@@ -98,7 +98,7 @@
      * @param faultCode
      * @param msgId
      * @param args
-     * @return
+     * @return Returns String.
      */
     private static String getMessage(String faultCode, String msgId, Object[] args) {
         String msg = null;
@@ -132,16 +132,16 @@
     
     
     /**
-     * Return the fault code
-     * @return
+     * Returns the fault code.
+     * @return Returns String.
      */
 	public String getFaultCode() {
 		return TrustConstants.WST_PREFIX + faultCode;
 	}
 	
 	/**
-	 * Return the fault string
-	 * @return
+	 * Returns the fault string.
+	 * @return Returns String.
 	 */
 	public String getFaultString() {
 		return faultString;

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/AppliesTo.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/AppliesTo.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/AppliesTo.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/AppliesTo.java Fri Jan  6 11:46:16 2006
@@ -41,7 +41,7 @@
 	}
 
 	/**
-	 * Add a token as a child
+	 * Adds a token as a child.
 	 * This is provided as an extensibility mechanism to add any
 	 * child element to the <code>wsp:AppliesTo</code> element
 	 * @param token
@@ -51,8 +51,8 @@
 	}
 	
 	/**
-	 * Retuns an interator of child elements
-	 * @return
+	 * Retuns an iterator of child elements.
+	 * @return Returns Iterator.
 	 */
 	public Iterator getChildTokens() {
 		return this.tokenElement.getChildElements();

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/BinarySecret.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/BinarySecret.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/BinarySecret.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/BinarySecret.java Fri Jan  6 11:46:16 2006
@@ -57,7 +57,7 @@
 	
 	/**
 	 * Retuns the value of the .../wst:BinarySecret/@Type attribute
-	 * @return
+	 * @return Returns String.
 	 */
 	public String getTypeAttribute() {
 		return this.tokenElement.getAttribute(
@@ -66,7 +66,7 @@
 	}
 	
 	/**
-	 * Adds the given attribute
+	 * Adds the given attribute.
 	 * @param attribute
 	 * @param value
 	 * @param namespace
@@ -77,9 +77,9 @@
 	}
 	
 	/**
-	 * Returns the value of the requested attribute
+	 * Returns the value of the requested attribute.
 	 * @param attribute
-	 * @return
+	 * @return Returns String.
 	 */
 	public String getAttributeValue(QName attribute) {
 		return this.tokenElement.getAttribute(attribute).getAttributeValue();

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/CancelTarget.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/CancelTarget.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/CancelTarget.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/CancelTarget.java Fri Jan  6 11:46:16 2006
@@ -39,8 +39,8 @@
 	}
     
     /**
-     * This can be used when we are creating a new CancelTaget which will
-     * refer to a targetToken rather than a SecurityTokenReference 
+     * Class is used while creating a new CancelTaget which will
+     * refer to a targetToken rather than a SecurityTokenReference .
      */
     public CancelTarget() {
     	super();
@@ -55,7 +55,7 @@
 	}
 	
 	/**
-	 * Sets the cancel target element 
+	 * Sets the cancel target element. 
 	 * @param targetToken
 	 */
 	public void setCancelTarget(OMElement targetToken) {
@@ -74,7 +74,7 @@
 	}
 	
 	/**
-	 * Sets the cancel target security token reference
+	 * Sets the cancel target security token reference.
 	 * @param securityTokenReference
 	 * @throws TrustException
 	 */
@@ -94,16 +94,16 @@
 	}
 	
 	/**
-	 * Returns the security token reference to the token to be cancelled
-	 * @return
+	 * Returns the security token reference to the token to be cancelled.
+	 * @return Returns SecurityTokenReference.
 	 */
 	public SecurityTokenReference getSecurityTokenReference() {
 		return securityTokenReference;
 	}
 	
 	/**
-	 * Returns the target token to be cancelled
-	 * @return
+	 * Returns the target token to be cancelled.
+	 * @return Returns OMElement.
 	 */
 	public OMElement getTargetToken() {
 		return targetToken;

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Claims.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Claims.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Claims.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Claims.java Fri Jan  6 11:46:16 2006
@@ -42,7 +42,7 @@
 	
 	/**
 	 * Sets the value of the wst:Claims/@Dialect
-	 * Dialect attribute specifies a URI to indicate the syntax of the claims
+	 * Dialect attribute specifies a URI to indicate the syntax of the claims.
 	 * @param value
 	 */
 	public void setDialectAttribute(String value) {
@@ -52,7 +52,7 @@
 	
 	/**
 	 * Returns the value of the wst:Claims/@Dialect
-	 * @return
+	 * @return Returns String.
 	 */
 	public String getDialectAttribute() {
 		return this.tokenElement.getAttribute(
@@ -60,7 +60,7 @@
 	}
 	
 	/**
-	 * Add a token as a child
+	 * Adds a token as a child.
 	 * This is provided as an extensibility mechanism to add any
 	 * child element to the <code>wst:Claims</code> element
 	 * @param token
@@ -70,8 +70,8 @@
 	}
 	
 	/**
-	 * Retuns an interator of child elements
-	 * @return
+	 * Returns an interator of child elements.
+	 * @return Returns Iterator.
 	 */
 	public Iterator getChildTokens() {
 		return this.tokenElement.getChildElements();

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/IssueRequestSecurityToken.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/IssueRequestSecurityToken.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/IssueRequestSecurityToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/IssueRequestSecurityToken.java Fri Jan  6 11:46:16 2006
@@ -141,7 +141,7 @@
 	
 	/**
 	 * Sets the binary secret of the Entropy element when the its of type <code>Nonce</code>
-	 * @see BinarySecret#NONCE_VAL
+	 * @see org.apache.axis2.security.trust.Constants.BINARY_SECRET_TYPE#NONCE_VAL
 	 * @param nonceValue The nonce value
 	 */
 	public void setEntropyNonce(String nonceValue) {

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Lifetime.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Lifetime.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Lifetime.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/Lifetime.java Fri Jan  6 11:46:16 2006
@@ -76,8 +76,8 @@
 	}
 	
     /**
-     * Retuns the value of the <code>wsu:Created</code> child element 
-     * @return
+     * Retuns the value of the <code>wsu:Created</code> child element. 
+     * @return Returns String.
      */
     public String getCreated() {
     	if(this.created != null)
@@ -87,8 +87,8 @@
     }
 
     /**
-     * Returns the value of the <code>wsu:Expires</code> element
-     * @return
+     * Returns the value of the <code>wsu:Expires</code> element.
+     * @return Returns String.
      */
     public String getExpires() {
     	if(this.expires != null)
@@ -99,7 +99,7 @@
 
     
     /**
-     * Sets the value of the <code>wsu:Created</code>element
+     * Sets the value of the <code>wsu:Created</code>element.
      * @param value
      */
     public void setCreated(String value) {
@@ -113,7 +113,7 @@
     }
     
     /**
-     * Sets the value of the <code>wsu:Expires</code> element
+     * Sets the value of the <code>wsu:Expires</code> element.
      * @param value
      */
     public void setExpires(String value) {

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/ValueToken.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/ValueToken.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/ValueToken.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/token/ValueToken.java Fri Jan  6 11:46:16 2006
@@ -21,7 +21,7 @@
 
 /**
  * This is the base class for the elements that carries a
- * value in the element
+ * value in the element.
  * Example:
  * 	<wsu:Created>...</wsu:Created>
  */
@@ -59,8 +59,8 @@
 	}
 	
 	/**
-	 * Returns the value of the token
-	 * @return
+	 * Returns the value of the token.
+	 * @return Returns String.
 	 */
 	public String getValue() {
 		if(this.valueText != null) 
@@ -70,7 +70,7 @@
 	}
 	
 	/**
-	 * Sets the value of the token
+	 * Sets the value of the token.
 	 * @param value
 	 */
 	public void setValue(String value) {

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java Fri Jan  6 11:46:16 2006
@@ -45,9 +45,9 @@
 public class Axis2Util {
 
 	/**
-	 * Create a DOM Document using the SOAP Envelope
+	 * Creates a DOM Document using the SOAP Envelope.
 	 * @param env An org.apache.axis2.soap.SOAPEnvelope instance 
-	 * @return the DOM Document of the given SOAP Envelope
+	 * @return Returns the DOM Document of the given SOAP Envelope.
 	 * @throws Exception
 	 */
 	public static Document getDocumentFromSOAPEnvelope(SOAPEnvelope env)
@@ -87,15 +87,14 @@
 	
 	
 	/**
-	 * This is used to provide the appropriate key to pickup 
-	 * config params from the message context.
+	 * Provides the appropriate key to pickup config params from the message context.
 	 * This is acutally used when the outflow handler (WSDoAllSender)
-	 * is repeated n number of times
+	 * is repeated n number of times.
 	 * @param originalKey The default key
 	 * @param inHandler Whether the handler is the inflow handler or not
 	 * @param repetition The current repetition number
-	 * @return The key to be used internally in the security module to pick
-	 * up the config params
+	 * @return Returns the key to be used internally in the security module to pick
+	 * up the config params.
 	 */
 	public static String getKey(String originalKey, boolean inHandler, int repetition) {
 		
@@ -109,9 +108,9 @@
 	}
 	
 	/**
-	 * Convert a given DOM Element to an OMElement
+	 * Converts a given DOM Element to an OMElement.
 	 * @param element
-	 * @return
+	 * @return Returns OMElement.
 	 * @throws TrustException
 	 */
 	public static OMElement toOM(Element element) throws TrustException {
@@ -135,9 +134,9 @@
 	
 
 	/**
-	 * Convert a given OMElement to a DOM Element
+	 * Converts a given OMElement to a DOM Element.
 	 * @param element
-	 * @return
+	 * @return Returns Element.
 	 * @throws TrustException
 	 */
 	public static Element toDOM(OMElement element) throws TrustException {

Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/ant/AntCodegenTask.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/ant/AntCodegenTask.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/ant/AntCodegenTask.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/ant/AntCodegenTask.java Fri Jan  6 11:46:16 2006
@@ -60,8 +60,8 @@
 
 
     /**
-     * set the classpath
-     * @return
+     * Sets the classpath.
+     * @return Returns Path.
      */
     public Path createClasspath() {
         if (classpath == null) {
@@ -71,8 +71,8 @@
     }
 
     /**
-     * Fill the option map. This map is passed onto
-     * the code generation API to generate the code
+     * Fills the option map. This map is passed onto
+     * the code generation API to generate the code.
      */
     private Map fillOptionMap() {
         Map optionMap = new HashMap();
@@ -185,7 +185,7 @@
     /**
      * Utility method to convert a string into a single item string[]
      * @param value
-     * @return
+     * @return Returns String[].
      */
     private String[] getStringArray(String value) {
         String[] values = new String[1];
@@ -267,7 +267,7 @@
 //    }
 
     /**
-     * @return
+     * @return Returns Path.
      */
     public Path getClasspath() {
         return classpath;

Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/core/ClassFileHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/core/ClassFileHandler.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/core/ClassFileHandler.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/core/ClassFileHandler.java Fri Jan  6 11:46:16 2006
@@ -29,9 +29,9 @@
 
     /**
      * @deprecated
-     * This needs to be written in a functional manner
+     * This needs to be written in a functional manner.
      * @param location
-     * @return
+     * @return Returns ArrayList.
      * @throws IOException
      */
     //todo see whether this is possible

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java Fri Jan  6 11:46:16 2006
@@ -38,9 +38,9 @@
 
     public void generateWSDL() throws Exception {
         SchemaGenerator sg = new SchemaGenerator(classLoader, className, null, null);
-        XmlSchema scheam = sg.generateSchema();
+        XmlSchema schema = sg.generateSchema();
         WSDLDescription wommodel = new Java2WOM(
-                sg.getTypeTable(), sg.getMethods(), scheam, simpleClassName(className), null, null).generateWOM();
+                sg.getTypeTable(), sg.getMethods(), schema, simpleClassName(className), null, null).generateWOM();
         WOMWriter womWriter = WOMWriterFactory.createWriter(org.apache.wsdl.WSDLConstants.WSDL_1_1);
         womWriter.setdefaultWSDLPrefix("wsdl");
         womWriter.writeWOM(wommodel, out);

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java Fri Jan  6 11:46:16 2006
@@ -1,374 +1,373 @@
-package org.apache.axis2.wsdl.java2wsdl;
-
-import org.apache.axis2.wsdl.java2wsdl.bytecode.MethodTable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.XmlSchemaCollection;
-import org.apache.ws.commons.schema.XmlSchemaComplexType;
-import org.apache.ws.commons.schema.XmlSchemaElement;
-import org.apache.ws.commons.schema.XmlSchemaForm;
-import org.apache.ws.commons.schema.XmlSchemaSequence;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JMethod;
-import org.codehaus.jam.JParameter;
-import org.codehaus.jam.JProperty;
-import org.codehaus.jam.JamClassIterator;
-import org.codehaus.jam.JamService;
-import org.codehaus.jam.JamServiceFactory;
-import org.codehaus.jam.JamServiceParams;
-
-import javax.xml.namespace.QName;
-import java.util.Hashtable;
-/*
-* 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.
-*
-*/
-
-public class SchemaGenerator {
-
-    protected Log log = LogFactory.getLog(getClass());
-    private ClassLoader classLoader;
-    private String className;
-    private XmlSchema schema;
-    private TypeTable typeTable;
-    // to keep loadded method using JAM
-    private JMethod methods [];
-    //to store byte code method using Axis 1.x codes
-    private MethodTable methodTable;
-
-    public static String METHOD_REQUEST_WRAPPER = "Request";
-    public static String METHOD_RESPONSE_WRAPPER = "Response";
-    public static String TARGET_NAMESPACE = "http://org.apache.axis2/";
-    public static String SCHEMA_TARGET_NAMESPACE = "http://org.apache.axis2/xsd";
-    public static String SCHEMA_NAMESPACE_PRFIX = "ns1";
-    public static String TARGET_NAMESPACE_PREFIX = "tns";
-    private String scheamTargetNameSpace;
-    private String scheam_namespace_prefix;
-
-    public SchemaGenerator(ClassLoader loader, String className,
-                           String scheamtargetNamespace,
-                           String scheamtargetNamespacePrefix) {
-        this.classLoader = loader;
-        this.className = className;
-//        TARGET_NAMESPACE = "http://" + className;
-        if (scheamtargetNamespace != null && !scheamtargetNamespace.trim().equals("")) {
-            this.scheamTargetNameSpace = scheamtargetNamespace;
-        } else {
-            this.scheamTargetNameSpace = SCHEMA_TARGET_NAMESPACE;
-        }
-        if (scheamtargetNamespacePrefix != null && !scheamtargetNamespacePrefix.trim().equals("")) {
-            this.scheam_namespace_prefix = scheamtargetNamespacePrefix;
-        } else {
-            this.scheam_namespace_prefix = SCHEMA_NAMESPACE_PRFIX;
-        }
-        Hashtable prefixmap = new Hashtable();
-        prefixmap.put(this.scheam_namespace_prefix, this.scheamTargetNameSpace);
-
-        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
-
-        schema = new XmlSchema(this.scheamTargetNameSpace, schemaCollection);
-        schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
-        schema.setPrefixToNamespaceMap(prefixmap);
-        this.typeTable = new TypeTable();
-
-        try {
-            Class clazz = Class.forName(className, true, loader);
-            methodTable = new MethodTable(clazz);
-        } catch (Exception e) {
-            log.info("Error in loading service impl class for byte code reading : " + e.getMessage());
-        }
-    }
-
-    /**
-     * To generate schema for all the parameters in method , first generate schema for all different
-     * parameter type and later refer to them
-     *
-     * @return
-     * @throws Exception
-     */
-    public XmlSchema generateSchema() throws Exception {
-
-        JamServiceFactory factory = JamServiceFactory.getInstance();
-        JamServiceParams jam_service_parms = factory.createServiceParams();
-        //setting the classLoder
-//        jam_service_parms.setParentClassLoader(factory.createJamClassLoader(classLoader));
-        //it can posible to add the classLoader as well
-        jam_service_parms.addClassLoader(classLoader);
-        jam_service_parms.includeClass(className);
-        JamService service = factory.createService(jam_service_parms);
-
-        JamClassIterator jClassIter = service.getClasses();
-        //all most all the time the ittr will have only one class in it
-        while (jClassIter.hasNext()) {
-            JClass jclass = (JClass) jClassIter.next();
-            // serviceName = jclass.getSimpleName();
-            //todo in the future , when we support annotation we can use this
-            //JAnnotation[] annotations = jclass.getAnnotations();
-
-            /**
-             * Schema genertaion done in two stage
-             *  1. Load all the methods and create type for methods parameters (if the parameters are
-             *     Bean then it will create Complex types for those , and if the parameters are simple
-             *     type which decribe in SimpleTypeTable nothing will happen)
-             *  2. In the next stage for all the methods messages and port types will be
-             *     creteated
-             */
-            methods = jclass.getDeclaredMethods();
-
-            for (int i = 0; i < methods.length; i++) {
-                JMethod jMethod = methods[i];
-                //no need to think abt this method , since that is system config method
-                if (jMethod.getSimpleName().equals("init"))
-                    continue;
-
-                //it can easily get the annotations
-//                jMethod.getAnnotations();
-                JParameter [] paras = jMethod.getParameters();
-                for (int j = 0; j < paras.length; j++) {
-                    JParameter methodParameter = paras[j];
-                    JClass paraType = methodParameter.getType();
-                    String classTypeName = paraType.getQualifiedName();
-                    if (paraType.isArrayType()) {
-                        classTypeName = paraType.getArrayComponentType().getQualifiedName();
-                        if (!typeTable.isSimpleType(classTypeName)) {
-                            generateSchema(paraType.getArrayComponentType());
-                        }
-                    } else {
-                        if (!typeTable.isSimpleType(classTypeName)) {
-                            generateSchema(methodParameter.getType());
-                        }
-                    }
-                    /**
-                     * 1. have to check whethet its a simple type
-                     * 2. then to check whther its a simple type array
-                     * 3. OM elemney
-                     * 4. Bean
-                     */
-
-                }
-                // for its return type
-                JClass retuenType = jMethod.getReturnType();
-                if (!retuenType.isVoidType()) {
-                    if (retuenType.isArrayType()) {
-                        String returnTypeName = retuenType.getArrayComponentType().getQualifiedName();
-                        if (!typeTable.isSimpleType(returnTypeName)) {
-                            generateSchema(retuenType.getArrayComponentType());
-                        }
-                    } else {
-                        if (!typeTable.isSimpleType(retuenType.getQualifiedName())) {
-                            generateSchema(retuenType);
-                        }
-                    }
-                }
-
-            }
-            generateWrapperElements(methods);
-        }
-        return schema;
-    }
-
-    /**
-     * To generate wrapper element , if a method take more than one parameter
-     * if the method look like foo(Type1 para1, Type2 para2){}
-     * will creat e Wrapper element like
-     * <element name="fooInParameter type="tns:fooInParameterElement"">
-     * <complexType name="fooInParameterElement">
-     * <sequnce>
-     * <element name="para1" type="tns:Type1">
-     * <element name="para2" type="tns:Type2">
-     * </sequnce>
-     * </complexType>
-     * </element>
-     */
-    private void generateWrapperElements(JMethod methods[]) {
-        for (int i = 0; i < methods.length; i++) {
-            JMethod method = methods[i];
-            if (method.getSimpleName().equals("init"))
-                continue;
-            genereteWrapperElementforMethod(method);
-        }
-    }
-
-    private void genereteWrapperElementforMethod(JMethod method) {
-        String methodName = method.getSimpleName();
-        XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
-        XmlSchemaSequence sequence = new XmlSchemaSequence();
-
-        XmlSchemaElement eltOuter = new XmlSchemaElement();
-        eltOuter.setName(methodName + METHOD_REQUEST_WRAPPER);
-//        String complexTypeName = methodName + METHOD_REQUEST_WRAPPER;
-//        complexType.setName(complexTypeName);
-        schema.getItems().add(eltOuter);
-//        schema.getItems().add(complexType);
-//        eltOuter.setSchemaTypeName(complexType.getQName());
-        eltOuter.setSchemaType(complexType);
-        // adding this type to the table
-        QName elementName = new QName(this.scheamTargetNameSpace,
-                eltOuter.getName(), this.scheam_namespace_prefix);
-        typeTable.addComplexScheam(methodName + METHOD_REQUEST_WRAPPER, elementName);
-
-        JParameter [] paras = method.getParameters();
-        if (paras.length > 0) {
-            complexType.setParticle(sequence);
-        }
-        String parameterNames [] = null;
-        if (paras.length > 0) {
-            parameterNames = methodTable.getParameterNames(methodName);
-        }
-        for (int j = 0; j < paras.length; j++) {
-            JParameter methodParameter = paras[j];
-            String paraName = methodParameter.getSimpleName();
-            String classTypeName = methodParameter.getType().getQualifiedName();
-            boolean isArryType = methodParameter.getType().isArrayType();
-            if (isArryType) {
-                classTypeName = methodParameter.getType().getArrayComponentType().getQualifiedName();
-            }
-
-            if (parameterNames != null) {
-                paraName = parameterNames[j];
-            }
-
-            if (typeTable.isSimpleType(classTypeName)) {
-                XmlSchemaElement elt1 = new XmlSchemaElement();
-                elt1.setName(paraName);
-                elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(classTypeName));
-                sequence.getItems().add(elt1);
-                if (isArryType) {
-                    elt1.setMaxOccurs(Long.MAX_VALUE);
-                }
-            } else {
-                XmlSchemaElement elt1 = new XmlSchemaElement();
-                elt1.setName(paraName);
-                elt1.setSchemaTypeName(typeTable.getComplexScheamType(classTypeName));
-                sequence.getItems().add(elt1);
-                if (isArryType) {
-                    elt1.setMaxOccurs(Long.MAX_VALUE);
-                }
-            }
-        }
-
-        //generating wrapper element for retuen element
-        JClass methodReturnType = method.getReturnType();
-        generateWrapperforReturnType(methodReturnType, methodName);
-
-    }
-
-    private void generateWrapperforReturnType(JClass retuenType, String methodName) {
-        if (!retuenType.isVoidType()) {
-            XmlSchemaComplexType retuen_com_type = new XmlSchemaComplexType(schema);
-            XmlSchemaElement ret_eltOuter = new XmlSchemaElement();
-            ret_eltOuter.setName(methodName + METHOD_RESPONSE_WRAPPER);
-            schema.getItems().add(ret_eltOuter);
-            ret_eltOuter.setSchemaType(retuen_com_type);
-            QName ret_comTypeName = new QName(this.scheamTargetNameSpace,
-                    ret_eltOuter.getName(), this.scheam_namespace_prefix);
-            typeTable.addComplexScheam(methodName + METHOD_RESPONSE_WRAPPER, ret_comTypeName);
-            String classTypeName = retuenType.getQualifiedName();
-            boolean isArryType = retuenType.isArrayType();
-            XmlSchemaSequence sequence = new XmlSchemaSequence();
-            retuen_com_type.setParticle(sequence);
-            if (isArryType) {
-                classTypeName = retuenType.getArrayComponentType().getQualifiedName();
-            }
-            if (typeTable.isSimpleType(classTypeName)) {
-                XmlSchemaElement elt1 = new XmlSchemaElement();
-                elt1.setName("return");
-                elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(classTypeName));
-                sequence.getItems().add(elt1);
-                if (isArryType) {
-                    elt1.setMaxOccurs(Long.MAX_VALUE);
-                }
-            } else {
-                XmlSchemaElement elt1 = new XmlSchemaElement();
-                elt1.setName("return");
-                elt1.setSchemaTypeName(typeTable.getComplexScheamType(classTypeName));
-                sequence.getItems().add(elt1);
-                if (isArryType) {
-                    elt1.setMaxOccurs(Long.MAX_VALUE);
-                }
-            }
-        }
-    }
-
-
-    private void generateSchema(JClass javaType) {
-        String name = javaType.getQualifiedName();
-        if (typeTable.getComplexScheamType(name) == null) {
-            String simpleName = javaType.getSimpleName();
-
-            XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
-            XmlSchemaSequence sequence = new XmlSchemaSequence();
-
-            XmlSchemaElement eltOuter = new XmlSchemaElement();
-            QName elemntName = new QName(this.scheamTargetNameSpace, simpleName, this.scheam_namespace_prefix);
-            eltOuter.setName(simpleName);
-            eltOuter.setQName(elemntName);
-            complexType.setParticle(sequence);
-            complexType.setName(simpleName);
-
-            schema.getItems().add(eltOuter);
-            schema.getItems().add(complexType);
-            eltOuter.setSchemaTypeName(complexType.getQName());
-//            System.out.println("QNAme: " + eltOuter.getQName().getPrefix());
-
-            // adding this type to the table
-            //  typeTable.addComplexScheam(name, complexType.getQName());
-            typeTable.addComplexScheam(name, eltOuter.getQName());
-
-            JProperty [] properties = javaType.getDeclaredProperties();
-            for (int i = 0; i < properties.length; i++) {
-                JProperty property = properties[i];
-                String propertyName = property.getType().getQualifiedName();
-                boolean isArryType = property.getType().isArrayType();
-                if (isArryType) {
-                    propertyName = property.getType().getArrayComponentType().getQualifiedName();
-                }
-                if (typeTable.isSimpleType(propertyName)) {
-                    XmlSchemaElement elt1 = new XmlSchemaElement();
-                    elt1.setName(property.getSimpleName());
-                    elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(propertyName));
-                    sequence.getItems().add(elt1);
-                    if (isArryType) {
-                        elt1.setMaxOccurs(Long.MAX_VALUE);
-//                        elt1.setMinOccurs(2);
-                    }
-                } else {
-                    if (isArryType) {
-                        generateSchema(property.getType().getArrayComponentType());
-                    } else {
-                        generateSchema(property.getType());
-                    }
-                    XmlSchemaElement elt1 = new XmlSchemaElement();
-                    elt1.setName(property.getSimpleName());
-                    elt1.setSchemaTypeName(typeTable.getComplexScheamType(propertyName));
-                    sequence.getItems().add(elt1);
-                    if (isArryType) {
-                        elt1.setMaxOccurs(Long.MAX_VALUE);
-                    }
-                }
-            }
-        }
-    }
-
-    public TypeTable getTypeTable() {
-        return typeTable;
-    }
-
-    public JMethod[] getMethods() {
-        return methods;
-    }
-
-}
\ No newline at end of file
+package org.apache.axis2.wsdl.java2wsdl;
+
+import org.apache.axis2.wsdl.java2wsdl.bytecode.MethodTable;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaComplexType;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaForm;
+import org.apache.ws.commons.schema.XmlSchemaSequence;
+import org.codehaus.jam.JClass;
+import org.codehaus.jam.JMethod;
+import org.codehaus.jam.JParameter;
+import org.codehaus.jam.JProperty;
+import org.codehaus.jam.JamClassIterator;
+import org.codehaus.jam.JamService;
+import org.codehaus.jam.JamServiceFactory;
+import org.codehaus.jam.JamServiceParams;
+
+import javax.xml.namespace.QName;
+import java.util.Hashtable;
+/*
+* 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.
+*
+*/
+
+public class SchemaGenerator {
+
+    protected Log log = LogFactory.getLog(getClass());
+    private ClassLoader classLoader;
+    private String className;
+    private XmlSchema schema;
+    private TypeTable typeTable;
+    // to keep loadded method using JAM
+    private JMethod methods [];
+    //to store byte code method using Axis 1.x codes
+    private MethodTable methodTable;
+
+    public static String METHOD_REQUEST_WRAPPER = "Request";
+    public static String METHOD_RESPONSE_WRAPPER = "Response";
+    public static String TARGET_NAMESPACE = "http://org.apache.axis2/";
+    public static String SCHEMA_TARGET_NAMESPACE = "http://org.apache.axis2/xsd";
+    public static String SCHEMA_NAMESPACE_PRFIX = "ns1";
+    public static String TARGET_NAMESPACE_PREFIX = "tns";
+    private String schemaTargetNameSpace;
+    private String schema_namespace_prefix;
+
+    public SchemaGenerator(ClassLoader loader, String className,
+                           String schematargetNamespace,
+                           String schematargetNamespacePrefix) {
+        this.classLoader = loader;
+        this.className = className;
+//        TARGET_NAMESPACE = "http://" + className;
+        if (schematargetNamespace != null && !schematargetNamespace.trim().equals("")) {
+            this.schemaTargetNameSpace = schematargetNamespace;
+        } else {
+            this.schemaTargetNameSpace = SCHEMA_TARGET_NAMESPACE;
+        }
+        if (schematargetNamespacePrefix != null && !schematargetNamespacePrefix.trim().equals("")) {
+            this.schema_namespace_prefix = schematargetNamespacePrefix;
+        } else {
+            this.schema_namespace_prefix = SCHEMA_NAMESPACE_PRFIX;
+        }
+        Hashtable prefixmap = new Hashtable();
+        prefixmap.put(this.schema_namespace_prefix, this.schemaTargetNameSpace);
+
+        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
+
+        schema = new XmlSchema(this.schemaTargetNameSpace, schemaCollection);
+        schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
+        schema.setPrefixToNamespaceMap(prefixmap);
+        this.typeTable = new TypeTable();
+
+        try {
+            Class clazz = Class.forName(className, true, loader);
+            methodTable = new MethodTable(clazz);
+        } catch (Exception e) {
+            log.info("Error in loading service impl class for byte code reading : " + e.getMessage());
+        }
+    }
+
+    /**
+     * Generates schema for all the parameters in method. First generates schema
+     * for all different parameter type and later refers to them.
+     *
+     * @return Returns XmlSchema.
+     * @throws Exception
+     */
+    public XmlSchema generateSchema() throws Exception {
+
+        JamServiceFactory factory = JamServiceFactory.getInstance();
+        JamServiceParams jam_service_parms = factory.createServiceParams();
+        //setting the classLoder
+//        jam_service_parms.setParentClassLoader(factory.createJamClassLoader(classLoader));
+        //it can posible to add the classLoader as well
+        jam_service_parms.addClassLoader(classLoader);
+        jam_service_parms.includeClass(className);
+        JamService service = factory.createService(jam_service_parms);
+
+        JamClassIterator jClassIter = service.getClasses();
+        //all most all the time the ittr will have only one class in it
+        while (jClassIter.hasNext()) {
+            JClass jclass = (JClass) jClassIter.next();
+            // serviceName = jclass.getSimpleName();
+            //todo in the future , when we support annotation we can use this
+            //JAnnotation[] annotations = jclass.getAnnotations();
+
+            /**
+             * Schema genertaion done in two stage
+             *  1. Load all the methods and create type for methods parameters (if the parameters are
+             *     Bean then it will create Complex types for those , and if the parameters are simple
+             *     type which decribe in SimpleTypeTable nothing will happen)
+             *  2. In the next stage for all the methods messages and port types will be
+             *     creteated
+             */
+            methods = jclass.getDeclaredMethods();
+
+            for (int i = 0; i < methods.length; i++) {
+                JMethod jMethod = methods[i];
+                //no need to think abt this method , since that is system config method
+                if (jMethod.getSimpleName().equals("init"))
+                    continue;
+
+                //it can easily get the annotations
+//                jMethod.getAnnotations();
+                JParameter [] paras = jMethod.getParameters();
+                for (int j = 0; j < paras.length; j++) {
+                    JParameter methodParameter = paras[j];
+                    JClass paraType = methodParameter.getType();
+                    String classTypeName = paraType.getQualifiedName();
+                    if (paraType.isArrayType()) {
+                        classTypeName = paraType.getArrayComponentType().getQualifiedName();
+                        if (!typeTable.isSimpleType(classTypeName)) {
+                            generateSchema(paraType.getArrayComponentType());
+                        }
+                    } else {
+                        if (!typeTable.isSimpleType(classTypeName)) {
+                            generateSchema(methodParameter.getType());
+                        }
+                    }
+                    /**
+                     * 1. have to check whethet its a simple type
+                     * 2. then to check whther its a simple type array
+                     * 3. OM elemney
+                     * 4. Bean
+                     */
+
+                }
+                // for its return type
+                JClass retuenType = jMethod.getReturnType();
+                if (!retuenType.isVoidType()) {
+                    if (retuenType.isArrayType()) {
+                        String returnTypeName = retuenType.getArrayComponentType().getQualifiedName();
+                        if (!typeTable.isSimpleType(returnTypeName)) {
+                            generateSchema(retuenType.getArrayComponentType());
+                        }
+                    } else {
+                        if (!typeTable.isSimpleType(retuenType.getQualifiedName())) {
+                            generateSchema(retuenType);
+                        }
+                    }
+                }
+
+            }
+            generateWrapperElements(methods);
+        }
+        return schema;
+    }
+
+    /**
+     * Generates wrapper element. If a method takes more than one parameter
+     * e.g. foo(Type1 para1, Type2 para2){} creates a Wrapper element like
+     * <element name="fooInParameter type="tns:fooInParameterElement"">
+     * <complexType name="fooInParameterElement">
+     * <sequnce>
+     * <element name="para1" type="tns:Type1">
+     * <element name="para2" type="tns:Type2">
+     * </sequnce>
+     * </complexType>
+     * </element>
+     */
+    private void generateWrapperElements(JMethod methods[]) {
+        for (int i = 0; i < methods.length; i++) {
+            JMethod method = methods[i];
+            if (method.getSimpleName().equals("init"))
+                continue;
+            genereteWrapperElementforMethod(method);
+        }
+    }
+
+    private void genereteWrapperElementforMethod(JMethod method) {
+        String methodName = method.getSimpleName();
+        XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
+        XmlSchemaSequence sequence = new XmlSchemaSequence();
+
+        XmlSchemaElement eltOuter = new XmlSchemaElement();
+        eltOuter.setName(methodName + METHOD_REQUEST_WRAPPER);
+//        String complexTypeName = methodName + METHOD_REQUEST_WRAPPER;
+//        complexType.setName(complexTypeName);
+        schema.getItems().add(eltOuter);
+//        schema.getItems().add(complexType);
+//        eltOuter.setSchemaTypeName(complexType.getQName());
+        eltOuter.setSchemaType(complexType);
+        // adding this type to the table
+        QName elementName = new QName(this.schemaTargetNameSpace,
+                eltOuter.getName(), this.schema_namespace_prefix);
+        typeTable.addComplexScheam(methodName + METHOD_REQUEST_WRAPPER, elementName);
+
+        JParameter [] paras = method.getParameters();
+        if (paras.length > 0) {
+            complexType.setParticle(sequence);
+        }
+        String parameterNames [] = null;
+        if (paras.length > 0) {
+            parameterNames = methodTable.getParameterNames(methodName);
+        }
+        for (int j = 0; j < paras.length; j++) {
+            JParameter methodParameter = paras[j];
+            String paraName = methodParameter.getSimpleName();
+            String classTypeName = methodParameter.getType().getQualifiedName();
+            boolean isArryType = methodParameter.getType().isArrayType();
+            if (isArryType) {
+                classTypeName = methodParameter.getType().getArrayComponentType().getQualifiedName();
+            }
+
+            if (parameterNames != null) {
+                paraName = parameterNames[j];
+            }
+
+            if (typeTable.isSimpleType(classTypeName)) {
+                XmlSchemaElement elt1 = new XmlSchemaElement();
+                elt1.setName(paraName);
+                elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(classTypeName));
+                sequence.getItems().add(elt1);
+                if (isArryType) {
+                    elt1.setMaxOccurs(Long.MAX_VALUE);
+                }
+            } else {
+                XmlSchemaElement elt1 = new XmlSchemaElement();
+                elt1.setName(paraName);
+                elt1.setSchemaTypeName(typeTable.getComplexScheamType(classTypeName));
+                sequence.getItems().add(elt1);
+                if (isArryType) {
+                    elt1.setMaxOccurs(Long.MAX_VALUE);
+                }
+            }
+        }
+
+        //generating wrapper element for retuen element
+        JClass methodReturnType = method.getReturnType();
+        generateWrapperforReturnType(methodReturnType, methodName);
+
+    }
+
+    private void generateWrapperforReturnType(JClass retuenType, String methodName) {
+        if (!retuenType.isVoidType()) {
+            XmlSchemaComplexType retuen_com_type = new XmlSchemaComplexType(schema);
+            XmlSchemaElement ret_eltOuter = new XmlSchemaElement();
+            ret_eltOuter.setName(methodName + METHOD_RESPONSE_WRAPPER);
+            schema.getItems().add(ret_eltOuter);
+            ret_eltOuter.setSchemaType(retuen_com_type);
+            QName ret_comTypeName = new QName(this.schemaTargetNameSpace,
+                    ret_eltOuter.getName(), this.schema_namespace_prefix);
+            typeTable.addComplexScheam(methodName + METHOD_RESPONSE_WRAPPER, ret_comTypeName);
+            String classTypeName = retuenType.getQualifiedName();
+            boolean isArryType = retuenType.isArrayType();
+            XmlSchemaSequence sequence = new XmlSchemaSequence();
+            retuen_com_type.setParticle(sequence);
+            if (isArryType) {
+                classTypeName = retuenType.getArrayComponentType().getQualifiedName();
+            }
+            if (typeTable.isSimpleType(classTypeName)) {
+                XmlSchemaElement elt1 = new XmlSchemaElement();
+                elt1.setName("return");
+                elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(classTypeName));
+                sequence.getItems().add(elt1);
+                if (isArryType) {
+                    elt1.setMaxOccurs(Long.MAX_VALUE);
+                }
+            } else {
+                XmlSchemaElement elt1 = new XmlSchemaElement();
+                elt1.setName("return");
+                elt1.setSchemaTypeName(typeTable.getComplexScheamType(classTypeName));
+                sequence.getItems().add(elt1);
+                if (isArryType) {
+                    elt1.setMaxOccurs(Long.MAX_VALUE);
+                }
+            }
+        }
+    }
+
+
+    private void generateSchema(JClass javaType) {
+        String name = javaType.getQualifiedName();
+        if (typeTable.getComplexScheamType(name) == null) {
+            String simpleName = javaType.getSimpleName();
+
+            XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
+            XmlSchemaSequence sequence = new XmlSchemaSequence();
+
+            XmlSchemaElement eltOuter = new XmlSchemaElement();
+            QName elemntName = new QName(this.schemaTargetNameSpace, simpleName, this.schema_namespace_prefix);
+            eltOuter.setName(simpleName);
+            eltOuter.setQName(elemntName);
+            complexType.setParticle(sequence);
+            complexType.setName(simpleName);
+
+            schema.getItems().add(eltOuter);
+            schema.getItems().add(complexType);
+            eltOuter.setSchemaTypeName(complexType.getQName());
+//            System.out.println("QNAme: " + eltOuter.getQName().getPrefix());
+
+            // adding this type to the table
+            //  typeTable.addComplexScheam(name, complexType.getQName());
+            typeTable.addComplexScheam(name, eltOuter.getQName());
+
+            JProperty [] properties = javaType.getDeclaredProperties();
+            for (int i = 0; i < properties.length; i++) {
+                JProperty property = properties[i];
+                String propertyName = property.getType().getQualifiedName();
+                boolean isArryType = property.getType().isArrayType();
+                if (isArryType) {
+                    propertyName = property.getType().getArrayComponentType().getQualifiedName();
+                }
+                if (typeTable.isSimpleType(propertyName)) {
+                    XmlSchemaElement elt1 = new XmlSchemaElement();
+                    elt1.setName(property.getSimpleName());
+                    elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(propertyName));
+                    sequence.getItems().add(elt1);
+                    if (isArryType) {
+                        elt1.setMaxOccurs(Long.MAX_VALUE);
+//                        elt1.setMinOccurs(2);
+                    }
+                } else {
+                    if (isArryType) {
+                        generateSchema(property.getType().getArrayComponentType());
+                    } else {
+                        generateSchema(property.getType());
+                    }
+                    XmlSchemaElement elt1 = new XmlSchemaElement();
+                    elt1.setName(property.getSimpleName());
+                    elt1.setSchemaTypeName(typeTable.getComplexScheamType(propertyName));
+                    sequence.getItems().add(elt1);
+                    if (isArryType) {
+                        elt1.setMaxOccurs(Long.MAX_VALUE);
+                    }
+                }
+            }
+        }
+    }
+
+    public TypeTable getTypeTable() {
+        return typeTable;
+    }
+
+    public JMethod[] getMethods() {
+        return methods;
+    }
+
+}

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/TypeTable.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/TypeTable.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/TypeTable.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/TypeTable.java Fri Jan  6 11:46:16 2006
@@ -105,8 +105,8 @@
         return false;
     }
 
-    public void addComplexScheam(String name, QName scheamType) {
-        complecTypeMap.put(name, scheamType);
+    public void addComplexScheam(String name, QName schemaType) {
+        complecTypeMap.put(name, schemaType);
     }
 
     public QName getComplexScheamType(String name) {

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/writer/WOMtoWSDL11Writer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/writer/WOMtoWSDL11Writer.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/writer/WOMtoWSDL11Writer.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/writer/WOMtoWSDL11Writer.java Fri Jan  6 11:46:16 2006
@@ -591,17 +591,17 @@
 
     }
 
-    //to write scheam types into output straem
+    //to write schema types into output straem
     private void writeSchemas(Element element) throws XMLStreamException {
         writer.flush();
-        String scheamTypes = DOM2Writer.nodeToString(element);
+        String schemaTypes = DOM2Writer.nodeToString(element);
         XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(new
-                ByteArrayInputStream(scheamTypes.getBytes()));
+                ByteArrayInputStream(schemaTypes.getBytes()));
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
         StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
-        OMElement scheamElement = staxOMBuilder.getDocumentElement();
-        scheamElement.serialize(writer);
+        OMElement schemaElement = staxOMBuilder.getDocumentElement();
+        schemaElement.serialize(writer);
     }
     
     protected void writeExtensibilityAttribute(WSDLExtensibilityAttribute extAttribute) throws XMLStreamException {

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/utils/IOUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/utils/IOUtils.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/utils/IOUtils.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/utils/IOUtils.java Fri Jan  6 11:46:16 2006
@@ -27,9 +27,7 @@
     }
 
     /**
-     * Read into a byte array; tries to ensure that the the
-     * full buffer is read.
-     * <p/>
+     * Reads into a byte array. Ensures that the full buffer is read.
      * Helper method, just calls <tt>readFully(in, b, 0, b.length)</tt>
      *
      * @see #readFully(java.io.InputStream, byte[], int, int)
@@ -42,9 +40,8 @@
     /**
      * Same as the normal <tt>in.read(b, off, len)</tt>, but tries to ensure that
      * the entire len number of bytes is read.
-     * <p/>
-     *
-     * @returns the number of bytes read, or -1 if the end of file is
+     * 
+     * @return Returns the number of bytes read, or -1 if the end of file is
      * reached before any bytes are read
      */
     public static int readFully(InputStream in, byte[] b, int off, int len)
@@ -61,4 +58,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java Fri Jan  6 11:46:16 2006
@@ -41,9 +41,9 @@
     private XMLStreamWriter writer;
 
     /**
-     * Constructor StreamWriterToContentHandlerConverter
+     * Constructor StreamWriterToContentHandlerConverter.
      *
-     * @param writer
+     * @param omOutput
      */
     public StreamWriterToContentHandlerConverter(org.apache.axis2.om.impl.OMOutputImpl omOutput) {
         this.writer = omOutput.getXmlStreamWriter();

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFault.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFault.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFault.java Fri Jan  6 11:46:16 2006
@@ -88,7 +88,7 @@
     public SOAPFaultDetail getDetail();
 
     /**
-     * This will return if there is an exception in the SOAP fault.
+     * Returns Exception if there is one in the SOAP fault.
      * <p/>
      * If the exception is like;
      * <SOAPFault>
@@ -97,7 +97,7 @@
      * </Detail>
      * </SOAPFault>
      *
-     * @return
+     * @return Returns Exception.
      * @throws org.apache.axis2.om.OMException
      *
      */

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFaultCode.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFaultCode.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFaultCode.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPFaultCode.java Fri Jan  6 11:46:16 2006
@@ -29,7 +29,7 @@
     public void setValue(SOAPFaultValue value) throws SOAPProcessingException;
 
     /**
-     * @return
+     * @return Returns SOAPFaultValue.
      */
     public SOAPFaultValue getValue();
 
@@ -39,7 +39,7 @@
     public void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException;
 
     /**
-     * @return
+     * @return Returns SOAPFaultSubCode.
      */
     public SOAPFaultSubCode getSubCode();
 

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPHeader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPHeader.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPHeader.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/SOAPHeader.java Fri Jan  6 11:46:16 2006
@@ -54,7 +54,7 @@
      * @param role
      *            a <CODE>String</CODE> giving the URI of the role for which
      *            to search
-     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     * @return Returns an <CODE>Iterator</CODE> object over all the <CODE>
      *         SOAPHeaderBlock</CODE> objects that contain the specified role
      * @see #extractHeaderBlocks(java.lang.String)
      *      extractHeaderBlocks(java.lang.String)
@@ -73,7 +73,7 @@
      * @param role
      *            a <CODE>String</CODE> giving the URI of the role for which
      *            to search
-     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     * @return Returns an <CODE>Iterator</CODE> object over all the <CODE>
      *         SOAPHeaderBlock</CODE> objects that contain the specified role
      * @see #examineHeaderBlocks(java.lang.String)
      *      examineHeaderBlocks(java.lang.String)
@@ -89,9 +89,9 @@
      * @param role
      *            a <code>String</code> giving the URI of the role for which
      *            to search
-     * @return an <code>Iterator</code> object over all the
+     * @return Returns an <code>Iterator</code> object over all the
      *         <code>SOAPHeaderBlock</code> objects that contain the specified
-     *         role and are marked as MustUnderstand
+     *         role and are marked as MustUnderstand.
      */
     public abstract Iterator examineMustUnderstandHeaderBlocks(String role);
 
@@ -112,17 +112,17 @@
      * <code>SOAPHeaderBlock</code> objects in this <code>SOAPHeader </code>
      * object and detaches them from this <code>SOAPHeader</code> object.
      *
-     * @return an <code>Iterator</code> object over all the
+     * @return Returns an <code>Iterator</code> object over all the
      *         <code>SOAPHeaderBlock</code> objects contained by this
      *         <code>SOAPHeader</code>
      */
     public abstract Iterator extractAllHeaderBlocks();
 
     /**
-     * Return all the Headers that has the Namespace URI to given NS URI
+     * Return all the Headers that has the Namespace URI to given NS URI.
      *
      * @param nsURI
-     * @return
+     * @return Returns ArrayList.
      */
     public ArrayList getHeaderBlocksWithNSURI(String nsURI);
 }

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPElement.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPElement.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPElement.java Fri Jan  6 11:46:16 2006
@@ -27,7 +27,8 @@
 
     /**
      * @param parent
-     * @param parent
+     * @param localName
+     * @param extractNamespaceFromParent     
      */
     protected SOAPElement(OMElement parent,
                           String localName,

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderBlockImpl.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderBlockImpl.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderBlockImpl.java Fri Jan  6 11:46:16 2006
@@ -41,6 +41,7 @@
     /**
      * @param localName
      * @param ns
+     * @param parent     
      */
     public SOAPHeaderBlockImpl(String localName,
                                OMNamespace ns,
@@ -50,7 +51,7 @@
     }
 
     /**
-     * Constructor SOAPHeaderBlockImpl
+     * Constructor SOAPHeaderBlockImpl.
      *
      * @param localName
      * @param ns
@@ -66,6 +67,7 @@
     /**
      * @param attributeName
      * @param attrValue
+     * @param soapEnvelopeNamespaceURI     
      */
     protected void setAttribute(String attributeName,
                                 String attrValue,
@@ -84,10 +86,11 @@
     }
 
     /**
-     * Method getAttribute
+     * Method getAttribute.
      *
      * @param attrName
-     * @return
+     * @param soapEnvelopeNamespaceURI     
+     * @return Returns String.
      */
     protected String getAttribute(String attrName,
                                   String soapEnvelopeNamespaceURI) {

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilder.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilder.java Fri Jan  6 11:46:16 2006
@@ -95,11 +95,12 @@
     /**
      * Constructor StAXSOAPModelBuilder
      * soapVersion parameter is to give the soap version from the transport. For example, in HTTP case
-     * you can identify the version of the soap message u have recd by looking at the HTTP headers. By passing that
-     * here is to check whether actually the soap message contained also of that version.
-     * If one is not creating the builder from the transport he can just pass null for this.
+     * you can identify the version of the soap message u have recd by looking at the HTTP headers. 
+     * It is used to check whether the actual soap message contained is of that version.
+     * If one is creates the builder from the transport, then can just pass null for version.
      *
      * @param parser
+     * @param soapVersion   parameter is to give the soap version for the transport.  
      */
     public StAXSOAPModelBuilder(XMLStreamReader parser, String soapVersion) {
         super(parser);
@@ -119,9 +120,9 @@
      * @param factory
      * @param soapVersion parameter is to give the soap version from the transport. For example, in
      *                    HTTP case you can identify the version of the soap message u have recd by looking at
-     *                    the HTTP headers. By passing that here is to check whether actually the soap message
-     *                    contained also of that version. If one is not creating the builder from the transport
-     *                    he can just pass null for this.
+     *                    the HTTP headers. It is used to check whether the actual soap message 
+     *                    contained is of that version.If one is creates the builder from the transport, 
+     *                    then can just pass null for version.
      */
     public StAXSOAPModelBuilder(XMLStreamReader parser, SOAPFactory factory, String soapVersion) {
         super(factory, parser);
@@ -179,9 +180,9 @@
 
 
     /**
-     * Method getSOAPEnvelope
+     * Method getSOAPEnvelope.
      *
-     * @return
+     * @return Returns SOAPEnvelope.
      * @throws OMException
      */
     public SOAPEnvelope getSOAPEnvelope() throws OMException {
@@ -192,9 +193,9 @@
     }
 
     /**
-     * Method createOMElement
+     * Method createOMElement.
      *
-     * @return
+     * @return Returns OMNode.
      * @throws OMException
      */
     protected OMNode createOMElement() throws OMException {
@@ -359,36 +360,32 @@
     }
 
     /**
-     * Method createDTD
-     * <p/>
-     * Overriding the default behaviour as a SOAPMessage
-     * should not have a DTD
+     * Method createDTD.
+     * Overriding the default behaviour as a SOAPMessage should not have a DTD.
      */
     protected OMNode createDTD() throws OMException {
         throw new OMException("SOAP message MUST NOT contain a Document Type Declaration(DTD)");
     }
 
     /**
-     * Method createPI
-     * <p/>
-     * Overriding the default behaviour as a SOAP Message
-     * should not have a PI
+     * Method createPI.
+     * Overriding the default behaviour as a SOAP Message should not have a PI.
      */
     protected OMNode createPI() throws OMException {
         throw new OMException("SOAP message MUST NOT contain Processing Instructions(PI)");
     }
 
     /**
-     * Method getDocumentElement
+     * Method getDocumentElement.
      *
-     * @return
+     * @return Returns OMElement.
      */
     public OMElement getDocumentElement() {
         return getSOAPEnvelope();
     }
 
     /**
-     * Method processNamespaceData
+     * Method processNamespaceData.
      *
      * @param node
      * @param isSOAPElement

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/factory/SOAPLinkedListImplFactory.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/factory/SOAPLinkedListImplFactory.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/factory/SOAPLinkedListImplFactory.java Fri Jan  6 11:46:16 2006
@@ -205,7 +205,7 @@
     /**
      * Method getDefaultEnvelope
      *
-     * @return
+     * @return Returns SOAPEnvelope.
      */
     public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
         throw new UnsupportedOperationException();