axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r289289 [115/134] - in /webservices/axis2/trunk/java: ./ etc/ modules/addressing/ modules/addressing/src/META-INF/ modules/addressing/src/org/apache/axis2/handlers/addressing/ modules/addressing/test-resources/ modules/addressing/test/org/a...
Date Thu, 15 Sep 2005 19:07:03 GMT
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOperationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOperationImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOperationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOperationImpl.java Thu Sep 15 11:52:11 2005
@@ -1,237 +1,237 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl.impl;
-
-import org.apache.wsdl.MessageReference;
-import org.apache.wsdl.WSDLFaultReference;
-import org.apache.wsdl.WSDLOperation;
-import org.apache.wsdl.WSDLService;
-
-import javax.xml.namespace.QName;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author Chathura Herath
- */
-public class WSDLOperationImpl extends ExtensibleComponentImpl
-        implements WSDLOperation {
-    /**
-     * Field name
-     */
-    private QName name;
-
-    /**
-     * URI of the MEP
-     */
-    private String messageExchangePattern;
-
-    /**
-     * Field inputMessage
-     */
-    private MessageReference inputMessage;
-
-    /**
-     * Field outputMessage
-     */
-    private MessageReference outputMessage;
-
-    /**
-     * Field infaults
-     */
-    private List infaults = new LinkedList();
-
-    /**
-     * Field outfaults
-     */
-    private List outfaults = new LinkedList();
-
-    // value of parent if not specified
-
-    /**
-     * Field style
-     */
-    private String style = WSDLService.STYLE_DOC;
-
-    /**
-     * Field safety
-     */
-    private boolean safety = false;
-
-    /**
-     * Method getInfaults
-     *
-     * @return
-     */
-    public List getInfaults() {
-        return infaults;
-    }
-
-    /**
-     * Method setInfaults
-     *
-     * @param infaults
-     */
-    public void setInfaults(List infaults) {
-        this.infaults = infaults;
-    }
-
-    /**
-     * Method getInputMessage
-     *
-     * @return
-     */
-    public MessageReference getInputMessage() {
-        return inputMessage;
-    }
-
-    /**
-     * Method setInputMessage
-     *
-     * @param inputMessage
-     */
-    public void setInputMessage(MessageReference inputMessage) {
-        this.inputMessage = inputMessage;
-    }
-
-    /**
-     * Method getMessageExchangePattern
-     *
-     * @return
-     */
-    public String getMessageExchangePattern() {
-        return messageExchangePattern;
-    }
-
-    /**
-     * Method setMessageExchangePattern
-     *
-     * @param messageExchangePattern
-     */
-    public void setMessageExchangePattern(String messageExchangePattern) {
-        this.messageExchangePattern = messageExchangePattern;
-    }
-
-    /**
-     * Method getName
-     *
-     * @return
-     */
-    public QName getName() {
-        return name;
-    }
-
-    /**
-     * Method setName
-     *
-     * @param name
-     */
-    public void setName(QName name) {
-        this.name = name;
-    }
-
-    /**
-     * Method getOutfaults
-     *
-     * @return
-     */
-    public List getOutfaults() {
-        return outfaults;
-    }
-
-    /**
-     * Method setOutfaults
-     *
-     * @param outfaults
-     */
-    public void setOutfaults(List outfaults) {
-        this.outfaults = outfaults;
-    }
-
-    /**
-     * Method getOutputMessage
-     *
-     * @return
-     */
-    public MessageReference getOutputMessage() {
-        return outputMessage;
-    }
-
-    /**
-     * Method setOutputMessage
-     *
-     * @param outputMessage
-     */
-    public void setOutputMessage(MessageReference outputMessage) {
-        this.outputMessage = outputMessage;
-    }
-
-    /**
-     * Method isSafe
-     *
-     * @return
-     */
-    public boolean isSafe() {
-        return safety;
-    }
-
-    /**
-     * Method setSafety
-     *
-     * @param safe
-     */
-    public void setSafety(boolean safe) {
-        this.safety = safe;
-    }
-
-    public String getStyle() {
-        return style;
-    }
-
-    public void setStyle(String style) {
-        this.style = style;
-    }
-
-    /**
-     * Will return the Namespace of the QName of this <code>WSDLOperation</code>. Will return null if not set.
-     *
-     * @return
-     */
-    public String getTargetnamespace() {
-        if (null != this.name) {
-            return this.name.getNamespaceURI();
-        }
-        return null;
-    }
-
-    /**
-     * Add the InFault to the Components InFaults
-     *
-     * @param inFault
-     */
-    public void addInFault(WSDLFaultReference inFault) {
-        this.infaults.add(inFault);
-    }
-
-    /**
-     * Add the OutFault to the Component OutFaults
-     *
-     * @param outFault
-     */
-    public void addOutFault(WSDLFaultReference outFault) {
-        this.outfaults.add(outFault);
-    }
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl.impl;
+
+import org.apache.wsdl.MessageReference;
+import org.apache.wsdl.WSDLFaultReference;
+import org.apache.wsdl.WSDLOperation;
+import org.apache.wsdl.WSDLService;
+
+import javax.xml.namespace.QName;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @author Chathura Herath
+ */
+public class WSDLOperationImpl extends ExtensibleComponentImpl
+        implements WSDLOperation {
+    /**
+     * Field name
+     */
+    private QName name;
+
+    /**
+     * URI of the MEP
+     */
+    private String messageExchangePattern;
+
+    /**
+     * Field inputMessage
+     */
+    private MessageReference inputMessage;
+
+    /**
+     * Field outputMessage
+     */
+    private MessageReference outputMessage;
+
+    /**
+     * Field infaults
+     */
+    private List infaults = new LinkedList();
+
+    /**
+     * Field outfaults
+     */
+    private List outfaults = new LinkedList();
+
+    // value of parent if not specified
+
+    /**
+     * Field style
+     */
+    private String style = WSDLService.STYLE_DOC;
+
+    /**
+     * Field safety
+     */
+    private boolean safety = false;
+
+    /**
+     * Method getInfaults
+     *
+     * @return
+     */
+    public List getInfaults() {
+        return infaults;
+    }
+
+    /**
+     * Method setInfaults
+     *
+     * @param infaults
+     */
+    public void setInfaults(List infaults) {
+        this.infaults = infaults;
+    }
+
+    /**
+     * Method getInputMessage
+     *
+     * @return
+     */
+    public MessageReference getInputMessage() {
+        return inputMessage;
+    }
+
+    /**
+     * Method setInputMessage
+     *
+     * @param inputMessage
+     */
+    public void setInputMessage(MessageReference inputMessage) {
+        this.inputMessage = inputMessage;
+    }
+
+    /**
+     * Method getMessageExchangePattern
+     *
+     * @return
+     */
+    public String getMessageExchangePattern() {
+        return messageExchangePattern;
+    }
+
+    /**
+     * Method setMessageExchangePattern
+     *
+     * @param messageExchangePattern
+     */
+    public void setMessageExchangePattern(String messageExchangePattern) {
+        this.messageExchangePattern = messageExchangePattern;
+    }
+
+    /**
+     * Method getName
+     *
+     * @return
+     */
+    public QName getName() {
+        return name;
+    }
+
+    /**
+     * Method setName
+     *
+     * @param name
+     */
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+    /**
+     * Method getOutfaults
+     *
+     * @return
+     */
+    public List getOutfaults() {
+        return outfaults;
+    }
+
+    /**
+     * Method setOutfaults
+     *
+     * @param outfaults
+     */
+    public void setOutfaults(List outfaults) {
+        this.outfaults = outfaults;
+    }
+
+    /**
+     * Method getOutputMessage
+     *
+     * @return
+     */
+    public MessageReference getOutputMessage() {
+        return outputMessage;
+    }
+
+    /**
+     * Method setOutputMessage
+     *
+     * @param outputMessage
+     */
+    public void setOutputMessage(MessageReference outputMessage) {
+        this.outputMessage = outputMessage;
+    }
+
+    /**
+     * Method isSafe
+     *
+     * @return
+     */
+    public boolean isSafe() {
+        return safety;
+    }
+
+    /**
+     * Method setSafety
+     *
+     * @param safe
+     */
+    public void setSafety(boolean safe) {
+        this.safety = safe;
+    }
+
+    public String getStyle() {
+        return style;
+    }
+
+    public void setStyle(String style) {
+        this.style = style;
+    }
+
+    /**
+     * Will return the Namespace of the QName of this <code>WSDLOperation</code>. Will return null if not set.
+     *
+     * @return
+     */
+    public String getTargetnamespace() {
+        if (null != this.name) {
+            return this.name.getNamespaceURI();
+        }
+        return null;
+    }
+
+    /**
+     * Add the InFault to the Components InFaults
+     *
+     * @param inFault
+     */
+    public void addInFault(WSDLFaultReference inFault) {
+        this.infaults.add(inFault);
+    }
+
+    /**
+     * Add the OutFault to the Component OutFaults
+     *
+     * @param outFault
+     */
+    public void addOutFault(WSDLFaultReference outFault) {
+        this.outfaults.add(outFault);
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOperationImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLProcessingException.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLProcessingException.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLProcessingException.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLProcessingException.java Thu Sep 15 11:52:11 2005
@@ -1,30 +1,30 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl.impl;
-
-/**
- * @author chathura@opensource.lk
- */
-public class WSDLProcessingException extends RuntimeException {
-    /**
-     * Constructor WSDLProcessingException
-     *
-     * @param message
-     */
-    public WSDLProcessingException(String message) {
-        super(message);
-    }
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl.impl;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class WSDLProcessingException extends RuntimeException {
+    /**
+     * Constructor WSDLProcessingException
+     *
+     * @param message
+     */
+    public WSDLProcessingException(String message) {
+        super(message);
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLProcessingException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLPropertyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLPropertyImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLPropertyImpl.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLPropertyImpl.java Thu Sep 15 11:52:11 2005
@@ -1,92 +1,92 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl.impl;
-
-import org.apache.wsdl.WSDLProperty;
-
-/**
- * @author chathura@opensource.lk
- */
-public class WSDLPropertyImpl extends ComponentImpl implements WSDLProperty {
-    /**
-     * Field constraint
-     */
-    private Object constraint;
-
-    /**
-     * Field name
-     */
-    private String name;
-
-    /**
-     * Field value
-     */
-    private Object value;
-
-    /**
-     * Method getConstraint
-     *
-     * @return
-     */
-    public Object getConstraint() {
-        return constraint;
-    }
-
-    /**
-     * Method setConstraint
-     *
-     * @param constraint
-     */
-    public void setConstraint(Object constraint) {
-        this.constraint = constraint;
-    }
-
-    /**
-     * Method getName
-     *
-     * @return
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Method setName
-     *
-     * @param name
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Method getValue
-     *
-     * @return
-     */
-    public Object getValue() {
-        return value;
-    }
-
-    /**
-     * Method setValue
-     *
-     * @param value
-     */
-    public void setValue(Object value) {
-        this.value = value;
-    }
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl.impl;
+
+import org.apache.wsdl.WSDLProperty;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class WSDLPropertyImpl extends ComponentImpl implements WSDLProperty {
+    /**
+     * Field constraint
+     */
+    private Object constraint;
+
+    /**
+     * Field name
+     */
+    private String name;
+
+    /**
+     * Field value
+     */
+    private Object value;
+
+    /**
+     * Method getConstraint
+     *
+     * @return
+     */
+    public Object getConstraint() {
+        return constraint;
+    }
+
+    /**
+     * Method setConstraint
+     *
+     * @param constraint
+     */
+    public void setConstraint(Object constraint) {
+        this.constraint = constraint;
+    }
+
+    /**
+     * Method getName
+     *
+     * @return
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Method setName
+     *
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Method getValue
+     *
+     * @return
+     */
+    public Object getValue() {
+        return value;
+    }
+
+    /**
+     * Method setValue
+     *
+     * @param value
+     */
+    public void setValue(Object value) {
+        this.value = value;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLPropertyImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLServiceImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLServiceImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLServiceImpl.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLServiceImpl.java Thu Sep 15 11:52:11 2005
@@ -1,132 +1,132 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl.impl;
-
-import org.apache.wsdl.WSDLEndpoint;
-import org.apache.wsdl.WSDLInterface;
-import org.apache.wsdl.WSDLService;
-
-import javax.xml.namespace.QName;
-import java.util.HashMap;
-
-/**
- * @author chathura@opensource.lk
- */
-public class WSDLServiceImpl extends ComponentImpl implements WSDLService {
-    /**
-     * The QName that identifies the Service. This namespace of the QName
-     * should be the target namespace defined in the Definitions component.
-     */
-    private QName name;
-
-    /**
-     * The Interface that this Service is an instance of.
-     */
-    private WSDLInterface serviceInterface;
-
-    /**
-     *
-     */
-    private HashMap endpoints = new HashMap();
-
-    /**
-     * Method getEndpoints
-     *
-     * @return
-     */
-    public HashMap getEndpoints() {
-        return endpoints;
-    }
-
-    /**
-     * Method setEndpoints
-     *
-     * @param endpoints
-     */
-    public void setEndpoints(HashMap endpoints) {
-        this.endpoints = endpoints;
-    }
-
-    /**
-     * Will add a WSDLEndpoint object to the WOM keyed with qname;
-     *
-     * @param endpoint
-     */
-    public void setEndpoint(WSDLEndpoint endpoint) {
-        this.endpoints.put(endpoint.getName(), endpoint);
-    }
-
-    /**
-     * Endpoint will be retrived by its qname.
-     *
-     * @param qName qname of the Service
-     * @return <code>WSDLEndpoint</code> Object.
-     */
-    public WSDLEndpoint getEndpoint(QName qName) {
-        return (WSDLEndpoint) this.endpoints.get(qName);
-
-    }
-
-    /**
-     * Method getName
-     *
-     * @return
-     */
-    public QName getName() {
-        return name;
-    }
-
-    /**
-     * Method setName
-     *
-     * @param name
-     */
-    public void setName(QName name) {
-        this.name = name;
-    }
-
-    /**
-     * If the Name of the <code>WSDLService</code> is not set a
-     * <code>WSDLProcessingException</code> will be thrown.
-     *
-     * @return Target Namespace as a <code>String</code>
-     */
-    public String getNamespace() {
-        if (null == this.name) {
-            throw new WSDLProcessingException(
-                    "Target Namespace not set and the Service Name is null");
-        }
-        return this.name.getNamespaceURI();
-    }
-
-    /**
-     * Method getServiceInterface
-     *
-     * @return
-     */
-    public WSDLInterface getServiceInterface() {
-        return serviceInterface;
-    }
-
-    /**
-     * Method setServiceInterface
-     *
-     * @param serviceInterface
-     */
-    public void setServiceInterface(WSDLInterface serviceInterface) {
-        this.serviceInterface = serviceInterface;
-    }
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl.impl;
+
+import org.apache.wsdl.WSDLEndpoint;
+import org.apache.wsdl.WSDLInterface;
+import org.apache.wsdl.WSDLService;
+
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class WSDLServiceImpl extends ComponentImpl implements WSDLService {
+    /**
+     * The QName that identifies the Service. This namespace of the QName
+     * should be the target namespace defined in the Definitions component.
+     */
+    private QName name;
+
+    /**
+     * The Interface that this Service is an instance of.
+     */
+    private WSDLInterface serviceInterface;
+
+    /**
+     *
+     */
+    private HashMap endpoints = new HashMap();
+
+    /**
+     * Method getEndpoints
+     *
+     * @return
+     */
+    public HashMap getEndpoints() {
+        return endpoints;
+    }
+
+    /**
+     * Method setEndpoints
+     *
+     * @param endpoints
+     */
+    public void setEndpoints(HashMap endpoints) {
+        this.endpoints = endpoints;
+    }
+
+    /**
+     * Will add a WSDLEndpoint object to the WOM keyed with qname;
+     *
+     * @param endpoint
+     */
+    public void setEndpoint(WSDLEndpoint endpoint) {
+        this.endpoints.put(endpoint.getName(), endpoint);
+    }
+
+    /**
+     * Endpoint will be retrived by its qname.
+     *
+     * @param qName qname of the Service
+     * @return <code>WSDLEndpoint</code> Object.
+     */
+    public WSDLEndpoint getEndpoint(QName qName) {
+        return (WSDLEndpoint) this.endpoints.get(qName);
+
+    }
+
+    /**
+     * Method getName
+     *
+     * @return
+     */
+    public QName getName() {
+        return name;
+    }
+
+    /**
+     * Method setName
+     *
+     * @param name
+     */
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+    /**
+     * If the Name of the <code>WSDLService</code> is not set a
+     * <code>WSDLProcessingException</code> will be thrown.
+     *
+     * @return Target Namespace as a <code>String</code>
+     */
+    public String getNamespace() {
+        if (null == this.name) {
+            throw new WSDLProcessingException(
+                    "Target Namespace not set and the Service Name is null");
+        }
+        return this.name.getNamespaceURI();
+    }
+
+    /**
+     * Method getServiceInterface
+     *
+     * @return
+     */
+    public WSDLInterface getServiceInterface() {
+        return serviceInterface;
+    }
+
+    /**
+     * Method setServiceInterface
+     *
+     * @param serviceInterface
+     */
+    public void setServiceInterface(WSDLInterface serviceInterface) {
+        this.serviceInterface = serviceInterface;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLTypesImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLTypesImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLTypesImpl.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLTypesImpl.java Thu Sep 15 11:52:11 2005
@@ -1,57 +1,57 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl.impl;
-
-import org.apache.wsdl.WSDLExtensibilityElement;
-import org.apache.wsdl.WSDLTypes;
-
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-
-/**
- * @author chathura@opensource.lk
- */
-public class WSDLTypesImpl extends ComponentImpl implements WSDLTypes {
-
-
-    /**
-     * Adds the <code>ExtensionElement</code> to the map keyed with the <code>QName</code>
-     *
-     * @param qName
-     * @param element
-     */
-    public void addElement(WSDLExtensibilityElement element) {
-        this.addExtensibilityElement(element);
-    }
-
-    /**
-     * Will return the first Element with the given <code>QName</code>
-     * Returns null if not found.
-     *
-     * @param qName
-     * @return
-     */
-    public WSDLExtensibilityElement getFirstElement(QName qName) {
-        Iterator iterator = this.getExtensibilityElements().iterator();
-        while (iterator.hasNext()) {
-            WSDLExtensibilityElement temp = (WSDLExtensibilityElement) iterator.next();
-            if (temp.getType().equals(qName))
-                return temp;
-        }
-
-        return null;
-    }
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl.impl;
+
+import org.apache.wsdl.WSDLExtensibilityElement;
+import org.apache.wsdl.WSDLTypes;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class WSDLTypesImpl extends ComponentImpl implements WSDLTypes {
+
+
+    /**
+     * Adds the <code>ExtensionElement</code> to the map keyed with the <code>QName</code>
+     *
+     * @param qName
+     * @param element
+     */
+    public void addElement(WSDLExtensibilityElement element) {
+        this.addExtensibilityElement(element);
+    }
+
+    /**
+     * Will return the first Element with the given <code>QName</code>
+     * Returns null if not found.
+     *
+     * @param qName
+     * @return
+     */
+    public WSDLExtensibilityElement getFirstElement(QName qName) {
+        Iterator iterator = this.getExtensibilityElements().iterator();
+        while (iterator.hasNext()) {
+            WSDLExtensibilityElement temp = (WSDLExtensibilityElement) iterator.next();
+            if (temp.getType().equals(qName))
+                return temp;
+        }
+
+        return null;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLTypesImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/util/Utils.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/util/Utils.java Thu Sep 15 11:52:11 2005
@@ -1,47 +1,47 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl.util;
-
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author Srinath Perera(hemapani@opensource.lk)
- */
-public class Utils {
-    /**
-     * Method newDocument
-     *
-     * @param in
-     * @return
-     * @throws ParserConfigurationException
-     * @throws SAXException
-     * @throws IOException
-     */
-    public static Document newDocument(InputStream in)
-            throws ParserConfigurationException, SAXException, IOException {
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        dbf.setNamespaceAware(true);
-        DocumentBuilder db = dbf.newDocumentBuilder();
-        return db.parse(in);
-    }
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl.util;
+
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class Utils {
+    /**
+     * Method newDocument
+     *
+     * @param in
+     * @return
+     * @throws ParserConfigurationException
+     * @throws SAXException
+     * @throws IOException
+     */
+    public static Document newDocument(InputStream in)
+            throws ParserConfigurationException, SAXException, IOException {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        dbf.setNamespaceAware(true);
+        DocumentBuilder db = dbf.newDocumentBuilder();
+        return db.parse(in);
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/util/Utils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java Thu Sep 15 11:52:11 2005
@@ -1,387 +1,387 @@
-package org.apache.axis2.wsdl.codegen;
-
-import junit.framework.TestCase;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.taskdefs.Javac;
-import org.apache.tools.ant.types.Path;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-/*
-* 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 WSDL2JavaTest extends TestCase{
-
-    public static final String OUTPUT_LOCATION_BASE = "./out_put_classes";
-    public static final String OUTPUT_LOCATION_PREFIX = "/test";
-    private static int folderCount = 0;
-    // public static final String OUTPUT_LOCATION_BASE = "C:\\GeneratedCode\\test4\\src";
-    public static final String WSDL_BASE_DIR = "./test-resources/";
-    public static final String CLASSES_DIR = "/target/classes/";
-    private String[] moduleNames={"xml","common","core"};
-    private static final String MODULE_PATH_PREFIX = "../modules/";
-    private static final String COMPILE_TARGET_NAME = "compile";
-
-
-    /**
-     * Make the root output directory
-     * @throws Exception
-     */
-    protected void setUp() throws Exception {
-        File outputFile = new File(OUTPUT_LOCATION_BASE);
-        if (outputFile.exists() && outputFile.isDirectory()){
-            deleteDir(outputFile);
-            outputFile.mkdir();
-        }else{
-            outputFile.mkdir();
-        }
-    }
-
-    /**
-     *  Remove the root output directory
-     * @throws Exception
-     */
-    protected void tearDown() throws Exception {
-        File outputFile = new File(OUTPUT_LOCATION_BASE);
-        if (outputFile.exists() && outputFile.isDirectory()){
-            deleteDir(outputFile);
-        }
-    }
-
-    /**
-     * Deletes all files and subdirectories under dir.
-     * Returns true if all deletions were successful.
-     * If a deletion fails, the method stops attempting to delete and returns false.
-     */
-    private boolean deleteDir(File dir) {
-        if (dir.isDirectory()) {
-            String[] children = dir.list();
-            for (int i=0; i<children.length; i++) {
-                boolean success = deleteDir(new File(dir, children[i]));
-                if (!success) {
-                    return false;
-                }
-            }
-        }
-
-        // The directory is now empty so delete it
-        return dir.delete();
-    }
-
-    /**
-     * Test for the WSAT wsdl
-     */
-    public void testCodeGenerationWSAT(){
-
-        try {
-            generateAndCompile("wsat.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the WSDL that's missing a service
-     */
-    public void testCodeGenerationNoService(){
-
-        try {
-            generateAndCompile("no-service.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-     /**
-     * Test for the Headers
-     */
-    public void testCodeGenerationHeaders(){
-
-        try {
-            generateAndCompile("headers.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the ping WSDL
-     */
-    public void testCodeGenerationPing(){
-
-        try {
-            generateAndCompile("ping.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-
-    /**
-     * Test for the interoptestdoclitparameters
-     */
-    public void testCodeGenerationInteropTestDocLitParams(){
-
-        try {
-            generateAndCompile("interoptestdoclitparameters.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the sales rank and price!
-     */
-    public void testCodeGenerationSalesRankNPrice(){
-
-        try {
-            generateAndCompile("SalesRankNPrice.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-     /**
-     * Test for the mime doc
-     */
-    public void testCodeGenerationMimeDoc(){
-
-        try {
-            generateAndCompile("mime-doc.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-//     /**
-//     * Test for the dime doc
-//     */
-//    public void testCodeGenerationDimeDoc(){
-//
-//        try {
-//            generateAndCompile("dime-doc.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-//        } catch (CodeGenerationException e) {
-//            fail("Exception while code generation test!"+ e.getMessage());
-//        }
-//    }
-    /**
-     * Test for the wscoor.wsdl
-     */
-    public void testCodeGenerationWSCOOR(){
-
-        try {
-            generateAndCompile("interoptestdoclit.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the modified ping wsdl. it will be the test for the detached schema with only an import
-     * statement
-     */
-    public void testCodeGenerationPingModified(){
-
-        try {
-            generateAndCompile("ping-modified.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the modified ping-unboond wsdl. The binding is removed in this wsdl
-     *
-     */
-    public void testCodeGenerationPingUnbound(){
-
-        try {
-            generateAndCompile("ping-unbound.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the simple doc lit from Axis 1
-     *
-     */
-    public void testCodeGenerationSimpleDocLiteral(){
-
-        try {
-            generateAndCompile("simple-doc-literal.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     * Test for the simple doc lit from Axis 1
-     *
-     */
-    public void testCodeGenerationComplexDocLiteral(){
-
-        try {
-            generateAndCompile("complex-doc-literal.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-    /**
-     * Test for the mtom echo wsdl. This wsdl contains a restriction based on xmime and a
-     * SOAP 1.2 binding
-     *
-     */
-    public void testCodeGenerationMTOMEcho(){
-
-        try {
-            generateAndCompile("mtomecho.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
-        } catch (CodeGenerationException e) {
-            fail("Exception while code generation test!"+ e.getMessage());
-        }
-    }
-
-    /**
-     *
-     * @param wsdlName
-     * @param outputLocation
-     * @throws CodeGenerationException
-     */
-    private void generateAndCompile(String wsdlName, String outputLocation) throws CodeGenerationException {
-        codeGenerate(WSDL_BASE_DIR + wsdlName,outputLocation);
-        //todo - Still the compilation fails (the original problem of the java.home was settled by setting fork
-        //todo - to true). Now the compiler fails for some unknown reason (inside maven! works fine in the IDE though)
-
-        //compile(outputLocation);
-    }
-
-    /**
-     *
-     * @param wsdlFile
-     * @param outputLocation
-     * @throws CodeGenerationException
-     */
-    private void codeGenerate(String wsdlFile,String outputLocation) throws CodeGenerationException {
-        //create the option map
-        Map optionMap = fillOptionMap(wsdlFile,outputLocation);
-        CommandLineOptionParser parser =
-                new CommandLineOptionParser(optionMap);
-        new CodeGenerationEngine(parser).generate();
-    }
-
-    /**
-     *
-     * @param outputLocation
-     */
-    private void compile(String outputLocation){
-        //using the ant javac task for compilation
-        Javac javaCompiler = new Javac();
-        Project codeGenProject = new Project();
-        Target compileTarget = new Target();
-
-        compileTarget.setName(COMPILE_TARGET_NAME);
-        compileTarget.addTask(javaCompiler);
-        codeGenProject.addTarget(compileTarget);
-        codeGenProject.setSystemProperties();
-        javaCompiler.setProject(codeGenProject);
-        javaCompiler.setIncludejavaruntime(true);
-        javaCompiler.setIncludeantruntime(true);
-
-        /*
-          This harmless looking setFork is actually very important. unless the compiler is
-          forked it wont work!
-        */
-        javaCompiler.setFork(true);
-
-        //Create classpath - The generated output directories also become part of the classpath
-        //reason for this is that some codegenerators(XMLBeans) produce compiled classes as part of
-        //generated artifacts
-        File outputLocationFile = new File(outputLocation);
-        Path classPath = new Path(codeGenProject,outputLocation) ;
-        classPath.addExisting(classPath.concatSystemClasspath(),false);
-        for (int i = 0; i < moduleNames.length; i++) {
-            classPath.add(new Path(codeGenProject,MODULE_PATH_PREFIX +moduleNames[i]+CLASSES_DIR));
-        }
-        javaCompiler.setClasspath(classPath);
-
-        //set sourcePath - The generated output directories also become part of the sourcepath
-        Path sourcePath = new Path(codeGenProject,outputLocation) ;
-        sourcePath.setLocation(outputLocationFile);
-        javaCompiler.setSrcdir(sourcePath);
-
-        //output the classes into the output dir as well
-        javaCompiler.setDestdir(outputLocationFile);
-        javaCompiler.setVerbose(true);
-        try {
-            codeGenProject.executeTarget(COMPILE_TARGET_NAME);
-        } catch (BuildException e) {
-            fail();
-        }
-
-    }
-
-    /**
-     *
-     */
-    private Map fillOptionMap(String wsdlFileName,String outputLocation) {
-        Map optionMap = new HashMap();
-        optionMap.put(
-                CommandLineOptionConstants.WSDL_LOCATION_URI_OPTION,
-                new CommandLineOption(
-                        CommandLineOptionConstants.WSDL_LOCATION_URI_OPTION,
-                        new String[]{wsdlFileName}));
-
-        //use default sync option - No option is given
-        //use default async option - No option is given
-        //use default language option - No option is given
-        //output location - code_gen_output
-
-        optionMap.put(
-                CommandLineOptionConstants.OUTPUT_LOCATION_OPTION,
-                new CommandLineOption(
-                        CommandLineOptionConstants.OUTPUT_LOCATION_OPTION,
-                        new String[]{outputLocation}));
-        //server side option is on
-        optionMap.put(
-                CommandLineOptionConstants.SERVER_SIDE_CODE_OPTION,
-                new CommandLineOption(
-                        CommandLineOptionConstants.SERVER_SIDE_CODE_OPTION,
-                        new String[0]));
-        // descriptor option is on
-        optionMap.put(
-                CommandLineOptionConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
-                new CommandLineOption(CommandLineOptionConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
-                        new String[0]));
-
-        //todo Make this work
-        //test case option is on
-//        optionMap.put(
-//                CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
-//                new CommandLineOption(
-//                        CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
-//                        new String[0]));
-        //databinding is default
-
-        return optionMap;
-    }
-
-
-}
+package org.apache.axis2.wsdl.codegen;
+
+import junit.framework.TestCase;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.taskdefs.Javac;
+import org.apache.tools.ant.types.Path;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+/*
+* 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 WSDL2JavaTest extends TestCase{
+
+    public static final String OUTPUT_LOCATION_BASE = "./out_put_classes";
+    public static final String OUTPUT_LOCATION_PREFIX = "/test";
+    private static int folderCount = 0;
+    // public static final String OUTPUT_LOCATION_BASE = "C:\\GeneratedCode\\test4\\src";
+    public static final String WSDL_BASE_DIR = "./test-resources/";
+    public static final String CLASSES_DIR = "/target/classes/";
+    private String[] moduleNames={"xml","common","core"};
+    private static final String MODULE_PATH_PREFIX = "../modules/";
+    private static final String COMPILE_TARGET_NAME = "compile";
+
+
+    /**
+     * Make the root output directory
+     * @throws Exception
+     */
+    protected void setUp() throws Exception {
+        File outputFile = new File(OUTPUT_LOCATION_BASE);
+        if (outputFile.exists() && outputFile.isDirectory()){
+            deleteDir(outputFile);
+            outputFile.mkdir();
+        }else{
+            outputFile.mkdir();
+        }
+    }
+
+    /**
+     *  Remove the root output directory
+     * @throws Exception
+     */
+    protected void tearDown() throws Exception {
+        File outputFile = new File(OUTPUT_LOCATION_BASE);
+        if (outputFile.exists() && outputFile.isDirectory()){
+            deleteDir(outputFile);
+        }
+    }
+
+    /**
+     * Deletes all files and subdirectories under dir.
+     * Returns true if all deletions were successful.
+     * If a deletion fails, the method stops attempting to delete and returns false.
+     */
+    private boolean deleteDir(File dir) {
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int i=0; i<children.length; i++) {
+                boolean success = deleteDir(new File(dir, children[i]));
+                if (!success) {
+                    return false;
+                }
+            }
+        }
+
+        // The directory is now empty so delete it
+        return dir.delete();
+    }
+
+    /**
+     * Test for the WSAT wsdl
+     */
+    public void testCodeGenerationWSAT(){
+
+        try {
+            generateAndCompile("wsat.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the WSDL that's missing a service
+     */
+    public void testCodeGenerationNoService(){
+
+        try {
+            generateAndCompile("no-service.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+     /**
+     * Test for the Headers
+     */
+    public void testCodeGenerationHeaders(){
+
+        try {
+            generateAndCompile("headers.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the ping WSDL
+     */
+    public void testCodeGenerationPing(){
+
+        try {
+            generateAndCompile("ping.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+
+    /**
+     * Test for the interoptestdoclitparameters
+     */
+    public void testCodeGenerationInteropTestDocLitParams(){
+
+        try {
+            generateAndCompile("interoptestdoclitparameters.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the sales rank and price!
+     */
+    public void testCodeGenerationSalesRankNPrice(){
+
+        try {
+            generateAndCompile("SalesRankNPrice.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+     /**
+     * Test for the mime doc
+     */
+    public void testCodeGenerationMimeDoc(){
+
+        try {
+            generateAndCompile("mime-doc.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+//     /**
+//     * Test for the dime doc
+//     */
+//    public void testCodeGenerationDimeDoc(){
+//
+//        try {
+//            generateAndCompile("dime-doc.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+//        } catch (CodeGenerationException e) {
+//            fail("Exception while code generation test!"+ e.getMessage());
+//        }
+//    }
+    /**
+     * Test for the wscoor.wsdl
+     */
+    public void testCodeGenerationWSCOOR(){
+
+        try {
+            generateAndCompile("interoptestdoclit.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the modified ping wsdl. it will be the test for the detached schema with only an import
+     * statement
+     */
+    public void testCodeGenerationPingModified(){
+
+        try {
+            generateAndCompile("ping-modified.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the modified ping-unboond wsdl. The binding is removed in this wsdl
+     *
+     */
+    public void testCodeGenerationPingUnbound(){
+
+        try {
+            generateAndCompile("ping-unbound.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the simple doc lit from Axis 1
+     *
+     */
+    public void testCodeGenerationSimpleDocLiteral(){
+
+        try {
+            generateAndCompile("simple-doc-literal.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     * Test for the simple doc lit from Axis 1
+     *
+     */
+    public void testCodeGenerationComplexDocLiteral(){
+
+        try {
+            generateAndCompile("complex-doc-literal.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+    /**
+     * Test for the mtom echo wsdl. This wsdl contains a restriction based on xmime and a
+     * SOAP 1.2 binding
+     *
+     */
+    public void testCodeGenerationMTOMEcho(){
+
+        try {
+            generateAndCompile("mtomecho.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+        } catch (CodeGenerationException e) {
+            fail("Exception while code generation test!"+ e.getMessage());
+        }
+    }
+
+    /**
+     *
+     * @param wsdlName
+     * @param outputLocation
+     * @throws CodeGenerationException
+     */
+    private void generateAndCompile(String wsdlName, String outputLocation) throws CodeGenerationException {
+        codeGenerate(WSDL_BASE_DIR + wsdlName,outputLocation);
+        //todo - Still the compilation fails (the original problem of the java.home was settled by setting fork
+        //todo - to true). Now the compiler fails for some unknown reason (inside maven! works fine in the IDE though)
+
+        //compile(outputLocation);
+    }
+
+    /**
+     *
+     * @param wsdlFile
+     * @param outputLocation
+     * @throws CodeGenerationException
+     */
+    private void codeGenerate(String wsdlFile,String outputLocation) throws CodeGenerationException {
+        //create the option map
+        Map optionMap = fillOptionMap(wsdlFile,outputLocation);
+        CommandLineOptionParser parser =
+                new CommandLineOptionParser(optionMap);
+        new CodeGenerationEngine(parser).generate();
+    }
+
+    /**
+     *
+     * @param outputLocation
+     */
+    private void compile(String outputLocation){
+        //using the ant javac task for compilation
+        Javac javaCompiler = new Javac();
+        Project codeGenProject = new Project();
+        Target compileTarget = new Target();
+
+        compileTarget.setName(COMPILE_TARGET_NAME);
+        compileTarget.addTask(javaCompiler);
+        codeGenProject.addTarget(compileTarget);
+        codeGenProject.setSystemProperties();
+        javaCompiler.setProject(codeGenProject);
+        javaCompiler.setIncludejavaruntime(true);
+        javaCompiler.setIncludeantruntime(true);
+
+        /*
+          This harmless looking setFork is actually very important. unless the compiler is
+          forked it wont work!
+        */
+        javaCompiler.setFork(true);
+
+        //Create classpath - The generated output directories also become part of the classpath
+        //reason for this is that some codegenerators(XMLBeans) produce compiled classes as part of
+        //generated artifacts
+        File outputLocationFile = new File(outputLocation);
+        Path classPath = new Path(codeGenProject,outputLocation) ;
+        classPath.addExisting(classPath.concatSystemClasspath(),false);
+        for (int i = 0; i < moduleNames.length; i++) {
+            classPath.add(new Path(codeGenProject,MODULE_PATH_PREFIX +moduleNames[i]+CLASSES_DIR));
+        }
+        javaCompiler.setClasspath(classPath);
+
+        //set sourcePath - The generated output directories also become part of the sourcepath
+        Path sourcePath = new Path(codeGenProject,outputLocation) ;
+        sourcePath.setLocation(outputLocationFile);
+        javaCompiler.setSrcdir(sourcePath);
+
+        //output the classes into the output dir as well
+        javaCompiler.setDestdir(outputLocationFile);
+        javaCompiler.setVerbose(true);
+        try {
+            codeGenProject.executeTarget(COMPILE_TARGET_NAME);
+        } catch (BuildException e) {
+            fail();
+        }
+
+    }
+
+    /**
+     *
+     */
+    private Map fillOptionMap(String wsdlFileName,String outputLocation) {
+        Map optionMap = new HashMap();
+        optionMap.put(
+                CommandLineOptionConstants.WSDL_LOCATION_URI_OPTION,
+                new CommandLineOption(
+                        CommandLineOptionConstants.WSDL_LOCATION_URI_OPTION,
+                        new String[]{wsdlFileName}));
+
+        //use default sync option - No option is given
+        //use default async option - No option is given
+        //use default language option - No option is given
+        //output location - code_gen_output
+
+        optionMap.put(
+                CommandLineOptionConstants.OUTPUT_LOCATION_OPTION,
+                new CommandLineOption(
+                        CommandLineOptionConstants.OUTPUT_LOCATION_OPTION,
+                        new String[]{outputLocation}));
+        //server side option is on
+        optionMap.put(
+                CommandLineOptionConstants.SERVER_SIDE_CODE_OPTION,
+                new CommandLineOption(
+                        CommandLineOptionConstants.SERVER_SIDE_CODE_OPTION,
+                        new String[0]));
+        // descriptor option is on
+        optionMap.put(
+                CommandLineOptionConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
+                new CommandLineOption(CommandLineOptionConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
+                        new String[0]));
+
+        //todo Make this work
+        //test case option is on
+//        optionMap.put(
+//                CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
+//                new CommandLineOption(
+//                        CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
+//                        new String[0]));
+        //databinding is default
+
+        return optionMap;
+    }
+
+
+}

Propchange: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/AbstractTestCase.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/AbstractTestCase.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/AbstractTestCase.java Thu Sep 15 11:52:11 2005
@@ -1,62 +1,62 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wsdl;
-
-import junit.framework.TestCase;
-
-import java.io.File;
-
-/**
- * Abstract base class for test cases.
- */
-public abstract class AbstractTestCase
-        extends TestCase {
-    protected String testDir = "test" + File.separator;
-    protected String sampleDir = "samples" + File.separator;
-    protected String outDir = "target" + File.separator + "generated" +
-            File.separator +
-            "samples" +
-            File.separator;
-    protected String tempDir = "target" + File.separator + "generated" +
-            File.separator +
-            "temp";
-    protected String testResourceDir = "test-resources";
-
-    /**
-     * Basedir for all file I/O. Important when running tests from
-     * the reactor.
-     */
-    public String basedir = System.getProperty("basedir");
-
-    /**
-     * @param testName
-     */
-    public AbstractTestCase(String testName) {
-        super(testName);
-        if (basedir == null) {
-            basedir = new File(".").getAbsolutePath();
-        }
-        testDir = new File(basedir, testDir).getAbsolutePath();
-        sampleDir = new File(basedir, sampleDir).getAbsolutePath();
-        outDir = new File(basedir, outDir).getAbsolutePath();
-        tempDir = new File(basedir, tempDir).getAbsolutePath();
-    }
-
-    public File getTestResourceFile(String relativePath) {
-        return new File(testResourceDir, relativePath);
-    }
-}
-
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wsdl;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+
+/**
+ * Abstract base class for test cases.
+ */
+public abstract class AbstractTestCase
+        extends TestCase {
+    protected String testDir = "test" + File.separator;
+    protected String sampleDir = "samples" + File.separator;
+    protected String outDir = "target" + File.separator + "generated" +
+            File.separator +
+            "samples" +
+            File.separator;
+    protected String tempDir = "target" + File.separator + "generated" +
+            File.separator +
+            "temp";
+    protected String testResourceDir = "test-resources";
+
+    /**
+     * Basedir for all file I/O. Important when running tests from
+     * the reactor.
+     */
+    public String basedir = System.getProperty("basedir");
+
+    /**
+     * @param testName
+     */
+    public AbstractTestCase(String testName) {
+        super(testName);
+        if (basedir == null) {
+            basedir = new File(".").getAbsolutePath();
+        }
+        testDir = new File(basedir, testDir).getAbsolutePath();
+        sampleDir = new File(basedir, sampleDir).getAbsolutePath();
+        outDir = new File(basedir, outDir).getAbsolutePath();
+        tempDir = new File(basedir, tempDir).getAbsolutePath();
+    }
+
+    public File getTestResourceFile(String relativePath) {
+        return new File(testResourceDir, relativePath);
+    }
+}
+

Propchange: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/AbstractTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java Thu Sep 15 11:52:11 2005
@@ -1,57 +1,57 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.wsdl;
-
-import org.apache.axis2.wsdl.builder.WOMBuilderFactory;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author chathura@opensource.lk
- */
-public class BindingOperationTest extends AbstractTestCase {
-
-    public BindingOperationTest(String arg) {
-        super(arg);
-    }
-
-    /**
-     * The WSDL should be passed properly and the WOM should be built if
-     * everything is allright
-     *
-     * @throws Exception
-     */
-    public void testBindingOperation() throws Exception {
-        WSDLDescription womDescription;
-
-        String path = getTestResourceFile("BookQuote.wsdl").getAbsolutePath();
-        womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11)
-                .build(path).getDescription();
-
-        assertNotNull(womDescription);
-        if (null != womDescription) {
-            String ns = "http://www.Monson-Haefel.com/jwsbook/BookQuote";
-            WSDLBinding binding = womDescription.getBinding(
-                    new QName(ns, "BookQuoteBinding"));
-            WSDLBindingOperation bindingOperation = binding.getBindingOperation(
-                    new QName(ns, "getBookPrice"));
-            assertNotNull(bindingOperation.getInput());
-            assertNull(bindingOperation.getOutput());
-        }
-
-    }
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wsdl;
+
+import org.apache.axis2.wsdl.builder.WOMBuilderFactory;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class BindingOperationTest extends AbstractTestCase {
+
+    public BindingOperationTest(String arg) {
+        super(arg);
+    }
+
+    /**
+     * The WSDL should be passed properly and the WOM should be built if
+     * everything is allright
+     *
+     * @throws Exception
+     */
+    public void testBindingOperation() throws Exception {
+        WSDLDescription womDescription;
+
+        String path = getTestResourceFile("BookQuote.wsdl").getAbsolutePath();
+        womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11)
+                .build(path).getDescription();
+
+        assertNotNull(womDescription);
+        if (null != womDescription) {
+            String ns = "http://www.Monson-Haefel.com/jwsbook/BookQuote";
+            WSDLBinding binding = womDescription.getBinding(
+                    new QName(ns, "BookQuoteBinding"));
+            WSDLBindingOperation bindingOperation = binding.getBindingOperation(
+                    new QName(ns, "getBookPrice"));
+            assertNotNull(bindingOperation.getInput());
+            assertNull(bindingOperation.getOutput());
+        }
+
+    }
 }

Propchange: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/BindingOperationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/CreateSchemaTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/CreateSchemaTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/CreateSchemaTest.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/CreateSchemaTest.java Thu Sep 15 11:52:11 2005
@@ -1,85 +1,85 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.wsdl;
-
-import org.apache.axis2.wsdl.WSDLVersionWrapper;
-import org.apache.axis2.wsdl.builder.WOMBuilderFactory;
-import org.apache.wsdl.extensions.ExtensionConstants;
-import org.apache.wsdl.extensions.Schema;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.wsdl.Definition;
-import java.util.Iterator;
-
-/**
- * @author chathura@opensource.lk
- */
-public class CreateSchemaTest extends AbstractTestCase {
-
-    private WSDLDescription womDescription;
-
-    private Definition wsdl4jDefinition;
-
-    public CreateSchemaTest(String arg) {
-        super(arg);
-    }
-
-    protected void setUp() throws Exception {
-        WSDLVersionWrapper wsdlVersionWrapper = null;
-        if (null == this.womDescription) {
-            String path = getTestResourceFile("BookQuote.wsdl").getAbsolutePath();
-            wsdlVersionWrapper =
-                    WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11)
-                    .build(path);
-            this.womDescription = wsdlVersionWrapper.getDescription();
-        }
-        if (null == wsdl4jDefinition) {
-            this.wsdl4jDefinition = wsdlVersionWrapper.getDefinition();
-        }
-    }
-
-    public void testInsertedMultipartType() {
-        WSDLTypes types = womDescription.getTypes();
-        assertNotNull(types);
-        Iterator iterator = types.getExtensibilityElements().iterator();
-        WSDLExtensibilityElement element = null;
-        while (iterator.hasNext()) {
-            element = (WSDLExtensibilityElement) iterator.next();
-            if (ExtensionConstants.SCHEMA.equals(element.getType()))
-                break;
-        }
-        assertNotNull(element);
-        Schema schema = (Schema) element;
-        NodeList childNodes = schema.getElement().getChildNodes();
-        Element insertedElementForMessageReference = null;
-        for (int i = 0; i < childNodes.getLength(); i++) {
-            Node item = childNodes.item(i);
-            if (item instanceof Element
-                    && "complexType".equals(((Element) item).getTagName())
-                    && "BookQuote_getBookPrice".equals(((Element) item)
-                    .getAttribute("name"))) {
-                insertedElementForMessageReference = (Element) item;
-            }
-        }
-
-        assertNotNull(insertedElementForMessageReference);
-
-    }
-
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wsdl;
+
+import org.apache.axis2.wsdl.WSDLVersionWrapper;
+import org.apache.axis2.wsdl.builder.WOMBuilderFactory;
+import org.apache.wsdl.extensions.ExtensionConstants;
+import org.apache.wsdl.extensions.Schema;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.wsdl.Definition;
+import java.util.Iterator;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class CreateSchemaTest extends AbstractTestCase {
+
+    private WSDLDescription womDescription;
+
+    private Definition wsdl4jDefinition;
+
+    public CreateSchemaTest(String arg) {
+        super(arg);
+    }
+
+    protected void setUp() throws Exception {
+        WSDLVersionWrapper wsdlVersionWrapper = null;
+        if (null == this.womDescription) {
+            String path = getTestResourceFile("BookQuote.wsdl").getAbsolutePath();
+            wsdlVersionWrapper =
+                    WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11)
+                    .build(path);
+            this.womDescription = wsdlVersionWrapper.getDescription();
+        }
+        if (null == wsdl4jDefinition) {
+            this.wsdl4jDefinition = wsdlVersionWrapper.getDefinition();
+        }
+    }
+
+    public void testInsertedMultipartType() {
+        WSDLTypes types = womDescription.getTypes();
+        assertNotNull(types);
+        Iterator iterator = types.getExtensibilityElements().iterator();
+        WSDLExtensibilityElement element = null;
+        while (iterator.hasNext()) {
+            element = (WSDLExtensibilityElement) iterator.next();
+            if (ExtensionConstants.SCHEMA.equals(element.getType()))
+                break;
+        }
+        assertNotNull(element);
+        Schema schema = (Schema) element;
+        NodeList childNodes = schema.getElement().getChildNodes();
+        Element insertedElementForMessageReference = null;
+        for (int i = 0; i < childNodes.getLength(); i++) {
+            Node item = childNodes.item(i);
+            if (item instanceof Element
+                    && "complexType".equals(((Element) item).getTagName())
+                    && "BookQuote_getBookPrice".equals(((Element) item)
+                    .getAttribute("name"))) {
+                insertedElementForMessageReference = (Element) item;
+            }
+        }
+
+        assertNotNull(insertedElementForMessageReference);
+
+    }
+
 }

Propchange: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/CreateSchemaTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/InterfaceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/InterfaceTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/InterfaceTest.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/InterfaceTest.java Thu Sep 15 11:52:11 2005
@@ -1,113 +1,113 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.wsdl;
-
-import org.apache.wsdl.impl.WSDLInterfaceImpl;
-import org.apache.wsdl.impl.WSDLOperationImpl;
-
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-
-public class InterfaceTest extends AbstractTestCase {
-    public InterfaceTest(String testName) {
-        super(testName);
-    }
-
-    public void testGetAllOperations() {
-        WSDLOperation op;
-        WSDLInterface intfc;
-        WSDLInterface[] array = new WSDLInterface[5];
-        int interfaceCounter = 5;
-        int operationCounter = 5;
-        for (int j = 0; j < interfaceCounter; j++) {
-            intfc = new WSDLInterfaceImpl();
-            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE, "inteface"
-                    + j));
-            for (int i = 0; i < operationCounter; i++) {
-                op = new WSDLOperationImpl();
-                op.setName(
-                        new QName(WSDLConstants.WSDL1_1_NAMESPACE,
-                                "op" + i
-                        + "of inteface" +
-                        j));
-                assertNotNull(op.getName());
-                intfc.setOperation(op);
-            }
-            if (j > 0) {
-                intfc.addSuperInterface(array[j - 1]);
-            }
-            array[j] = intfc;
-        }
-        assertEquals(array[0].getOperation("op0of inteface0")
-                .getName().getLocalPart(), "op0of inteface0");
-        assertEquals(array[0].getOperation("op1of inteface0")
-                .getName().getLocalPart(), "op1of inteface0");
-        assertEquals(array[interfaceCounter - 1].getAllOperations().size(),
-                interfaceCounter * operationCounter);
-        assertEquals(interfaceCounter * operationCounter,
-                array[interfaceCounter - 1].getAllOperations().size());
-        Iterator iter = array[1].getAllOperations().keySet().iterator();
-        while (iter.hasNext()) {
-            assertNotNull(
-                    ((WSDLOperation) array[interfaceCounter - 1]
-                    .getAllOperations()
-                    .get(iter.next())).getName());
-        }
-        for (int j = 0; j < interfaceCounter; j++) {
-            for (int i = 0; i < operationCounter; i++) {
-                WSDLOperation operation = (WSDLOperation) array[interfaceCounter -
-                        1]
-                        .getAllOperations().get("op" + j + "of inteface" + i);
-                assertEquals((operation).getName().getLocalPart(),
-                        "op" + j
-                        + "of inteface" +
-                        i);
-            }
-        }
-
-    }
-
-    /**
-     * When a interface inherit two or more Interfaces the inherited operation
-     * who have the same QName should be the same Operation.
-     */
-    public void testInheritedOperationResolution() throws Exception {
-        WSDLOperation op;
-        WSDLInterface intfc;
-        WSDLInterface[] array = new WSDLInterface[5];
-        int interfaceCounter = 5;
-        int operationCounter = 5;
-        for (int i = 0; i < interfaceCounter; i++) {
-            intfc = new WSDLInterfaceImpl();
-            for (int j = 0; j < operationCounter; j++) {
-                op = new WSDLOperationImpl();
-                op.setName(new QName(WSDLConstants.WSDL1_1_NAMESPACE,
-                        "operation" + j));
-                intfc.setOperation(op);
-            }
-            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE,
-                    "Interface" + i));
-            array[i] = intfc;
-        }
-        WSDLInterface inheritedInterface = new WSDLInterfaceImpl();
-        for (int i = 0; i < array.length; i++) {
-            inheritedInterface.addSuperInterface(array[i]);
-        }
-        assertEquals(inheritedInterface.getAllOperations().size(), 5);
-
-    }
-}
-
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.wsdl;
+
+import org.apache.wsdl.impl.WSDLInterfaceImpl;
+import org.apache.wsdl.impl.WSDLOperationImpl;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+public class InterfaceTest extends AbstractTestCase {
+    public InterfaceTest(String testName) {
+        super(testName);
+    }
+
+    public void testGetAllOperations() {
+        WSDLOperation op;
+        WSDLInterface intfc;
+        WSDLInterface[] array = new WSDLInterface[5];
+        int interfaceCounter = 5;
+        int operationCounter = 5;
+        for (int j = 0; j < interfaceCounter; j++) {
+            intfc = new WSDLInterfaceImpl();
+            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE, "inteface"
+                    + j));
+            for (int i = 0; i < operationCounter; i++) {
+                op = new WSDLOperationImpl();
+                op.setName(
+                        new QName(WSDLConstants.WSDL1_1_NAMESPACE,
+                                "op" + i
+                        + "of inteface" +
+                        j));
+                assertNotNull(op.getName());
+                intfc.setOperation(op);
+            }
+            if (j > 0) {
+                intfc.addSuperInterface(array[j - 1]);
+            }
+            array[j] = intfc;
+        }
+        assertEquals(array[0].getOperation("op0of inteface0")
+                .getName().getLocalPart(), "op0of inteface0");
+        assertEquals(array[0].getOperation("op1of inteface0")
+                .getName().getLocalPart(), "op1of inteface0");
+        assertEquals(array[interfaceCounter - 1].getAllOperations().size(),
+                interfaceCounter * operationCounter);
+        assertEquals(interfaceCounter * operationCounter,
+                array[interfaceCounter - 1].getAllOperations().size());
+        Iterator iter = array[1].getAllOperations().keySet().iterator();
+        while (iter.hasNext()) {
+            assertNotNull(
+                    ((WSDLOperation) array[interfaceCounter - 1]
+                    .getAllOperations()
+                    .get(iter.next())).getName());
+        }
+        for (int j = 0; j < interfaceCounter; j++) {
+            for (int i = 0; i < operationCounter; i++) {
+                WSDLOperation operation = (WSDLOperation) array[interfaceCounter -
+                        1]
+                        .getAllOperations().get("op" + j + "of inteface" + i);
+                assertEquals((operation).getName().getLocalPart(),
+                        "op" + j
+                        + "of inteface" +
+                        i);
+            }
+        }
+
+    }
+
+    /**
+     * When a interface inherit two or more Interfaces the inherited operation
+     * who have the same QName should be the same Operation.
+     */
+    public void testInheritedOperationResolution() throws Exception {
+        WSDLOperation op;
+        WSDLInterface intfc;
+        WSDLInterface[] array = new WSDLInterface[5];
+        int interfaceCounter = 5;
+        int operationCounter = 5;
+        for (int i = 0; i < interfaceCounter; i++) {
+            intfc = new WSDLInterfaceImpl();
+            for (int j = 0; j < operationCounter; j++) {
+                op = new WSDLOperationImpl();
+                op.setName(new QName(WSDLConstants.WSDL1_1_NAMESPACE,
+                        "operation" + j));
+                intfc.setOperation(op);
+            }
+            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE,
+                    "Interface" + i));
+            array[i] = intfc;
+        }
+        WSDLInterface inheritedInterface = new WSDLInterfaceImpl();
+        for (int i = 0; i < array.length; i++) {
+            inheritedInterface.addSuperInterface(array[i]);
+        }
+        assertEquals(inheritedInterface.getAllOperations().size(), 5);
+
+    }
+}
+

Propchange: webservices/axis2/trunk/java/modules/wsdl/test/org/apache/wsdl/InterfaceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message