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 2005/09/15 21:07:03 UTC

svn commit: r289289 [111/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...

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XMLUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XMLUtils.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XMLUtils.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XMLUtils.java Thu Sep 15 11:52:11 2005
@@ -1,561 +1,561 @@
-/*
- * 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.axis2.wsdl.util;
-
-import com.ibm.wsdl.Constants;
-import org.apache.axis2.attachments.Base64;
-import org.w3c.dom.*;
-import org.w3c.dom.CharacterData;
-import org.xml.sax.*;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.*;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.*;
-import java.util.Stack;
-
-
-public class XMLUtils {
-//    protected Log log =
-//        LogFactory.getLog(getClass().getName());
-        
-    public static final String charEncoding = "ISO-8859-1";
-    private static final String saxParserFactoryProperty =
-        "javax.xml.parsers.SAXParserFactory";
-
-    private static DocumentBuilderFactory dbf = getDOMFactory();
-    private static SAXParserFactory       saxFactory;
-    private static Stack                  saxParsers = new Stack();
-
-    private static String empty = new String("");
-    private static ByteArrayInputStream bais = new ByteArrayInputStream(empty.getBytes());
-
-    static {
-        // Initialize SAX Parser factory defaults
-        initSAXFactory(null, true, false);
-    }
-
-    /** Encode a string appropriately for XML.
-     *
-     * Lifted from ApacheSOAP 2.2 (org.apache.soap.Utils)
-     *
-     * @param orig the String to encode
-     * @return a String in which XML special chars are repalced by entities
-     */
-    public static String xmlEncodeString(String orig)
-    {
-        if (orig == null)
-        {
-            return "";
-        }
-
-        char[] chars = orig.toCharArray();
-
-        // if the string doesn't have any of the magic characters, leave
-        // it alone.
-        boolean needsEncoding = false;
-
-        search:
-        for(int i = 0; i < chars.length; i++) {
-            switch(chars[i]) {
-            case '&': case '"': case '\'': case '<': case '>':
-                needsEncoding = true;
-                break search;
-            }
-        }
-
-        if (!needsEncoding) return orig;
-
-        StringBuffer strBuf = new StringBuffer();
-        for (int i = 0; i < chars.length; i++)
-        {
-            switch (chars[i])
-            {
-            case '&'  : strBuf.append("&amp;");
-                        break;
-            case '\"' : strBuf.append("&quot;");
-                        break;
-            case '\'' : strBuf.append("&apos;");
-                        break;
-            case '<'  : strBuf.append("&lt;");
-                        break;
-            case '\r' : strBuf.append("&#xd;");
-                        break;
-            case '>'  : strBuf.append("&gt;");
-                        break;
-            default   : 
-                if (((int)chars[i]) > 127) {
-                        strBuf.append("&#");
-                        strBuf.append((int)chars[i]);
-                        strBuf.append(";");
-                } else {
-                        strBuf.append(chars[i]);
-                }
-            }
-        }
-
-        return strBuf.toString();
-    }
-
-    /** Initialize the SAX parser factory.
-     *
-     * @param factoryClassName The (optional) class name of the desired
-     *                         SAXParserFactory implementation. Will be
-     *                         assigned to the system property
-     *                         <b>javax.xml.parsers.SAXParserFactory</b>
-     *                         unless this property is already set.
-     *                         If <code>null</code>, leaves current setting
-     *                         alone.
-     * @param namespaceAware true if we want a namespace-aware parser
-     * @param validating true if we want a validating parser
-     *
-     */
-    public static void initSAXFactory(String factoryClassName,
-                                      boolean namespaceAware,
-                                      boolean validating)
-    {
-        if (factoryClassName != null) {
-            try {
-                saxFactory = (SAXParserFactory)Class.forName(factoryClassName).
-                    newInstance();
-                /*
-                 * Set the system property only if it is not already set to
-                 * avoid corrupting environments in which Axis is embedded.
-                 */
-                if (System.getProperty(saxParserFactoryProperty) == null) {
-                    System.setProperty(saxParserFactoryProperty,
-                                       factoryClassName);
-                }
-            } catch (Exception e) {
-                //log.error(Messages.getMessage("exception00"), e);
-                saxFactory = null;
-            }
-       } else {
-            saxFactory = SAXParserFactory.newInstance();
-        }
-        saxFactory.setNamespaceAware(namespaceAware);
-        saxFactory.setValidating(validating);
-
-        // Discard existing parsers
-        saxParsers.clear();
-    }
-
-    private static DocumentBuilderFactory getDOMFactory() {
-        DocumentBuilderFactory dbf;
-        try {
-            dbf = DocumentBuilderFactory.newInstance();
-            dbf.setNamespaceAware(true);
-        }
-        catch( Exception e ) {
-            //log.error(Messages.getMessage("exception00"), e );
-            dbf = null;
-        }
-        return( dbf );
-    }
-    
-    private static boolean tryReset= true;
-
-//    /** Get a SAX parser instance from the JAXP factory.
-//     *
-//     * @return a SAXParser instance.
-//     */
-//    public static synchronized SAXParser getSAXParser() {
-//        if(!saxParsers.empty()) {
-//            return (SAXParser )saxParsers.pop();
-//        }
-//
-//        try {
-//            SAXParser parser = saxFactory.newSAXParser();
-//            parser.getParser().setEntityResolver(new DefaultEntityResolver());
-//            XMLReader reader = parser.getXMLReader(); 
-//            reader.setEntityResolver(new DefaultEntityResolver());
-//            reader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
-//            return parser;
-//        } catch (ParserConfigurationException e) {
-//            log.error(Messages.getMessage("parserConfigurationException00"), e);
-//            return null;
-//        } catch (SAXException se) {
-//            log.error(Messages.getMessage("SAXException00"), se);
-//            return null;
-//        }
-//    }
-
-
-    /** Return a SAX parser for reuse.
-     * @param parser A SAX parser that is available for reuse
-     */
-    public static void releaseSAXParser(SAXParser parser) {
-        if(!tryReset) return;
-
-        //Free up possible ref. held by past contenthandler.
-        try{
-            XMLReader xmlReader= parser.getXMLReader();
-            if(null != xmlReader){
-//                xmlReader.setContentHandler(doNothingContentHandler);
-//                xmlReader.setDTDHandler(doNothingContentHandler);
-//                xmlReader.setEntityResolver(doNothingContentHandler);
-//                xmlReader.setErrorHandler(doNothingContentHandler);
-                synchronized (XMLUtils.class ) {
-                    saxParsers.push(parser);
-                }
-            }
-            else {
-                tryReset= false;
-            }
-        } catch (org.xml.sax.SAXException e) {
-            tryReset= false;
-        }
-    }
-    /**
-     * Get an empty new Document
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     */
-    public static Document newDocument() 
-         throws ParserConfigurationException
-    {
-        synchronized (dbf) {
-            return dbf.newDocumentBuilder().newDocument();
-        }
-    }
-
-    /**
-     * Get a new Document read from the input source
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException if the document has xml sax problems
-     * @throws IOException if i/o exceptions occur
-     */
-    public static Document newDocument(InputSource inp)
-        throws ParserConfigurationException, SAXException, IOException
-    {
-        DocumentBuilder db;
-        synchronized (dbf) {
-            db = dbf.newDocumentBuilder();
-        }
-        db.setEntityResolver(new DefaultEntityResolver());
-        db.setErrorHandler( new ParserErrorHandler() );
-        return( db.parse( inp ) );
-    }
-
-    /**
-     * Get a new Document read from the input stream
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException if the document has xml sax problems
-     * @throws IOException if i/o exceptions occur
-     */
-    public static Document newDocument(InputStream inp) 
-        throws ParserConfigurationException, SAXException, IOException 
-    {
-        return XMLUtils.newDocument(new InputSource(inp));
-    } 
-
-    /**
-     * Get a new Document read from the indicated uri
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException if the document has xml sax problems
-     * @throws IOException if i/o exceptions occur
-     */
-    public static Document newDocument(String uri) 
-        throws ParserConfigurationException, SAXException, IOException 
-    {
-        // call the authenticated version as there might be 
-        // username/password info embeded in the uri.
-        return XMLUtils.newDocument(uri, null, null);
-    }
-    
-    /**
-     * Create a new document from the given URI, use the username and password
-     * if the URI requires authentication.
-     * @param uri the resource to get
-     * @param username basic auth username
-     * @param password basic auth password
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException if the document has xml sax problems
-     * @throws IOException if i/o exceptions occur
-     */ 
-    public static Document newDocument(String uri, String username, String password)
-        throws ParserConfigurationException, SAXException, IOException
-     {
-         InputSource ins = XMLUtils.getInputSourceFromURI(uri, username, password);
-         Document doc = XMLUtils.newDocument(ins);
-         // Close the Stream
-         if (ins.getByteStream() != null) {
-             ins.getByteStream().close();
-         } else if (ins.getCharacterStream() != null) {
-             ins.getCharacterStream().close();
-         }
-         return doc;
-     }
-
-
-
-    public static String getPrefix(String uri, Node e) {
-        while (e != null && (e.getNodeType() == Element.ELEMENT_NODE)) {
-            NamedNodeMap attrs = e.getAttributes();
-            for (int n = 0; n < attrs.getLength(); n++) {
-                Attr a = (Attr)attrs.item(n);
-                String name;
-                if ((name = a.getName()).startsWith("xmlns:") &&
-                    a.getNodeValue().equals(uri)) {
-                    return name.substring(6);
-                }
-            }
-            e = e.getParentNode();
-        }
-        return null;
-    }
-
-    public static String getNamespace(String prefix, Node e) {
-        while (e != null && (e.getNodeType() == Node.ELEMENT_NODE)) {
-            Attr attr =
-                ((Element)e).getAttributeNodeNS(Constants.NS_URI_XMLNS, prefix);
-            if (attr != null) return attr.getValue();
-            e = e.getParentNode();
-        }
-        return null;
-    }
-
-    /**
-     * Return a QName when passed a string like "foo:bar" by mapping
-     * the "foo" prefix to a namespace in the context of the given Node.
-     *
-     * @return a QName generated from the given string representation
-     */
-    public static QName getQNameFromString(String str, Node e) {
-        if (str == null || e == null)
-            return null;
-
-        int idx = str.indexOf(':');
-        if (idx > -1) {
-            String prefix = str.substring(0, idx);
-            String ns = getNamespace(prefix, e);
-            if (ns == null)
-                return null;
-            return new QName(ns, str.substring(idx + 1));
-        } else {
-            return new QName("", str);
-        }
-    }
-
-    /**
-     * Return a string for a particular QName, mapping a new prefix
-     * if necessary.
-     */
-    public static String getStringForQName(QName qname, Element e)
-    {
-        String uri = qname.getNamespaceURI();
-        String prefix = getPrefix(uri, e);
-        if (prefix == null) {
-            int i = 1;
-            prefix = "ns" + i;
-            while (getNamespace(prefix, e) != null) {
-                i++;
-                prefix = "ns" + i;
-            }
-            e.setAttributeNS(Constants.NS_URI_XMLNS,
-                        "xmlns:" + prefix, uri);
-        }
-        return prefix + ":" + qname.getLocalPart();
-    }
-
-  /**
-   * Concat all the text and cdata node children of this elem and return
-   * the resulting text.
-   * (by Matt Duftler)
-   *
-   * @param parentEl the element whose cdata/text node values are to
-   *                 be combined.
-   * @return the concatanated string.
-   */
-  public static String getChildCharacterData (Element parentEl) {
-    if (parentEl == null) {
-      return null;
-    }
-    Node          tempNode = parentEl.getFirstChild();
-    StringBuffer  strBuf   = new StringBuffer();
-    CharacterData charData;
-
-    while (tempNode != null) {
-      switch (tempNode.getNodeType()) {
-        case Node.TEXT_NODE :
-        case Node.CDATA_SECTION_NODE : charData = (CharacterData)tempNode;
-                                       strBuf.append(charData.getData());
-                                       break;
-      }
-      tempNode = tempNode.getNextSibling();
-    }
-    return strBuf.toString();
-  }
-    
-    public static class ParserErrorHandler implements ErrorHandler
-    {
-//        protected static Log log =
-//            LogFactory.getLog(ParserErrorHandler.class.getName());
-        /**
-         * Returns a string describing parse exception details
-         */
-        private String getParseExceptionInfo(SAXParseException spe) {
-            String systemId = spe.getSystemId();
-            if (systemId == null) {
-                systemId = "null";
-            }
-            return "URI=" + systemId +
-                " Line=" + spe.getLineNumber() +
-                ": " + spe.getMessage();
-        }
-
-        // The following methods are standard SAX ErrorHandler methods.
-        // See SAX documentation for more info.
-
-        public void warning(SAXParseException spe) throws SAXException {
-//            if (log.isDebugEnabled())
-//                log.debug( Messages.getMessage("warning00", getParseExceptionInfo(spe)));
-        }
-        
-        public void error(SAXParseException spe) throws SAXException {
-            String message = "Error: " + getParseExceptionInfo(spe);
-            throw new SAXException(message);
-        }
-
-        public void fatalError(SAXParseException spe) throws SAXException {
-            String message = "Fatal Error: " + getParseExceptionInfo(spe);
-            throw new SAXException(message);
-        }
-    }
-
-
-    /**
-     * Utility to get the bytes uri.
-     * Does NOT handle authenticated URLs, 
-     * use getInputSourceFromURI(uri, username, password)
-     *
-     * @param uri the resource to get
-     * @see #getInputSourceFromURI(String uri, String username, String password)
-     */
-    public static InputSource getInputSourceFromURI(String uri) {
-        return new InputSource(uri);
-    }
-
-
-
-    /**
-     * Utility to get the bytes at a protected uri
-     * 
-     * This will retrieve the URL if a username and password are provided.
-     * The java.net.URL class does not do Basic Authentication, so we have to
-     * do it manually in this routine.
-     * 
-     * If no username is provided, we create an InputSource from the uri
-     * and let the InputSource go fetch the contents.
-     * 
-     * @param uri the resource to get
-     * @param username basic auth username
-     * @param password basic auth password
-     */ 
-    private static InputSource getInputSourceFromURI(String uri,
-                                                     String username,
-                                                     String password)
-        throws IOException, ProtocolException, UnsupportedEncodingException
-    {
-        URL wsdlurl = null;
-        try {
-            wsdlurl = new URL(uri);
-        } catch (MalformedURLException e) {
-            // we can't process it, it might be a 'simple' foo.wsdl
-            // let InputSource deal with it
-            return new InputSource(uri);
-        }
-        
-        // if no authentication, just let InputSource deal with it
-        if (username == null && wsdlurl.getUserInfo() == null) {
-            return new InputSource(uri);
-        }
-        
-        // if this is not an HTTP{S} url, let InputSource deal with it
-        if (!wsdlurl.getProtocol().startsWith("http")) {
-            return new InputSource(uri);
-        }
-
-        URLConnection connection = wsdlurl.openConnection();
-        // Does this work for https???
-        if (!(connection instanceof HttpURLConnection)) {
-            // can't do http with this URL, let InputSource deal with it
-            return new InputSource(uri);
-        }
-        HttpURLConnection uconn = (HttpURLConnection) connection;
-        String userinfo = wsdlurl.getUserInfo();
-        uconn.setRequestMethod("GET");
-        uconn.setAllowUserInteraction(false);
-        uconn.setDefaultUseCaches(false);
-        uconn.setDoInput(true);
-        uconn.setDoOutput(false);
-        uconn.setInstanceFollowRedirects(true);
-        uconn.setUseCaches(false);
-
-        // username/password info in the URL overrides passed in values 
-        String auth = null;
-        if (userinfo != null) {
-            auth = userinfo;
-        } else if (username != null) {
-            auth = (password == null) ? username : username + ":" + password;
-        }
-        
-        if (auth != null) {
-            uconn.setRequestProperty("Authorization",
-                                     "Basic " + 
-                                     base64encode(auth.getBytes(charEncoding)));
-        }
-        
-        uconn.connect();
-
-        return new InputSource(uconn.getInputStream());
-    }
-
-    public static final String base64encode(byte[] bytes) {
-        return new String(Base64.encode(bytes));
-    }
-
-    public static InputSource getEmptyInputSource() {
-        return new InputSource(bais);
-    }
-    
-    /**
-     * Find a Node with a given QNameb
-     * 
-     * @param node parent node
-     * @param name QName of the child we need to find
-     * @return child node
-     */ 
-    public static Node findNode(Node node, QName name){
-        if(name.getNamespaceURI().equals(node.getNamespaceURI()) && 
-           name.getLocalPart().equals(node.getLocalName()))
-            return node;
-        NodeList children = node.getChildNodes();
-        for(int i=0;i<children.getLength();i++){
-            Node ret = findNode(children.item(i), name);
-            if(ret != null)
-                return ret;
-        }
-        return null;
-    }
-}
+/*
+ * 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.axis2.wsdl.util;
+
+import com.ibm.wsdl.Constants;
+import org.apache.axis2.attachments.Base64;
+import org.w3c.dom.*;
+import org.w3c.dom.CharacterData;
+import org.xml.sax.*;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.*;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.*;
+import java.util.Stack;
+
+
+public class XMLUtils {
+//    protected Log log =
+//        LogFactory.getLog(getClass().getName());
+        
+    public static final String charEncoding = "ISO-8859-1";
+    private static final String saxParserFactoryProperty =
+        "javax.xml.parsers.SAXParserFactory";
+
+    private static DocumentBuilderFactory dbf = getDOMFactory();
+    private static SAXParserFactory       saxFactory;
+    private static Stack                  saxParsers = new Stack();
+
+    private static String empty = new String("");
+    private static ByteArrayInputStream bais = new ByteArrayInputStream(empty.getBytes());
+
+    static {
+        // Initialize SAX Parser factory defaults
+        initSAXFactory(null, true, false);
+    }
+
+    /** Encode a string appropriately for XML.
+     *
+     * Lifted from ApacheSOAP 2.2 (org.apache.soap.Utils)
+     *
+     * @param orig the String to encode
+     * @return a String in which XML special chars are repalced by entities
+     */
+    public static String xmlEncodeString(String orig)
+    {
+        if (orig == null)
+        {
+            return "";
+        }
+
+        char[] chars = orig.toCharArray();
+
+        // if the string doesn't have any of the magic characters, leave
+        // it alone.
+        boolean needsEncoding = false;
+
+        search:
+        for(int i = 0; i < chars.length; i++) {
+            switch(chars[i]) {
+            case '&': case '"': case '\'': case '<': case '>':
+                needsEncoding = true;
+                break search;
+            }
+        }
+
+        if (!needsEncoding) return orig;
+
+        StringBuffer strBuf = new StringBuffer();
+        for (int i = 0; i < chars.length; i++)
+        {
+            switch (chars[i])
+            {
+            case '&'  : strBuf.append("&amp;");
+                        break;
+            case '\"' : strBuf.append("&quot;");
+                        break;
+            case '\'' : strBuf.append("&apos;");
+                        break;
+            case '<'  : strBuf.append("&lt;");
+                        break;
+            case '\r' : strBuf.append("&#xd;");
+                        break;
+            case '>'  : strBuf.append("&gt;");
+                        break;
+            default   : 
+                if (((int)chars[i]) > 127) {
+                        strBuf.append("&#");
+                        strBuf.append((int)chars[i]);
+                        strBuf.append(";");
+                } else {
+                        strBuf.append(chars[i]);
+                }
+            }
+        }
+
+        return strBuf.toString();
+    }
+
+    /** Initialize the SAX parser factory.
+     *
+     * @param factoryClassName The (optional) class name of the desired
+     *                         SAXParserFactory implementation. Will be
+     *                         assigned to the system property
+     *                         <b>javax.xml.parsers.SAXParserFactory</b>
+     *                         unless this property is already set.
+     *                         If <code>null</code>, leaves current setting
+     *                         alone.
+     * @param namespaceAware true if we want a namespace-aware parser
+     * @param validating true if we want a validating parser
+     *
+     */
+    public static void initSAXFactory(String factoryClassName,
+                                      boolean namespaceAware,
+                                      boolean validating)
+    {
+        if (factoryClassName != null) {
+            try {
+                saxFactory = (SAXParserFactory)Class.forName(factoryClassName).
+                    newInstance();
+                /*
+                 * Set the system property only if it is not already set to
+                 * avoid corrupting environments in which Axis is embedded.
+                 */
+                if (System.getProperty(saxParserFactoryProperty) == null) {
+                    System.setProperty(saxParserFactoryProperty,
+                                       factoryClassName);
+                }
+            } catch (Exception e) {
+                //log.error(Messages.getMessage("exception00"), e);
+                saxFactory = null;
+            }
+       } else {
+            saxFactory = SAXParserFactory.newInstance();
+        }
+        saxFactory.setNamespaceAware(namespaceAware);
+        saxFactory.setValidating(validating);
+
+        // Discard existing parsers
+        saxParsers.clear();
+    }
+
+    private static DocumentBuilderFactory getDOMFactory() {
+        DocumentBuilderFactory dbf;
+        try {
+            dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+        }
+        catch( Exception e ) {
+            //log.error(Messages.getMessage("exception00"), e );
+            dbf = null;
+        }
+        return( dbf );
+    }
+    
+    private static boolean tryReset= true;
+
+//    /** Get a SAX parser instance from the JAXP factory.
+//     *
+//     * @return a SAXParser instance.
+//     */
+//    public static synchronized SAXParser getSAXParser() {
+//        if(!saxParsers.empty()) {
+//            return (SAXParser )saxParsers.pop();
+//        }
+//
+//        try {
+//            SAXParser parser = saxFactory.newSAXParser();
+//            parser.getParser().setEntityResolver(new DefaultEntityResolver());
+//            XMLReader reader = parser.getXMLReader(); 
+//            reader.setEntityResolver(new DefaultEntityResolver());
+//            reader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
+//            return parser;
+//        } catch (ParserConfigurationException e) {
+//            log.error(Messages.getMessage("parserConfigurationException00"), e);
+//            return null;
+//        } catch (SAXException se) {
+//            log.error(Messages.getMessage("SAXException00"), se);
+//            return null;
+//        }
+//    }
+
+
+    /** Return a SAX parser for reuse.
+     * @param parser A SAX parser that is available for reuse
+     */
+    public static void releaseSAXParser(SAXParser parser) {
+        if(!tryReset) return;
+
+        //Free up possible ref. held by past contenthandler.
+        try{
+            XMLReader xmlReader= parser.getXMLReader();
+            if(null != xmlReader){
+//                xmlReader.setContentHandler(doNothingContentHandler);
+//                xmlReader.setDTDHandler(doNothingContentHandler);
+//                xmlReader.setEntityResolver(doNothingContentHandler);
+//                xmlReader.setErrorHandler(doNothingContentHandler);
+                synchronized (XMLUtils.class ) {
+                    saxParsers.push(parser);
+                }
+            }
+            else {
+                tryReset= false;
+            }
+        } catch (org.xml.sax.SAXException e) {
+            tryReset= false;
+        }
+    }
+    /**
+     * Get an empty new Document
+     * @return Document
+     * @throws ParserConfigurationException if construction problems occur
+     */
+    public static Document newDocument() 
+         throws ParserConfigurationException
+    {
+        synchronized (dbf) {
+            return dbf.newDocumentBuilder().newDocument();
+        }
+    }
+
+    /**
+     * Get a new Document read from the input source
+     * @return Document
+     * @throws ParserConfigurationException if construction problems occur
+     * @throws SAXException if the document has xml sax problems
+     * @throws IOException if i/o exceptions occur
+     */
+    public static Document newDocument(InputSource inp)
+        throws ParserConfigurationException, SAXException, IOException
+    {
+        DocumentBuilder db;
+        synchronized (dbf) {
+            db = dbf.newDocumentBuilder();
+        }
+        db.setEntityResolver(new DefaultEntityResolver());
+        db.setErrorHandler( new ParserErrorHandler() );
+        return( db.parse( inp ) );
+    }
+
+    /**
+     * Get a new Document read from the input stream
+     * @return Document
+     * @throws ParserConfigurationException if construction problems occur
+     * @throws SAXException if the document has xml sax problems
+     * @throws IOException if i/o exceptions occur
+     */
+    public static Document newDocument(InputStream inp) 
+        throws ParserConfigurationException, SAXException, IOException 
+    {
+        return XMLUtils.newDocument(new InputSource(inp));
+    } 
+
+    /**
+     * Get a new Document read from the indicated uri
+     * @return Document
+     * @throws ParserConfigurationException if construction problems occur
+     * @throws SAXException if the document has xml sax problems
+     * @throws IOException if i/o exceptions occur
+     */
+    public static Document newDocument(String uri) 
+        throws ParserConfigurationException, SAXException, IOException 
+    {
+        // call the authenticated version as there might be 
+        // username/password info embeded in the uri.
+        return XMLUtils.newDocument(uri, null, null);
+    }
+    
+    /**
+     * Create a new document from the given URI, use the username and password
+     * if the URI requires authentication.
+     * @param uri the resource to get
+     * @param username basic auth username
+     * @param password basic auth password
+     * @throws ParserConfigurationException if construction problems occur
+     * @throws SAXException if the document has xml sax problems
+     * @throws IOException if i/o exceptions occur
+     */ 
+    public static Document newDocument(String uri, String username, String password)
+        throws ParserConfigurationException, SAXException, IOException
+     {
+         InputSource ins = XMLUtils.getInputSourceFromURI(uri, username, password);
+         Document doc = XMLUtils.newDocument(ins);
+         // Close the Stream
+         if (ins.getByteStream() != null) {
+             ins.getByteStream().close();
+         } else if (ins.getCharacterStream() != null) {
+             ins.getCharacterStream().close();
+         }
+         return doc;
+     }
+
+
+
+    public static String getPrefix(String uri, Node e) {
+        while (e != null && (e.getNodeType() == Element.ELEMENT_NODE)) {
+            NamedNodeMap attrs = e.getAttributes();
+            for (int n = 0; n < attrs.getLength(); n++) {
+                Attr a = (Attr)attrs.item(n);
+                String name;
+                if ((name = a.getName()).startsWith("xmlns:") &&
+                    a.getNodeValue().equals(uri)) {
+                    return name.substring(6);
+                }
+            }
+            e = e.getParentNode();
+        }
+        return null;
+    }
+
+    public static String getNamespace(String prefix, Node e) {
+        while (e != null && (e.getNodeType() == Node.ELEMENT_NODE)) {
+            Attr attr =
+                ((Element)e).getAttributeNodeNS(Constants.NS_URI_XMLNS, prefix);
+            if (attr != null) return attr.getValue();
+            e = e.getParentNode();
+        }
+        return null;
+    }
+
+    /**
+     * Return a QName when passed a string like "foo:bar" by mapping
+     * the "foo" prefix to a namespace in the context of the given Node.
+     *
+     * @return a QName generated from the given string representation
+     */
+    public static QName getQNameFromString(String str, Node e) {
+        if (str == null || e == null)
+            return null;
+
+        int idx = str.indexOf(':');
+        if (idx > -1) {
+            String prefix = str.substring(0, idx);
+            String ns = getNamespace(prefix, e);
+            if (ns == null)
+                return null;
+            return new QName(ns, str.substring(idx + 1));
+        } else {
+            return new QName("", str);
+        }
+    }
+
+    /**
+     * Return a string for a particular QName, mapping a new prefix
+     * if necessary.
+     */
+    public static String getStringForQName(QName qname, Element e)
+    {
+        String uri = qname.getNamespaceURI();
+        String prefix = getPrefix(uri, e);
+        if (prefix == null) {
+            int i = 1;
+            prefix = "ns" + i;
+            while (getNamespace(prefix, e) != null) {
+                i++;
+                prefix = "ns" + i;
+            }
+            e.setAttributeNS(Constants.NS_URI_XMLNS,
+                        "xmlns:" + prefix, uri);
+        }
+        return prefix + ":" + qname.getLocalPart();
+    }
+
+  /**
+   * Concat all the text and cdata node children of this elem and return
+   * the resulting text.
+   * (by Matt Duftler)
+   *
+   * @param parentEl the element whose cdata/text node values are to
+   *                 be combined.
+   * @return the concatanated string.
+   */
+  public static String getChildCharacterData (Element parentEl) {
+    if (parentEl == null) {
+      return null;
+    }
+    Node          tempNode = parentEl.getFirstChild();
+    StringBuffer  strBuf   = new StringBuffer();
+    CharacterData charData;
+
+    while (tempNode != null) {
+      switch (tempNode.getNodeType()) {
+        case Node.TEXT_NODE :
+        case Node.CDATA_SECTION_NODE : charData = (CharacterData)tempNode;
+                                       strBuf.append(charData.getData());
+                                       break;
+      }
+      tempNode = tempNode.getNextSibling();
+    }
+    return strBuf.toString();
+  }
+    
+    public static class ParserErrorHandler implements ErrorHandler
+    {
+//        protected static Log log =
+//            LogFactory.getLog(ParserErrorHandler.class.getName());
+        /**
+         * Returns a string describing parse exception details
+         */
+        private String getParseExceptionInfo(SAXParseException spe) {
+            String systemId = spe.getSystemId();
+            if (systemId == null) {
+                systemId = "null";
+            }
+            return "URI=" + systemId +
+                " Line=" + spe.getLineNumber() +
+                ": " + spe.getMessage();
+        }
+
+        // The following methods are standard SAX ErrorHandler methods.
+        // See SAX documentation for more info.
+
+        public void warning(SAXParseException spe) throws SAXException {
+//            if (log.isDebugEnabled())
+//                log.debug( Messages.getMessage("warning00", getParseExceptionInfo(spe)));
+        }
+        
+        public void error(SAXParseException spe) throws SAXException {
+            String message = "Error: " + getParseExceptionInfo(spe);
+            throw new SAXException(message);
+        }
+
+        public void fatalError(SAXParseException spe) throws SAXException {
+            String message = "Fatal Error: " + getParseExceptionInfo(spe);
+            throw new SAXException(message);
+        }
+    }
+
+
+    /**
+     * Utility to get the bytes uri.
+     * Does NOT handle authenticated URLs, 
+     * use getInputSourceFromURI(uri, username, password)
+     *
+     * @param uri the resource to get
+     * @see #getInputSourceFromURI(String uri, String username, String password)
+     */
+    public static InputSource getInputSourceFromURI(String uri) {
+        return new InputSource(uri);
+    }
+
+
+
+    /**
+     * Utility to get the bytes at a protected uri
+     * 
+     * This will retrieve the URL if a username and password are provided.
+     * The java.net.URL class does not do Basic Authentication, so we have to
+     * do it manually in this routine.
+     * 
+     * If no username is provided, we create an InputSource from the uri
+     * and let the InputSource go fetch the contents.
+     * 
+     * @param uri the resource to get
+     * @param username basic auth username
+     * @param password basic auth password
+     */ 
+    private static InputSource getInputSourceFromURI(String uri,
+                                                     String username,
+                                                     String password)
+        throws IOException, ProtocolException, UnsupportedEncodingException
+    {
+        URL wsdlurl = null;
+        try {
+            wsdlurl = new URL(uri);
+        } catch (MalformedURLException e) {
+            // we can't process it, it might be a 'simple' foo.wsdl
+            // let InputSource deal with it
+            return new InputSource(uri);
+        }
+        
+        // if no authentication, just let InputSource deal with it
+        if (username == null && wsdlurl.getUserInfo() == null) {
+            return new InputSource(uri);
+        }
+        
+        // if this is not an HTTP{S} url, let InputSource deal with it
+        if (!wsdlurl.getProtocol().startsWith("http")) {
+            return new InputSource(uri);
+        }
+
+        URLConnection connection = wsdlurl.openConnection();
+        // Does this work for https???
+        if (!(connection instanceof HttpURLConnection)) {
+            // can't do http with this URL, let InputSource deal with it
+            return new InputSource(uri);
+        }
+        HttpURLConnection uconn = (HttpURLConnection) connection;
+        String userinfo = wsdlurl.getUserInfo();
+        uconn.setRequestMethod("GET");
+        uconn.setAllowUserInteraction(false);
+        uconn.setDefaultUseCaches(false);
+        uconn.setDoInput(true);
+        uconn.setDoOutput(false);
+        uconn.setInstanceFollowRedirects(true);
+        uconn.setUseCaches(false);
+
+        // username/password info in the URL overrides passed in values 
+        String auth = null;
+        if (userinfo != null) {
+            auth = userinfo;
+        } else if (username != null) {
+            auth = (password == null) ? username : username + ":" + password;
+        }
+        
+        if (auth != null) {
+            uconn.setRequestProperty("Authorization",
+                                     "Basic " + 
+                                     base64encode(auth.getBytes(charEncoding)));
+        }
+        
+        uconn.connect();
+
+        return new InputSource(uconn.getInputStream());
+    }
+
+    public static final String base64encode(byte[] bytes) {
+        return new String(Base64.encode(bytes));
+    }
+
+    public static InputSource getEmptyInputSource() {
+        return new InputSource(bais);
+    }
+    
+    /**
+     * Find a Node with a given QNameb
+     * 
+     * @param node parent node
+     * @param name QName of the child we need to find
+     * @return child node
+     */ 
+    public static Node findNode(Node node, QName name){
+        if(name.getNamespaceURI().equals(node.getNamespaceURI()) && 
+           name.getLocalPart().equals(node.getLocalName()))
+            return node;
+        NodeList children = node.getChildNodes();
+        for(int i=0;i<children.getLength();i++){
+            Node ret = findNode(children.item(i), name);
+            if(ret != null)
+                return ret;
+        }
+        return null;
+    }
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java Thu Sep 15 11:52:11 2005
@@ -1,65 +1,65 @@
-package org.apache.axis2.wsdl.util;
-
-
-import javax.xml.transform.*;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-
-/*
- * 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.
- *
- *  The XSLT template processor
- * this is based on the JDK built in transformers
- */
-
-public class XSLTTemplateProcessor {
-
-    /**
-     * Parses an XML stream with an XSL stream
-     *
-     * @param out        Stream to write the output
-     * @param xmlStream  Source XML stream
-     * @param xsltStream Source XSL stream
-     * @throws TransformerFactoryConfigurationError
-     *
-     * @throws TransformerException
-     */
-    public static void parse(OutputStream out,
-                             InputStream xmlStream,
-                             InputStream xsltStream)
-            throws TransformerFactoryConfigurationError, TransformerException {
-
-//        byte [] bytes = new byte[10000];
-//        try {
-//            IOUtils.readFully(xmlStream, bytes);
-//        } catch (IOException e) {
-//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-//        }
-//        System.out.print(new String(bytes));
-
-        Source xmlSource = new StreamSource(xmlStream);
-        Source xsltSource = new StreamSource(xsltStream);
-        Result result = new StreamResult(out);
-        Transformer transformer = TransformerFactory.newInstance()
-                .newTransformer(xsltSource);
-        transformer.transform(xmlSource, result);
-
-    }
-
-
-}
+package org.apache.axis2.wsdl.util;
+
+
+import javax.xml.transform.*;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+
+/*
+ * 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.
+ *
+ *  The XSLT template processor
+ * this is based on the JDK built in transformers
+ */
+
+public class XSLTTemplateProcessor {
+
+    /**
+     * Parses an XML stream with an XSL stream
+     *
+     * @param out        Stream to write the output
+     * @param xmlStream  Source XML stream
+     * @param xsltStream Source XSL stream
+     * @throws TransformerFactoryConfigurationError
+     *
+     * @throws TransformerException
+     */
+    public static void parse(OutputStream out,
+                             InputStream xmlStream,
+                             InputStream xsltStream)
+            throws TransformerFactoryConfigurationError, TransformerException {
+
+//        byte [] bytes = new byte[10000];
+//        try {
+//            IOUtils.readFully(xmlStream, bytes);
+//        } catch (IOException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        System.out.print(new String(bytes));
+
+        Source xmlSource = new StreamSource(xmlStream);
+        Source xsltSource = new StreamSource(xsltStream);
+        Result result = new StreamResult(out);
+        Transformer transformer = TransformerFactory.newInstance()
+                .newTransformer(xsltSource);
+        transformer.transform(xmlSource, result);
+
+    }
+
+
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/Component.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/Component.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/Component.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/Component.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;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface Component {
-    /**
-     * Returns the properties that are specific to this WSDL Component.
-     *
-     * @return
-     */
-    public HashMap getComponentProperties();
-
-    /**
-     * Sets the properties of the Component if any.
-     *
-     * @param properties
-     */
-    public void setComponentProperties(HashMap properties);
-
-    /**
-     * Will set the property keyed with the relavent key
-     *
-     * @param key Key in the map
-     * @param obj Object to be put
-     */
-    public void setComponentProperty(Object key, Object obj);
-
-    /**
-     * Gets the component property
-     *
-     * @param key key for the map search.
-     * @return
-     */
-    public Object getComponentProperty(Object key);
-
-    /**
-     * Adds the <code>ExtensibilityElement</code> to the Extensible Component.
-     *
-     * @param element
-     */
-    public void addExtensibilityElement(WSDLExtensibilityElement element);
-
-    /**
-     * Returns the Extensibility Elements of the Extensible component;
-     *
-     * @return List of <code>Element</code>s
-     */
-    public List getExtensibilityElements();
-
-    /**
-     * Returns a <code>List</code> of ExtensibleAttributes of this component.
-     *
-     * @return <code>List</code>
-     */
-    public List getExtensibilityAttributes();
-
-    /**
-     * Adds the <code>ExtensibilityAttribute</code> as a attrebute of this
-     * Component.
-     *
-     * @param attribute <code>ExtensibilityAttribute</code>
-     */
-    public void addExtensibleAttributes(WSDLExtensibilityAttribute attribute);
-
-    /**
-     * Get access to the metadata bag associated with this component (which
-     * contains anything we feel like hanging off it)
-     *
-     * @return the metadata Map.
-     */
-    public Map getMetadataBag();
-}
+/*
+ * 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 java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface Component {
+    /**
+     * Returns the properties that are specific to this WSDL Component.
+     *
+     * @return
+     */
+    public HashMap getComponentProperties();
+
+    /**
+     * Sets the properties of the Component if any.
+     *
+     * @param properties
+     */
+    public void setComponentProperties(HashMap properties);
+
+    /**
+     * Will set the property keyed with the relavent key
+     *
+     * @param key Key in the map
+     * @param obj Object to be put
+     */
+    public void setComponentProperty(Object key, Object obj);
+
+    /**
+     * Gets the component property
+     *
+     * @param key key for the map search.
+     * @return
+     */
+    public Object getComponentProperty(Object key);
+
+    /**
+     * Adds the <code>ExtensibilityElement</code> to the Extensible Component.
+     *
+     * @param element
+     */
+    public void addExtensibilityElement(WSDLExtensibilityElement element);
+
+    /**
+     * Returns the Extensibility Elements of the Extensible component;
+     *
+     * @return List of <code>Element</code>s
+     */
+    public List getExtensibilityElements();
+
+    /**
+     * Returns a <code>List</code> of ExtensibleAttributes of this component.
+     *
+     * @return <code>List</code>
+     */
+    public List getExtensibilityAttributes();
+
+    /**
+     * Adds the <code>ExtensibilityAttribute</code> as a attrebute of this
+     * Component.
+     *
+     * @param attribute <code>ExtensibilityAttribute</code>
+     */
+    public void addExtensibleAttributes(WSDLExtensibilityAttribute attribute);
+
+    /**
+     * Get access to the metadata bag associated with this component (which
+     * contains anything we feel like hanging off it)
+     *
+     * @return the metadata Map.
+     */
+    public Map getMetadataBag();
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibleComponent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibleComponent.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibleComponent.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/ExtensibleComponent.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;
-
-import java.util.List;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface ExtensibleComponent extends Component {
-    /**
-     * Will add a <code>WSDLFeature</code> to the feature list.
-     * If feature is null it will not be added.
-     * <code>ExtensibleComponent</code>
-     *
-     * @param feature
-     */
-    public void addFeature(WSDLFeature feature);
-
-    /**
-     * Will return the <code>WSDLFeature</code>s. If there aren't
-     * any features an empty list will be returned.
-     *
-     * @return
-     */
-    public List getFeatures();
-
-    /**
-     * Wll add the property to the component properties. If the property is null it will
-     * not be added.
-     *
-     * @param wsdlProperty
-     */
-    public void addProperty(WSDLProperty wsdlProperty);
-
-    /**
-     * Returns the Component Properties. If none exist an empty list will be returned.
-     *
-     * @return
-     */
-    public List getProperties();
-
-
-}
+/*
+ * 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 java.util.List;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface ExtensibleComponent extends Component {
+    /**
+     * Will add a <code>WSDLFeature</code> to the feature list.
+     * If feature is null it will not be added.
+     * <code>ExtensibleComponent</code>
+     *
+     * @param feature
+     */
+    public void addFeature(WSDLFeature feature);
+
+    /**
+     * Will return the <code>WSDLFeature</code>s. If there aren't
+     * any features an empty list will be returned.
+     *
+     * @return
+     */
+    public List getFeatures();
+
+    /**
+     * Wll add the property to the component properties. If the property is null it will
+     * not be added.
+     *
+     * @param wsdlProperty
+     */
+    public void addProperty(WSDLProperty wsdlProperty);
+
+    /**
+     * Returns the Component Properties. If none exist an empty list will be returned.
+     *
+     * @return
+     */
+    public List getProperties();
+
+
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/MessageReference.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/MessageReference.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/MessageReference.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/MessageReference.java Thu Sep 15 11:52:11 2005
@@ -1,66 +1,66 @@
-/*
- * 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 javax.xml.namespace.QName;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface MessageReference extends ExtensibleComponent {
-    /**
-     * Method getDirection
-     *
-     * @return
-     */
-    public String getDirection();
-
-    /**
-     * Method setDirection
-     *
-     * @param direction
-     */
-    public void setDirection(String direction);
-
-    /**
-     * This Element refers to the actual message that will get transported. This Element
-     * Abstracts all the Message Parts that was defined in the WSDL 1.1.
-     *
-     * @return
-     */
-    public QName getElement();
-
-    /**
-     * Method setElement
-     *
-     * @param element
-     */
-    public void setElement(QName element);
-
-    /**
-     * Method getMessageLabel
-     *
-     * @return
-     */
-    public String getMessageLabel();
-
-    /**
-     * Method setMessageLabel
-     *
-     * @param messageLabel
-     */
-    public void setMessageLabel(String messageLabel);
-}
+/*
+ * 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 javax.xml.namespace.QName;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface MessageReference extends ExtensibleComponent {
+    /**
+     * Method getDirection
+     *
+     * @return
+     */
+    public String getDirection();
+
+    /**
+     * Method setDirection
+     *
+     * @param direction
+     */
+    public void setDirection(String direction);
+
+    /**
+     * This Element refers to the actual message that will get transported. This Element
+     * Abstracts all the Message Parts that was defined in the WSDL 1.1.
+     *
+     * @return
+     */
+    public QName getElement();
+
+    /**
+     * Method setElement
+     *
+     * @param element
+     */
+    public void setElement(QName element);
+
+    /**
+     * Method getMessageLabel
+     *
+     * @return
+     */
+    public String getMessageLabel();
+
+    /**
+     * Method setMessageLabel
+     *
+     * @param messageLabel
+     */
+    public void setMessageLabel(String messageLabel);
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBinding.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBinding.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBinding.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBinding.java Thu Sep 15 11:52:11 2005
@@ -1,117 +1,117 @@
-/*
- * 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 javax.xml.namespace.QName;
-import java.util.HashMap;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface WSDLBinding extends ExtensibleComponent {
-    /**
-     * Method getBoundInterface
-     *
-     * @return WSDLInterface
-     */
-    public WSDLInterface getBoundInterface();
-
-    /**
-     * Method setBoundInterface
-     *
-     * @param boundInterface
-     */
-    public void setBoundInterface(WSDLInterface boundInterface);
-
-    /**
-     * Method getName
-     *
-     * @return  QName
-     */
-    public QName getName();
-
-    /**
-     * Method setName
-     *
-     * @param name
-     */
-    public void setName(QName name);
-
-    /**
-     * Method getTargetNameSpace
-     *
-     * @return  String
-     */
-    public String getTargetNameSpace();
-
-    /**
-     * Method getBindingFaults
-     *
-     * @return String
-     */
-    public HashMap getBindingFaults();
-
-    /**
-     * Method setBindingFaults
-     *
-     * @param bindingFaults
-     */
-    public void setBindingFaults(HashMap bindingFaults);
-
-    /**
-     * Method getBindingOperations
-     *
-     * @return  Hashmap
-     */
-    public HashMap getBindingOperations();
-
-    /**
-     * Method setBindingOperations
-     *
-     * @param bindingOperations
-     */
-    public void setBindingOperations(HashMap bindingOperations);
-
-    /**
-     * Method addBindingOperation
-     *
-     * @param bindingOperation
-     */
-    public void addBindingOperation(WSDLBindingOperation bindingOperation);
-
-    /**
-     * Method getBindingOperation
-     *
-     * @param qName
-     * @return  Hashmap
-     */
-    public WSDLBindingOperation getBindingOperation(QName qName);
-
-    /**
-     * Method addBindingFaults
-     *
-     * @param bindingFault
-     */
-    public void addBindingFaults(WSDLBindingFault bindingFault);
-
-    /**
-     * Method getBindingFault
-     *
-     * @param ref
-     * @return  Hashmap
-     */
-    public WSDLBindingFault getBindingFault(QName ref);
-}
+/*
+ * 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 javax.xml.namespace.QName;
+import java.util.HashMap;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface WSDLBinding extends ExtensibleComponent {
+    /**
+     * Method getBoundInterface
+     *
+     * @return WSDLInterface
+     */
+    public WSDLInterface getBoundInterface();
+
+    /**
+     * Method setBoundInterface
+     *
+     * @param boundInterface
+     */
+    public void setBoundInterface(WSDLInterface boundInterface);
+
+    /**
+     * Method getName
+     *
+     * @return  QName
+     */
+    public QName getName();
+
+    /**
+     * Method setName
+     *
+     * @param name
+     */
+    public void setName(QName name);
+
+    /**
+     * Method getTargetNameSpace
+     *
+     * @return  String
+     */
+    public String getTargetNameSpace();
+
+    /**
+     * Method getBindingFaults
+     *
+     * @return String
+     */
+    public HashMap getBindingFaults();
+
+    /**
+     * Method setBindingFaults
+     *
+     * @param bindingFaults
+     */
+    public void setBindingFaults(HashMap bindingFaults);
+
+    /**
+     * Method getBindingOperations
+     *
+     * @return  Hashmap
+     */
+    public HashMap getBindingOperations();
+
+    /**
+     * Method setBindingOperations
+     *
+     * @param bindingOperations
+     */
+    public void setBindingOperations(HashMap bindingOperations);
+
+    /**
+     * Method addBindingOperation
+     *
+     * @param bindingOperation
+     */
+    public void addBindingOperation(WSDLBindingOperation bindingOperation);
+
+    /**
+     * Method getBindingOperation
+     *
+     * @param qName
+     * @return  Hashmap
+     */
+    public WSDLBindingOperation getBindingOperation(QName qName);
+
+    /**
+     * Method addBindingFaults
+     *
+     * @param bindingFault
+     */
+    public void addBindingFaults(WSDLBindingFault bindingFault);
+
+    /**
+     * Method getBindingFault
+     *
+     * @param ref
+     * @return  Hashmap
+     */
+    public WSDLBindingFault getBindingFault(QName ref);
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingFault.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingFault.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingFault.java Thu Sep 15 11:52:11 2005
@@ -1,37 +1,37 @@
-/*
- * 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 javax.xml.namespace.QName;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface WSDLBindingFault extends Component {
-    /**
-     * Method getRef
-     *
-     * @return
-     */
-    public QName getRef();
-
-    /**
-     * Method setRef
-     *
-     * @param ref
-     */
-    public void setRef(QName ref);
-}
+/*
+ * 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 javax.xml.namespace.QName;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface WSDLBindingFault extends Component {
+    /**
+     * Method getRef
+     *
+     * @return
+     */
+    public QName getRef();
+
+    /**
+     * Method setRef
+     *
+     * @param ref
+     */
+    public void setRef(QName ref);
+}

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

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

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingOperation.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingOperation.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLBindingOperation.java Thu Sep 15 11:52:11 2005
@@ -1,119 +1,119 @@
-/*
- * 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 javax.xml.namespace.QName;
-import java.util.List;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface WSDLBindingOperation extends ExtensibleComponent {
-  
-    /**
-     * Method getInput
-     *
-     * @return messgae reference
-     */
-    public WSDLBindingMessageReference getInput();
-
-    /**
-     * Method setInput
-     *
-     * @param input
-     */
-    public void setInput(WSDLBindingMessageReference input);
-
-    /**
-     * Method getOperation
-     *
-     * @return the wsl operation
-     */
-    public WSDLOperation getOperation();
-
-    /**
-     * Method setOperation
-     *
-     * @param operation
-     */
-    public void setOperation(WSDLOperation operation);
-
-    /**
-     * Method getOutput
-     *
-     * @return wsdl binding message reference
-     */
-    public WSDLBindingMessageReference getOutput();
-
-    /**
-     * Method setOutput
-     *
-     * @param output
-     */
-    public void setOutput(WSDLBindingMessageReference output);
-
-    /**
-     * Method getName
-     *
-     * @return  QName of this element
-     */
-    public QName getName();
-
-    /**
-     * Method setName
-     *
-     * @param name
-     */
-    public void setName(QName name);
-
-    /**
-     * Add the InFault to the Components InFaults
-     *
-     * @param inFault
-     */
-    public void addInFault(WSDLBindingFault inFault);
-
-    /**
-     * Add the OutFault to the Component OutFaults
-     *
-     * @param outFault
-     */
-    public void addOutFault(WSDLBindingFault outFault);
-
-    /**
-     * @return The list of infault <code>WSDLBindingFault</code>s
-     */
-    public List getInfaults();
-
-    /**
-     * Sets the list of infault <code>WSDLBindingFault</code>s
-     *
-     * @param infaults
-     */
-    public void setInfaults(List infaults);
-
-    /**
-     * @return The list of Outfaults <code>WSDLBindingFault</code>s
-     */
-    public List getOutfaults();
-
-    /**
-     * Sets the list of outfault <code>WSDLBindingFault</code>s
-     *
-     * @param outfaults
-     */
-    public void setOutfaults(List outfaults);
-}
+/*
+ * 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 javax.xml.namespace.QName;
+import java.util.List;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface WSDLBindingOperation extends ExtensibleComponent {
+  
+    /**
+     * Method getInput
+     *
+     * @return messgae reference
+     */
+    public WSDLBindingMessageReference getInput();
+
+    /**
+     * Method setInput
+     *
+     * @param input
+     */
+    public void setInput(WSDLBindingMessageReference input);
+
+    /**
+     * Method getOperation
+     *
+     * @return the wsl operation
+     */
+    public WSDLOperation getOperation();
+
+    /**
+     * Method setOperation
+     *
+     * @param operation
+     */
+    public void setOperation(WSDLOperation operation);
+
+    /**
+     * Method getOutput
+     *
+     * @return wsdl binding message reference
+     */
+    public WSDLBindingMessageReference getOutput();
+
+    /**
+     * Method setOutput
+     *
+     * @param output
+     */
+    public void setOutput(WSDLBindingMessageReference output);
+
+    /**
+     * Method getName
+     *
+     * @return  QName of this element
+     */
+    public QName getName();
+
+    /**
+     * Method setName
+     *
+     * @param name
+     */
+    public void setName(QName name);
+
+    /**
+     * Add the InFault to the Components InFaults
+     *
+     * @param inFault
+     */
+    public void addInFault(WSDLBindingFault inFault);
+
+    /**
+     * Add the OutFault to the Component OutFaults
+     *
+     * @param outFault
+     */
+    public void addOutFault(WSDLBindingFault outFault);
+
+    /**
+     * @return The list of infault <code>WSDLBindingFault</code>s
+     */
+    public List getInfaults();
+
+    /**
+     * Sets the list of infault <code>WSDLBindingFault</code>s
+     *
+     * @param infaults
+     */
+    public void setInfaults(List infaults);
+
+    /**
+     * @return The list of Outfaults <code>WSDLBindingFault</code>s
+     */
+    public List getOutfaults();
+
+    /**
+     * Sets the list of outfault <code>WSDLBindingFault</code>s
+     *
+     * @param outfaults
+     */
+    public void setOutfaults(List outfaults);
+}

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

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLConstants.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLConstants.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLConstants.java Thu Sep 15 11:52:11 2005
@@ -1,136 +1,136 @@
-/*
- * 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;
-
-/**
- * @author chathura@opensource.lk
- */
-public interface WSDLConstants {
-    /**
-     * Field WSDL2_0_NAMESPACE
-     */
-    public static final String WSDL2_0_NAMESPACE = "http://www.w3.org/2004/03/wsdl";
-
-    /**
-     * Field WSDL1_1_NAMESPACE
-     */
-    public static final String WSDL1_1_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/";
-
-
-    /**
-     * Field WSDL_MESSAGE_DIRECTION_IN
-     */
-    public static final String WSDL_MESSAGE_DIRECTION_IN = "in";
-
-
-    /**
-     * Field WSDL_MESSAGE_DIRECTION_OUT
-     */
-    public static final String WSDL_MESSAGE_DIRECTION_OUT = "out";
-
-    // ////////////////////////////////////////////////////////////////
-    // /////////////Message Exchange Pattern Constants/////////////////
-    // ////////////////////////////////////////////////////////////////
-
-    /**
-     * Field MEP_URI_IN_ONLY
-     */
-    public static final String MEP_URI_IN_ONLY = "http://www.w3.org/2004/08/wsdl/in-only";
-
-    public static final int MEP_CONSTANT_IN_ONLY = 10;
-
-    /**
-     * Field MEP_URI_ROBUST_IN_ONLY
-     */
-    public static final String MEP_URI_ROBUST_IN_ONLY = "http://www.w3.org/2004/08/wsdl/robust-in-only";
-
-    public static final int MEP_CONSTANT_ROBUST_IN_ONLY = 11;
-
-    /**
-     * Field MEP_URI_IN_OUT
-     */
-    public static final String MEP_URI_IN_OUT = "http://www.w3.org/2004/08/wsdl/in-out";
-
-    public static final int MEP_CONSTANT_IN_OUT = 12;
-
-    /**
-     * Field MEP_URI_IN_OPTIONAL_OUT
-     */
-    public static final String MEP_URI_IN_OPTIONAL_OUT = "http://www.w3.org/2004/08/wsdl/in-opt-out";
-
-    public static final int MEP_CONSTANT_IN_OPTIONAL_OUT = 13;
-
-    /**
-     * Field MEP_URI_OUT_ONLY
-     */
-    public static final String MEP_URI_OUT_ONLY = "http://www.w3.org/2004/08/wsdl/out-only";
-
-    public static final int MEP_CONSTANT_OUT_ONLY = 14;
-
-    /**
-     * Field MEP_URI_ROBUST_OUT_ONLY
-     */
-    public static final String MEP_URI_ROBUST_OUT_ONLY = "http://www.w3.org/2004/08/wsdl/robust-out-only";
-
-    public static final int MEP_CONSTANT_ROBUST_OUT_ONLY = 15;
-
-    /**
-     * Field MEP_URI_OUT_IN
-     */
-    public static final String MEP_URI_OUT_IN = "http://www.w3.org/2004/08/wsdl/out-in";
-
-    public static final int MEP_CONSTANT_OUT_IN = 16;
-
-    /**
-     * Field MEP_URI_OUT_OPTIONL_IN
-     */
-    public static final String MEP_URI_OUT_OPTIONAL_IN = "http://www.w3.org/2004/08/wsdl/out-opt-in";
-
-    public static final int MEP_CONSTANT_OUT_OPTIONAL_IN = 17;
-
-
-    public static final int MEP_CONSTANT_INVALID = -1;
-
-    //////////////////////////////////////////////////
-    //////////////// Message Labels///////////////////
-    //////////////////////////////////////////////////
-
-    /**
-     * Constant to represent the message label "In" which is used by the
-     * following WSDL 2.0 defined MEPs: In-Only, Robust In-Only, In-Out,
-     * In-Optional-Out, Out-In, Out-Optional-In.
-     */
-    public static final byte MESSAGE_LABEL_IN = 0;
-
-    public static final String MESSAGE_LABEL_IN_VALUE = "In";
-
-    /**
-     * Constant to represent the message label "Out" which is used by the
-     * following WSDL 2.0 defined MEPs: In-Out, In-Optional-Out, Out-Only,
-     * Robust Out-Only, Out-In, Out-Optional-In.
-     */
-    public static final int MESSAGE_LABEL_OUT = 1;
-
-    public static final String MESSAGE_LABEL_OUT_VALUE = "Out";
-
-    /**
-     *
-     */
-    public static final String WSDL_USE_LITERAL = "literal";
-    public static final String WSDL_USE_ENCODED = "encoded";
-
-
-}
+/*
+ * 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;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public interface WSDLConstants {
+    /**
+     * Field WSDL2_0_NAMESPACE
+     */
+    public static final String WSDL2_0_NAMESPACE = "http://www.w3.org/2004/03/wsdl";
+
+    /**
+     * Field WSDL1_1_NAMESPACE
+     */
+    public static final String WSDL1_1_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/";
+
+
+    /**
+     * Field WSDL_MESSAGE_DIRECTION_IN
+     */
+    public static final String WSDL_MESSAGE_DIRECTION_IN = "in";
+
+
+    /**
+     * Field WSDL_MESSAGE_DIRECTION_OUT
+     */
+    public static final String WSDL_MESSAGE_DIRECTION_OUT = "out";
+
+    // ////////////////////////////////////////////////////////////////
+    // /////////////Message Exchange Pattern Constants/////////////////
+    // ////////////////////////////////////////////////////////////////
+
+    /**
+     * Field MEP_URI_IN_ONLY
+     */
+    public static final String MEP_URI_IN_ONLY = "http://www.w3.org/2004/08/wsdl/in-only";
+
+    public static final int MEP_CONSTANT_IN_ONLY = 10;
+
+    /**
+     * Field MEP_URI_ROBUST_IN_ONLY
+     */
+    public static final String MEP_URI_ROBUST_IN_ONLY = "http://www.w3.org/2004/08/wsdl/robust-in-only";
+
+    public static final int MEP_CONSTANT_ROBUST_IN_ONLY = 11;
+
+    /**
+     * Field MEP_URI_IN_OUT
+     */
+    public static final String MEP_URI_IN_OUT = "http://www.w3.org/2004/08/wsdl/in-out";
+
+    public static final int MEP_CONSTANT_IN_OUT = 12;
+
+    /**
+     * Field MEP_URI_IN_OPTIONAL_OUT
+     */
+    public static final String MEP_URI_IN_OPTIONAL_OUT = "http://www.w3.org/2004/08/wsdl/in-opt-out";
+
+    public static final int MEP_CONSTANT_IN_OPTIONAL_OUT = 13;
+
+    /**
+     * Field MEP_URI_OUT_ONLY
+     */
+    public static final String MEP_URI_OUT_ONLY = "http://www.w3.org/2004/08/wsdl/out-only";
+
+    public static final int MEP_CONSTANT_OUT_ONLY = 14;
+
+    /**
+     * Field MEP_URI_ROBUST_OUT_ONLY
+     */
+    public static final String MEP_URI_ROBUST_OUT_ONLY = "http://www.w3.org/2004/08/wsdl/robust-out-only";
+
+    public static final int MEP_CONSTANT_ROBUST_OUT_ONLY = 15;
+
+    /**
+     * Field MEP_URI_OUT_IN
+     */
+    public static final String MEP_URI_OUT_IN = "http://www.w3.org/2004/08/wsdl/out-in";
+
+    public static final int MEP_CONSTANT_OUT_IN = 16;
+
+    /**
+     * Field MEP_URI_OUT_OPTIONL_IN
+     */
+    public static final String MEP_URI_OUT_OPTIONAL_IN = "http://www.w3.org/2004/08/wsdl/out-opt-in";
+
+    public static final int MEP_CONSTANT_OUT_OPTIONAL_IN = 17;
+
+
+    public static final int MEP_CONSTANT_INVALID = -1;
+
+    //////////////////////////////////////////////////
+    //////////////// Message Labels///////////////////
+    //////////////////////////////////////////////////
+
+    /**
+     * Constant to represent the message label "In" which is used by the
+     * following WSDL 2.0 defined MEPs: In-Only, Robust In-Only, In-Out,
+     * In-Optional-Out, Out-In, Out-Optional-In.
+     */
+    public static final byte MESSAGE_LABEL_IN = 0;
+
+    public static final String MESSAGE_LABEL_IN_VALUE = "In";
+
+    /**
+     * Constant to represent the message label "Out" which is used by the
+     * following WSDL 2.0 defined MEPs: In-Out, In-Optional-Out, Out-Only,
+     * Robust Out-Only, Out-In, Out-Optional-In.
+     */
+    public static final int MESSAGE_LABEL_OUT = 1;
+
+    public static final String MESSAGE_LABEL_OUT_VALUE = "Out";
+
+    /**
+     *
+     */
+    public static final String WSDL_USE_LITERAL = "literal";
+    public static final String WSDL_USE_ENCODED = "encoded";
+
+
+}

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