You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/09/15 21:07:03 UTC

svn commit: r289289 [118/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/xml/src/org/apache/axis2/om/OMElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java Thu Sep 15 11:52:11 2005
@@ -1,258 +1,258 @@
-/*
-* 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.axis2.om;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import java.util.Iterator;
-
-/**
- * Interface OMElement
- */
-public interface OMElement extends OMNode, OMContainer {
-    /**
-     * This will add child to the element. One must preserve the order of children, in this operation
-     * Tip : appending the new child is prefered
-     *
-     * @param omNode
-     */
-    public void addChild(OMNode omNode);
-
-    /**
-     * This will search for children with a given QName and will return an iterator to traverse through
-     * the OMNodes.
-     * This will match localName and namespaceURI only. localName only or namespaceURI only can also be given. But
-     * the other parameter should be set to null
-     * Example : If you want to get all the addressing headers, header.getChildrenWithName(new QName(AddressingNamespace, null))
-     * will do.
-     *
-     * @param elementQName
-     * @return
-     * @throws OMException
-     */
-    public Iterator getChildrenWithName(QName elementQName) throws OMException;
-
-    /**
-     * This will return the first matched child, return null if none found
-     *
-     * @param elementQName
-     * @return
-     * @throws OMException
-     */
-    public OMElement getFirstChildWithName(QName elementQName) throws OMException;
-
-
-    /**
-     * This returns a collection of this element.
-     * Children can be of types OMElement, OMText.
-     *
-     * @return
-     */
-    public Iterator getChildren();
-
-    /**
-     * Returns a filtered list of children - just the elements.
-     *
-     * @return an iterator over the child elements
-     */ 
-    public Iterator getChildElements();
-
-    /**
-     * THis will create a namespace in the current element scope
-     *
-     * @param uri
-     * @param prefix
-     * @return
-     */
-    public OMNamespace declareNamespace(String uri, String prefix);
-
-    /**
-     * @param namespace
-     * @return
-     */
-    public OMNamespace declareNamespace(OMNamespace namespace);
-
-    /**
-     * This will find a namespace with the given uri and prefix, in the scope of the hierarchy.
-     * This will start to find from the current element and goes up in the hiararchy until this finds one.
-     * If none is found, return null
-     *
-     * @param uri
-     * @param prefix
-     * @return
-     * @throws OMException
-     */
-    public OMNamespace findNamespace(String uri, String prefix)
-            throws OMException;
-
-    /**
-     * @return
-     * @throws OMException
-     */
-    public Iterator getAllDeclaredNamespaces() throws OMException;
-
-
-    /**
-     * This will help to search for an attribute with a given QName within this Element
-     *
-     * @param qname
-     * @return
-     * @throws OMException
-     */
-    public OMAttribute getFirstAttribute(QName qname) throws OMException;
-
-    /**
-     * This will return a List of OMAttributes
-     *
-     * @return
-     */
-    public Iterator getAttributes();
-
-    /**
-     * Return a named attribute if present
-     *
-     * @param qname the qualified name to search for
-     * @return an OMAttribute with the given name if found, or null
-     */
-    public OMAttribute getAttribute(QName qname);
-
-    /**
-     * This will insert attribute to this element. Implementor can decide as to insert this
-     * in the front or at the end of set of attributes
-     *
-     * @param attr
-     * @return
-     */
-    public OMAttribute addAttribute(OMAttribute attr);
-
-    /**
-     * @param attributeName
-     * @param value
-     * @param ns            - the namespace has to be one of the in scope namespace. i.e. the passed namespace
-     *                      must be declared in the parent element of this attribute or ancestors of the parent element of the attribute
-     * @return
-     */
-    public OMAttribute addAttribute(String attributeName, String value,
-                                    OMNamespace ns);
-
-    /**
-     * Method removeAttribute
-     *
-     * @param attr
-     */
-    public void removeAttribute(OMAttribute attr);
-
-    /**
-     * Method setBuilder
-     *
-     * @param wrapper
-     */
-    public void setBuilder(OMXMLParserWrapper wrapper);
-
-    /**
-     * Method getBuilder
-     *
-     * @return
-     */
-    public OMXMLParserWrapper getBuilder();
-
-    /**
-     * Set the first child
-     *
-     * @param node
-     */
-    public void setFirstChild(OMNode node);
-
-    /**
-     * Get the first child
-     *
-     * @return
-     */
-    public OMNode getFirstChild();
-
-    /**
-     * Convenience extension of the getFirstChild
-     *
-     * @return
-     */
-
-    public OMElement getFirstElement();
-
-
-    /**
-     * Returns the pull parser that will generate the pull
-     * events relevant to THIS element. Caching is on
-     *
-     * @return
-     */
-    public XMLStreamReader getXMLStreamReader();
-
-    /**
-     * Returns the pull parser that will generate the pull
-     * events relevant to THIS element.caching is off
-     *
-     * @return
-     */
-    public XMLStreamReader getXMLStreamReaderWithoutCaching();
-
-    /**
-     * @param text
-     */
-    public void setText(String text);
-
-    /**
-     * This will return the non-empty text children as a String
-     *
-     * @return
-     */
-    public String getText();
-
-    /**
-     * Method getLocalName
-     *
-     * @return
-     */
-    public String getLocalName();
-
-    /**
-     * Method setLocalName
-     *
-     * @param localName
-     */
-    public void setLocalName(String localName);
-
-    /**
-     * @return the OMNamespace object associated with this element
-     * @throws OMException
-     */
-    public OMNamespace getNamespace() throws OMException;
-
-    /**
-     * sets the Namespace
-     *
-     * @param namespace
-     */
-    public void setNamespace(OMNamespace namespace);
-
-    /**
-     * Get the Qname of this node
-     *
-     * @return
-     */
-    public QName getQName();
-
-
-}
+/*
+* 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.axis2.om;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import java.util.Iterator;
+
+/**
+ * Interface OMElement
+ */
+public interface OMElement extends OMNode, OMContainer {
+    /**
+     * This will add child to the element. One must preserve the order of children, in this operation
+     * Tip : appending the new child is prefered
+     *
+     * @param omNode
+     */
+    public void addChild(OMNode omNode);
+
+    /**
+     * This will search for children with a given QName and will return an iterator to traverse through
+     * the OMNodes.
+     * This will match localName and namespaceURI only. localName only or namespaceURI only can also be given. But
+     * the other parameter should be set to null
+     * Example : If you want to get all the addressing headers, header.getChildrenWithName(new QName(AddressingNamespace, null))
+     * will do.
+     *
+     * @param elementQName
+     * @return
+     * @throws OMException
+     */
+    public Iterator getChildrenWithName(QName elementQName) throws OMException;
+
+    /**
+     * This will return the first matched child, return null if none found
+     *
+     * @param elementQName
+     * @return
+     * @throws OMException
+     */
+    public OMElement getFirstChildWithName(QName elementQName) throws OMException;
+
+
+    /**
+     * This returns a collection of this element.
+     * Children can be of types OMElement, OMText.
+     *
+     * @return
+     */
+    public Iterator getChildren();
+
+    /**
+     * Returns a filtered list of children - just the elements.
+     *
+     * @return an iterator over the child elements
+     */ 
+    public Iterator getChildElements();
+
+    /**
+     * THis will create a namespace in the current element scope
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public OMNamespace declareNamespace(String uri, String prefix);
+
+    /**
+     * @param namespace
+     * @return
+     */
+    public OMNamespace declareNamespace(OMNamespace namespace);
+
+    /**
+     * This will find a namespace with the given uri and prefix, in the scope of the hierarchy.
+     * This will start to find from the current element and goes up in the hiararchy until this finds one.
+     * If none is found, return null
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     * @throws OMException
+     */
+    public OMNamespace findNamespace(String uri, String prefix)
+            throws OMException;
+
+    /**
+     * @return
+     * @throws OMException
+     */
+    public Iterator getAllDeclaredNamespaces() throws OMException;
+
+
+    /**
+     * This will help to search for an attribute with a given QName within this Element
+     *
+     * @param qname
+     * @return
+     * @throws OMException
+     */
+    public OMAttribute getFirstAttribute(QName qname) throws OMException;
+
+    /**
+     * This will return a List of OMAttributes
+     *
+     * @return
+     */
+    public Iterator getAttributes();
+
+    /**
+     * Return a named attribute if present
+     *
+     * @param qname the qualified name to search for
+     * @return an OMAttribute with the given name if found, or null
+     */
+    public OMAttribute getAttribute(QName qname);
+
+    /**
+     * This will insert attribute to this element. Implementor can decide as to insert this
+     * in the front or at the end of set of attributes
+     *
+     * @param attr
+     * @return
+     */
+    public OMAttribute addAttribute(OMAttribute attr);
+
+    /**
+     * @param attributeName
+     * @param value
+     * @param ns            - the namespace has to be one of the in scope namespace. i.e. the passed namespace
+     *                      must be declared in the parent element of this attribute or ancestors of the parent element of the attribute
+     * @return
+     */
+    public OMAttribute addAttribute(String attributeName, String value,
+                                    OMNamespace ns);
+
+    /**
+     * Method removeAttribute
+     *
+     * @param attr
+     */
+    public void removeAttribute(OMAttribute attr);
+
+    /**
+     * Method setBuilder
+     *
+     * @param wrapper
+     */
+    public void setBuilder(OMXMLParserWrapper wrapper);
+
+    /**
+     * Method getBuilder
+     *
+     * @return
+     */
+    public OMXMLParserWrapper getBuilder();
+
+    /**
+     * Set the first child
+     *
+     * @param node
+     */
+    public void setFirstChild(OMNode node);
+
+    /**
+     * Get the first child
+     *
+     * @return
+     */
+    public OMNode getFirstChild();
+
+    /**
+     * Convenience extension of the getFirstChild
+     *
+     * @return
+     */
+
+    public OMElement getFirstElement();
+
+
+    /**
+     * Returns the pull parser that will generate the pull
+     * events relevant to THIS element. Caching is on
+     *
+     * @return
+     */
+    public XMLStreamReader getXMLStreamReader();
+
+    /**
+     * Returns the pull parser that will generate the pull
+     * events relevant to THIS element.caching is off
+     *
+     * @return
+     */
+    public XMLStreamReader getXMLStreamReaderWithoutCaching();
+
+    /**
+     * @param text
+     */
+    public void setText(String text);
+
+    /**
+     * This will return the non-empty text children as a String
+     *
+     * @return
+     */
+    public String getText();
+
+    /**
+     * Method getLocalName
+     *
+     * @return
+     */
+    public String getLocalName();
+
+    /**
+     * Method setLocalName
+     *
+     * @param localName
+     */
+    public void setLocalName(String localName);
+
+    /**
+     * @return the OMNamespace object associated with this element
+     * @throws OMException
+     */
+    public OMNamespace getNamespace() throws OMException;
+
+    /**
+     * sets the Namespace
+     *
+     * @param namespace
+     */
+    public void setNamespace(OMNamespace namespace);
+
+    /**
+     * Get the Qname of this node
+     *
+     * @return
+     */
+    public QName getQName();
+
+
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMException.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMException.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMException.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMException.java Thu Sep 15 11:52:11 2005
@@ -1,55 +1,55 @@
-/*
- * 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.axis2.om;
-
-/**
- * Class OMException
- */
-public class OMException extends RuntimeException {
-    /**
-     * Constructor OMException
-     */
-    public OMException() {
-    }
-
-    /**
-     * Constructor OMException
-     *
-     * @param message
-     */
-    public OMException(String message) {
-        super(message);
-    }
-
-    /**
-     * Constructor OMException
-     *
-     * @param message
-     * @param cause
-     */
-    public OMException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructor OMException
-     *
-     * @param cause
-     */
-    public OMException(Throwable cause) {
-        super(cause);
-    }
-}
+/*
+ * 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.axis2.om;
+
+/**
+ * Class OMException
+ */
+public class OMException extends RuntimeException {
+    /**
+     * Constructor OMException
+     */
+    public OMException() {
+    }
+
+    /**
+     * Constructor OMException
+     *
+     * @param message
+     */
+    public OMException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor OMException
+     *
+     * @param message
+     * @param cause
+     */
+    public OMException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructor OMException
+     *
+     * @param cause
+     */
+    public OMException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactory.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactory.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactory.java Thu Sep 15 11:52:11 2005
@@ -1,143 +1,143 @@
-/*
- * 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.axis2.om;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-
-/**
- * Class OMFactory
- */
-public interface OMFactory {
-
-	/**
-	 * Create a new OMDocument
-	 * @return
-	 */
-	public OMDocument createOMDocument();
-	
-    /**
-     * @param localName
-     * @param ns
-     * @return
-     */
-    public OMElement createOMElement(String localName, OMNamespace ns);
-    public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent);
-
-    /**
-     * @param localName
-     * @param ns
-     * @param parent
-     * @param builder
-     * @return
-     */
-    public OMElement createOMElement(String localName, OMNamespace ns,
-                                     OMContainer parent,
-                                     OMXMLParserWrapper builder);
-
-    /**
-     * This is almost the same as as createOMElement(localName,OMNamespace) method above.
-     * But some people may, for some reason, need to use the conventional method of putting a namespace.
-     * Or in other words people might not want to use the new OMNamespace.
-     * Well, this is for those people.
-     *
-     * @param localName
-     * @param namespaceURI
-     * @param namespacePrefix
-     * @return
-     */
-    public OMElement createOMElement(String localName,
-                                     String namespaceURI,
-                                     String namespacePrefix);
-
-    /**
-     * QName(localPart),
-     * QName(namespaceURI, localPart) - a prefix will be assigned to this
-     * QName(namespaceURI, localPart, prefix)
-     *
-     * @param qname
-     * @param parent
-     * @return
-     * @throws OMException
-     */
-    public OMElement createOMElement(QName qname, OMContainer parent)
-            throws OMException;
-
-    /**
-     * @param uri
-     * @param prefix
-     * @return
-     */
-    public OMNamespace createOMNamespace(String uri, String prefix);
-
-    /**
-     * @param parent
-     * @param text
-     * @return
-     */
-    public OMText createText(OMElement parent, String text);
-
-    /**
-     * @param s
-     * @return
-     */
-    public OMText createText(String s);
-
-    /**
-     *
-     * @param s
-     * @param type - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For Constants, use either
-     * XMLStreamConstants or constants found in OMNode.
-     * @return
-     */
-    public OMText createText(String s, int type);
-
-    public OMText createText(String s, String mimeType, boolean optimize);
-
-    public OMText createText(DataHandler dataHandler, boolean optimize);
-
-    public OMText createText(OMElement parent, String s, String mimeType,
-                             boolean optimize);
-
-    public OMAttribute createOMAttribute(String localName,
-                                         OMNamespace ns,
-                                         String value);
-
-    /**
-     * create DocType/DTD
-     * @param parent
-     * @param content
-     * @return doctype
-     */
-    public OMDocType createOMDocType(OMContainer parent, String content);
-
-    /**
-     * create a PI
-     * @param parent
-     * @param piTarget
-     * @param piData
-     * @return pi
-     */
-    public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData);
-
-    /**
-     * create a comment
-     * @param parent
-     * @param content
-     * @return comment
-     */
-    public OMComment createOMComment(OMContainer parent, String content);
-}
+/*
+ * 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.axis2.om;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+
+/**
+ * Class OMFactory
+ */
+public interface OMFactory {
+
+	/**
+	 * Create a new OMDocument
+	 * @return
+	 */
+	public OMDocument createOMDocument();
+	
+    /**
+     * @param localName
+     * @param ns
+     * @return
+     */
+    public OMElement createOMElement(String localName, OMNamespace ns);
+    public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public OMElement createOMElement(String localName, OMNamespace ns,
+                                     OMContainer parent,
+                                     OMXMLParserWrapper builder);
+
+    /**
+     * This is almost the same as as createOMElement(localName,OMNamespace) method above.
+     * But some people may, for some reason, need to use the conventional method of putting a namespace.
+     * Or in other words people might not want to use the new OMNamespace.
+     * Well, this is for those people.
+     *
+     * @param localName
+     * @param namespaceURI
+     * @param namespacePrefix
+     * @return
+     */
+    public OMElement createOMElement(String localName,
+                                     String namespaceURI,
+                                     String namespacePrefix);
+
+    /**
+     * QName(localPart),
+     * QName(namespaceURI, localPart) - a prefix will be assigned to this
+     * QName(namespaceURI, localPart, prefix)
+     *
+     * @param qname
+     * @param parent
+     * @return
+     * @throws OMException
+     */
+    public OMElement createOMElement(QName qname, OMContainer parent)
+            throws OMException;
+
+    /**
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public OMNamespace createOMNamespace(String uri, String prefix);
+
+    /**
+     * @param parent
+     * @param text
+     * @return
+     */
+    public OMText createText(OMElement parent, String text);
+
+    /**
+     * @param s
+     * @return
+     */
+    public OMText createText(String s);
+
+    /**
+     *
+     * @param s
+     * @param type - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For Constants, use either
+     * XMLStreamConstants or constants found in OMNode.
+     * @return
+     */
+    public OMText createText(String s, int type);
+
+    public OMText createText(String s, String mimeType, boolean optimize);
+
+    public OMText createText(DataHandler dataHandler, boolean optimize);
+
+    public OMText createText(OMElement parent, String s, String mimeType,
+                             boolean optimize);
+
+    public OMAttribute createOMAttribute(String localName,
+                                         OMNamespace ns,
+                                         String value);
+
+    /**
+     * create DocType/DTD
+     * @param parent
+     * @param content
+     * @return doctype
+     */
+    public OMDocType createOMDocType(OMContainer parent, String content);
+
+    /**
+     * create a PI
+     * @param parent
+     * @param piTarget
+     * @param piData
+     * @return pi
+     */
+    public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData);
+
+    /**
+     * create a comment
+     * @param parent
+     * @param content
+     * @return comment
+     */
+    public OMComment createOMComment(OMContainer parent, String content);
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactoryException.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactoryException.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactoryException.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactoryException.java Thu Sep 15 11:52:11 2005
@@ -1,55 +1,55 @@
-/*
- * 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.axis2.om;
-
-/**
- * Class OMFactoryException
- */
-public class OMFactoryException extends OMException {
-    /**
-     * Constructor OMFactoryException
-     */
-    public OMFactoryException() {
-    }
-
-    /**
-     * Constructor OMFactoryException
-     *
-     * @param message
-     */
-    public OMFactoryException(String message) {
-        super(message);
-    }
-
-    /**
-     * Constructor OMFactoryException
-     *
-     * @param message
-     * @param cause
-     */
-    public OMFactoryException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructor OMFactoryException
-     *
-     * @param cause
-     */
-    public OMFactoryException(Throwable cause) {
-        super(cause);
-    }
-}
+/*
+ * 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.axis2.om;
+
+/**
+ * Class OMFactoryException
+ */
+public class OMFactoryException extends OMException {
+    /**
+     * Constructor OMFactoryException
+     */
+    public OMFactoryException() {
+    }
+
+    /**
+     * Constructor OMFactoryException
+     *
+     * @param message
+     */
+    public OMFactoryException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor OMFactoryException
+     *
+     * @param message
+     * @param cause
+     */
+    public OMFactoryException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructor OMFactoryException
+     *
+     * @param cause
+     */
+    public OMFactoryException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMFactoryException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNamespace.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNamespace.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNamespace.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNamespace.java Thu Sep 15 11:52:11 2005
@@ -1,44 +1,44 @@
-/*
- * 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.axis2.om;
-
-/**
- * Interface OMNamespace
- */
-public interface OMNamespace {
-    /**
-     * Method equals
-     *
-     * @param uri
-     * @param prefix
-     * @return
-     */
-    public boolean equals(String uri, String prefix);
-
-    /**
-     * Method getPrefix
-     *
-     * @return
-     */
-    public String getPrefix();
-
-    /**
-     * Method getName
-     *
-     * @return
-     */
-    public String getName();
-}
+/*
+ * 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.axis2.om;
+
+/**
+ * Interface OMNamespace
+ */
+public interface OMNamespace {
+    /**
+     * Method equals
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public boolean equals(String uri, String prefix);
+
+    /**
+     * Method getPrefix
+     *
+     * @return
+     */
+    public String getPrefix();
+
+    /**
+     * Method getName
+     *
+     * @return
+     */
+    public String getName();
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNamespace.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMSerializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMText.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMText.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMText.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMText.java Thu Sep 15 11:52:11 2005
@@ -1,54 +1,54 @@
-/*
- * 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.axis2.om;
-
-import javax.activation.DataHandler;
-
-/**
- * Interface OMText
- */
-public interface OMText extends OMNode {
-    /**
-     * Returns the text value of this node
-     *
-     * @return string
-     */
-    String getText();
-
-    /**
-     * get the datahandler
-     * @return datahandler
-     */
-    DataHandler getDataHandler();
-
-    /**
-     * @return boolean flag saying whether the node contains
-     *         an optimized text or not
-     */
-    boolean isOptimized();
-
-    /**
-     * set the optimize flag
-     * @param value
-     */
-    void setOptimize(boolean value);
-
-    /**
-     * get the content id
-     * @return string
-     */
-    String getContentID();
+/*
+ * 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.axis2.om;
+
+import javax.activation.DataHandler;
+
+/**
+ * Interface OMText
+ */
+public interface OMText extends OMNode {
+    /**
+     * Returns the text value of this node
+     *
+     * @return string
+     */
+    String getText();
+
+    /**
+     * get the datahandler
+     * @return datahandler
+     */
+    DataHandler getDataHandler();
+
+    /**
+     * @return boolean flag saying whether the node contains
+     *         an optimized text or not
+     */
+    boolean isOptimized();
+
+    /**
+     * set the optimize flag
+     * @param value
+     */
+    void setOptimize(boolean value);
+
+    /**
+     * get the content id
+     * @return string
+     */
+    String getContentID();
 }

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMText.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMXMLParserWrapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMXMLParserWrapper.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMXMLParserWrapper.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMXMLParserWrapper.java Thu Sep 15 11:52:11 2005
@@ -1,95 +1,95 @@
-/*
- * 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.axis2.om;
-
-/**
- * Interface OMXMLParserWrapper
- */
-public interface OMXMLParserWrapper {
-    /**
-     * Proceed the parser one step and return the event value
-     *
-     * @return
-     * @throws org.apache.axis2.om.OMException
-     *
-     * @throws OMException
-     */
-    int next() throws OMException;
-
-    /**
-     * Discard the current element
-     * This should remove the given element and its decendants.
-     *
-     * @param el
-     * @throws org.apache.axis2.om.OMException
-     *
-     * @throws OMException
-     */
-    void discard(OMElement el) throws OMException;
-
-    /**
-     * @param b
-     * @throws org.apache.axis2.om.OMException
-     *
-     * @throws OMException
-     */
-    void setCache(boolean b) throws OMException;
-
-    /**
-     * Allows to access the underlying parser. Since the parser
-     * depends on the underlying implementation,an Object is returned
-     * However the implementations may have restrictions in letting access to
-     * the parser
-     *
-     * @return
-     */
-    Object getParser();
-
-    /**
-     * @return the complete status
-     */
-    boolean isCompleted();
-
-    /**
-     * @return the document element
-     */
-    OMElement getDocumentElement();
-
-    /**
-     * Returns the type of the builder.
-     * Can be either the
-     * PUSH_TYPE_BUILDER or PULL_TYPE_BUILDER
-     *
-     * @return
-     */
-    short getBuilderType();
-
-    /**
-     * Registers an external content handler. Especially useful for
-     * push type builders. will throw an unsupportedOperationExcveption if
-     * such handler registration is not supported
-     *
-     * @param obj
-     */
-    void registerExternalContentHandler(Object obj);
-
-    /**
-     * get the registered external content handler
-     *
-     * @return
-     */
-    Object getRegisteredContentHandler();
-}
+/*
+ * 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.axis2.om;
+
+/**
+ * Interface OMXMLParserWrapper
+ */
+public interface OMXMLParserWrapper {
+    /**
+     * Proceed the parser one step and return the event value
+     *
+     * @return
+     * @throws org.apache.axis2.om.OMException
+     *
+     * @throws OMException
+     */
+    int next() throws OMException;
+
+    /**
+     * Discard the current element
+     * This should remove the given element and its decendants.
+     *
+     * @param el
+     * @throws org.apache.axis2.om.OMException
+     *
+     * @throws OMException
+     */
+    void discard(OMElement el) throws OMException;
+
+    /**
+     * @param b
+     * @throws org.apache.axis2.om.OMException
+     *
+     * @throws OMException
+     */
+    void setCache(boolean b) throws OMException;
+
+    /**
+     * Allows to access the underlying parser. Since the parser
+     * depends on the underlying implementation,an Object is returned
+     * However the implementations may have restrictions in letting access to
+     * the parser
+     *
+     * @return
+     */
+    Object getParser();
+
+    /**
+     * @return the complete status
+     */
+    boolean isCompleted();
+
+    /**
+     * @return the document element
+     */
+    OMElement getDocumentElement();
+
+    /**
+     * Returns the type of the builder.
+     * Can be either the
+     * PUSH_TYPE_BUILDER or PULL_TYPE_BUILDER
+     *
+     * @return
+     */
+    short getBuilderType();
+
+    /**
+     * Registers an external content handler. Especially useful for
+     * push type builders. will throw an unsupportedOperationExcveption if
+     * such handler registration is not supported
+     *
+     * @param obj
+     */
+    void registerExternalContentHandler(Object obj);
+
+    /**
+     * get the registered external content handler
+     *
+     * @return
+     */
+    Object getRegisteredContentHandler();
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMXMLParserWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java Thu Sep 15 11:52:11 2005
@@ -1,139 +1,139 @@
-/*
- * 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.axis2.om.impl;
-
-import org.apache.axis2.om.OMException;
-import org.apache.axis2.om.OMText;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.activation.DataHandler;
-import javax.mail.MessagingException;
-import javax.mail.internet.MimeBodyPart;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-public class MIMEOutputUtils {
-
-    private static byte[] CRLF = {13, 10};
-    private Log log = LogFactory.getLog(getClass());
-
-    public static void complete(OutputStream outStream,
-                                OutputStream bufferedSoapOutStream, LinkedList binaryNodeList,
-                                String boundary, String contentId, String charSetEncoding,String SOAPContentType) {
-        try {
-            startWritingMime(outStream, boundary);
-
-            DataHandler dh = new DataHandler(bufferedSoapOutStream.toString(),
-                    "text/xml");
-            MimeBodyPart rootMimeBodyPart = new MimeBodyPart();
-            rootMimeBodyPart.setDataHandler(dh);
-            
-            rootMimeBodyPart.addHeader("content-type",
-                    "application/xop+xml; charset=" + charSetEncoding + 
-					"; type=\""+SOAPContentType+"\";");
-            rootMimeBodyPart.addHeader("content-transfer-encoding", "binary");
-            rootMimeBodyPart.addHeader("content-id","<"+contentId+">");
-
-            writeBodyPart(outStream, rootMimeBodyPart, boundary);
-
-            Iterator binaryNodeIterator = binaryNodeList.iterator();
-            while (binaryNodeIterator.hasNext()) {
-                OMText binaryNode = (OMText) binaryNodeIterator.next();
-                writeBodyPart(outStream, createMimeBodyPart(binaryNode),
-                        boundary);
-            }
-            finishWritingMime(outStream);
-        } catch (IOException e) {
-            throw new OMException("Problem with the OutputStream.", e);
-        } catch (MessagingException e) {
-            throw new OMException("Problem writing Mime Parts.", e);
-        }
-    }
-
-    public static MimeBodyPart createMimeBodyPart(OMText node)
-            throws MessagingException {
-        MimeBodyPart mimeBodyPart = new MimeBodyPart();
-        mimeBodyPart.setDataHandler(node.getDataHandler());
-        mimeBodyPart.addHeader("content-id", "<"+node.getContentID()+">");
-        mimeBodyPart.addHeader("content-type", "application/octet-stream");
-        mimeBodyPart.addHeader("content-transfer-encoding", "binary");
-        return mimeBodyPart;
-
-    }
-
-    /**
-     * @throws IOException This will write the boundary to output Stream
-     */
-    public static void writeMimeBoundary(OutputStream outStream,
-                                         String boundary) throws IOException {
-        outStream.write(new byte[]{45, 45});
-        outStream.write(boundary.getBytes());
-    }
-
-    /**
-     * @throws IOException This will write the boundary with CRLF
-     */
-    public static void startWritingMime(OutputStream outStream,
-                                        String boundary)
-            throws IOException {
-        writeMimeBoundary(outStream, boundary);
-        //outStream.write(CRLF);
-    }
-
-    /**
-     * this will write a CRLF for the earlier boudary then the BodyPart data
-     * with headers followed by boundary. Writes only the boundary. No more
-     * CRLF's are wriiting after that.
-     *
-     * @throws IOException
-     * @throws MessagingException
-     */
-    public static void writeBodyPart(OutputStream outStream,
-                                     MimeBodyPart part, String boundary) throws IOException,
-            MessagingException {
-        outStream.write(CRLF);
-        part.writeTo(outStream);
-        outStream.write(CRLF);
-        writeMimeBoundary(outStream, boundary);
-    }
-
-    /**
-     * @throws IOException This will write "--" to the end of last boundary
-     */
-    public static void finishWritingMime(OutputStream outStream)
-            throws IOException {
-        outStream.write(new byte[]{45, 45});
-    }
-
-    public static String getContentTypeForMime(String boundary, String contentId, String charSetEncoding, String SOAPContentType) {
-        StringBuffer sb = new StringBuffer();
-        sb.append("multipart/related");
-        sb.append("; ");
-        sb.append("boundary=");
-        sb.append(boundary);
-        sb.append("; ");
-        sb.append("type=\"application/xop+xml\"");
-        sb.append("; ");
-        sb.append("start=\"<" + contentId + ">\"");
-        sb.append("; ");
-        sb.append("start-info=\""+SOAPContentType+"\"");
-        return sb.toString();
-    }
-
+/*
+ * 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.axis2.om.impl;
+
+import org.apache.axis2.om.OMException;
+import org.apache.axis2.om.OMText;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.activation.DataHandler;
+import javax.mail.MessagingException;
+import javax.mail.internet.MimeBodyPart;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+public class MIMEOutputUtils {
+
+    private static byte[] CRLF = {13, 10};
+    private Log log = LogFactory.getLog(getClass());
+
+    public static void complete(OutputStream outStream,
+                                OutputStream bufferedSoapOutStream, LinkedList binaryNodeList,
+                                String boundary, String contentId, String charSetEncoding,String SOAPContentType) {
+        try {
+            startWritingMime(outStream, boundary);
+
+            DataHandler dh = new DataHandler(bufferedSoapOutStream.toString(),
+                    "text/xml");
+            MimeBodyPart rootMimeBodyPart = new MimeBodyPart();
+            rootMimeBodyPart.setDataHandler(dh);
+            
+            rootMimeBodyPart.addHeader("content-type",
+                    "application/xop+xml; charset=" + charSetEncoding + 
+					"; type=\""+SOAPContentType+"\";");
+            rootMimeBodyPart.addHeader("content-transfer-encoding", "binary");
+            rootMimeBodyPart.addHeader("content-id","<"+contentId+">");
+
+            writeBodyPart(outStream, rootMimeBodyPart, boundary);
+
+            Iterator binaryNodeIterator = binaryNodeList.iterator();
+            while (binaryNodeIterator.hasNext()) {
+                OMText binaryNode = (OMText) binaryNodeIterator.next();
+                writeBodyPart(outStream, createMimeBodyPart(binaryNode),
+                        boundary);
+            }
+            finishWritingMime(outStream);
+        } catch (IOException e) {
+            throw new OMException("Problem with the OutputStream.", e);
+        } catch (MessagingException e) {
+            throw new OMException("Problem writing Mime Parts.", e);
+        }
+    }
+
+    public static MimeBodyPart createMimeBodyPart(OMText node)
+            throws MessagingException {
+        MimeBodyPart mimeBodyPart = new MimeBodyPart();
+        mimeBodyPart.setDataHandler(node.getDataHandler());
+        mimeBodyPart.addHeader("content-id", "<"+node.getContentID()+">");
+        mimeBodyPart.addHeader("content-type", "application/octet-stream");
+        mimeBodyPart.addHeader("content-transfer-encoding", "binary");
+        return mimeBodyPart;
+
+    }
+
+    /**
+     * @throws IOException This will write the boundary to output Stream
+     */
+    public static void writeMimeBoundary(OutputStream outStream,
+                                         String boundary) throws IOException {
+        outStream.write(new byte[]{45, 45});
+        outStream.write(boundary.getBytes());
+    }
+
+    /**
+     * @throws IOException This will write the boundary with CRLF
+     */
+    public static void startWritingMime(OutputStream outStream,
+                                        String boundary)
+            throws IOException {
+        writeMimeBoundary(outStream, boundary);
+        //outStream.write(CRLF);
+    }
+
+    /**
+     * this will write a CRLF for the earlier boudary then the BodyPart data
+     * with headers followed by boundary. Writes only the boundary. No more
+     * CRLF's are wriiting after that.
+     *
+     * @throws IOException
+     * @throws MessagingException
+     */
+    public static void writeBodyPart(OutputStream outStream,
+                                     MimeBodyPart part, String boundary) throws IOException,
+            MessagingException {
+        outStream.write(CRLF);
+        part.writeTo(outStream);
+        outStream.write(CRLF);
+        writeMimeBoundary(outStream, boundary);
+    }
+
+    /**
+     * @throws IOException This will write "--" to the end of last boundary
+     */
+    public static void finishWritingMime(OutputStream outStream)
+            throws IOException {
+        outStream.write(new byte[]{45, 45});
+    }
+
+    public static String getContentTypeForMime(String boundary, String contentId, String charSetEncoding, String SOAPContentType) {
+        StringBuffer sb = new StringBuffer();
+        sb.append("multipart/related");
+        sb.append("; ");
+        sb.append("boundary=");
+        sb.append(boundary);
+        sb.append("; ");
+        sb.append("type=\"application/xop+xml\"");
+        sb.append("; ");
+        sb.append("start=\"<" + contentId + ">\"");
+        sb.append("; ");
+        sb.append("start-info=\""+SOAPContentType+"\"");
+        return sb.toString();
+    }
+
 }

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MTOMConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MTOMConstants.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MTOMConstants.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MTOMConstants.java Thu Sep 15 11:52:11 2005
@@ -1,39 +1,39 @@
-package org.apache.axis2.om.impl;
-
-/*
- * 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.
- *
- * author : Eran Chinthaka (chinthaka@apache.org)
- */
-
-public interface MTOMConstants {
-    public static final String XOP_INCLUDE = "Include";
-    public static final String XOP_NAMESPACE_URI = "http://www.w3.org/2004/08/xop/include";
-
-    /**
-     * if the Message is MTOM optimised then <code>MTOM_TYPE</code>
-     */
-    String MTOM_TYPE = "application/xop+xml";
-    /**
-     * If the message is Soap with Attachments <code>SwA_TYPE</code>
-     */
-    String SWA_TYPE = "text/xml";
-    /**
-     * <code>rootPart</code> is used as the key for the root BodyPart in the
-     * Parts HashMap
-     */
-    String ROOT_PART = "SoapPart";
-    String ATTACHMENTS = "Attachments";
-}
+package org.apache.axis2.om.impl;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+public interface MTOMConstants {
+    public static final String XOP_INCLUDE = "Include";
+    public static final String XOP_NAMESPACE_URI = "http://www.w3.org/2004/08/xop/include";
+
+    /**
+     * if the Message is MTOM optimised then <code>MTOM_TYPE</code>
+     */
+    String MTOM_TYPE = "application/xop+xml";
+    /**
+     * If the message is Soap with Attachments <code>SwA_TYPE</code>
+     */
+    String SWA_TYPE = "text/xml";
+    /**
+     * <code>rootPart</code> is used as the key for the root BodyPart in the
+     * Parts HashMap
+     */
+    String ROOT_PART = "SoapPart";
+    String ATTACHMENTS = "Attachments";
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MTOMConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/OMOutputImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/OMOutputImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/OMOutputImpl.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/OMOutputImpl.java Thu Sep 15 11:52:11 2005
@@ -1,231 +1,231 @@
-/*
- * 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.axis2.om.impl;
-
-    import org.apache.axis2.om.OMText;
-    import org.apache.axis2.soap.SOAP11Constants;
-    import org.apache.axis2.soap.SOAP12Constants;
-    import org.apache.axis2.util.UUIDGenerator;
-
-    import javax.xml.stream.FactoryConfigurationError;
-    import javax.xml.stream.XMLOutputFactory;
-    import javax.xml.stream.XMLStreamException;
-    import javax.xml.stream.XMLStreamWriter;
-    import java.io.ByteArrayOutputStream;
-    import java.io.OutputStream;
-    import java.util.LinkedList;
-
-
-/**
- * For the moment this assumes that transport takes the decision of whether
- * to optimise or not by looking at whether the MTOM optimise is enabled &
- * also looking at the OM tree whether it has any optimisable content
- */
-public class OMOutputImpl {
-    private XMLStreamWriter xmlWriter;
-    private boolean doOptimize;
-    private OutputStream outStream;
-    private LinkedList binaryNodeList;
-    private ByteArrayOutputStream bufferedSoapOutStream;
-    private String mimeBoundary = null;
-    private String rootContentId = null;
-    private int nextid = 0;
-    private boolean isSoap11 = true;
-
-    /**
-     * Field DEFAULT_CHAR_SET_ENCODING specifies the default
-     * character encoding scheme to be used
-     */
-    public static final String DEFAULT_CHAR_SET_ENCODING = "utf-8";
-
-    private String charSetEncoding;
-    private String xmlVersion;
-    private boolean ignoreXMLDeclaration = false;
-
-
-    public OMOutputImpl() {
-    }
-
-    public OMOutputImpl(XMLStreamWriter xmlWriter) {
-        this.xmlWriter = xmlWriter;
-    }
-
-    /**
-     * This creates a new OMOutputImpl with default encoding
-     * @see OMOutputImpl#DEFAULT_CHAR_SET_ENCODING
-     * @param outStream
-     * @param doOptimize
-     * @throws XMLStreamException
-     * @throws FactoryConfigurationError
-     */
-    public OMOutputImpl(OutputStream outStream, boolean doOptimize)
-        throws XMLStreamException, FactoryConfigurationError {
-        setOutputStream(outStream, doOptimize);
-    }
-
-    public void setOutputStream(OutputStream outStream, boolean doOptimize)
-        throws XMLStreamException, FactoryConfigurationError {
-
-        this.doOptimize = doOptimize;
-        this.outStream = outStream;
-
-        if (charSetEncoding == null) //Default encoding is UTF-8
-            this.charSetEncoding = DEFAULT_CHAR_SET_ENCODING;
-
-        XMLOutputFactory factory = XMLOutputFactory.newInstance();
-//        factory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.TRUE);
-        if (doOptimize) {
-            bufferedSoapOutStream = new ByteArrayOutputStream();
-            xmlWriter = factory.createXMLStreamWriter(bufferedSoapOutStream,
-                                                      this.charSetEncoding);
-            binaryNodeList = new LinkedList();
-        } else {
-            xmlWriter = factory.createXMLStreamWriter(outStream,
-                                                      this.charSetEncoding);
-        }
-    }
-
-    public void flush() throws XMLStreamException {
-        xmlWriter.flush();
-        String SOAPContentType;
-        if (doOptimize) {
-            if (isSoap11)
-            {
-                SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE;
-            }
-            else
-            {
-                SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE;
-            }
-            MIMEOutputUtils.complete(
-                outStream,
-                bufferedSoapOutStream,
-                binaryNodeList,
-                getMimeBoundary(),
-                getRootContentId(),
-                this.charSetEncoding,SOAPContentType);
-        }
-    }
-
-    public boolean isOptimized() {
-        return doOptimize;
-    }
-
-    public String getContentType() {
-        String SOAPContentType;
-        if (isOptimized()) {
-            if (isSoap11) {
-                SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE;
-            } else {
-                SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE;
-            }
-            return MIMEOutputUtils.getContentTypeForMime(
-                    getMimeBoundary(),
-                    getRootContentId(),
-                    this.getCharSetEncoding(), SOAPContentType);
-        } else {
-            if (!isSoap11) {
-                return SOAP12Constants.SOAP_12_CONTENT_TYPE;
-            } else {
-                return SOAP11Constants.SOAP_11_CONTENT_TYPE;
-            }
-        }
-    }
-
-    public void writeOptimized(OMText node) {
-        binaryNodeList.add(node);
-    }
-
-    public void setXmlStreamWriter(XMLStreamWriter xmlWriter) {
-        this.xmlWriter = xmlWriter;
-    }
-
-    public XMLStreamWriter getXmlStreamWriter() {
-        return xmlWriter;
-    }
-
-    public String getMimeBoundary() {
-        if (mimeBoundary == null) {
-            mimeBoundary =
-                "MIMEBoundary"
-                    + UUIDGenerator.getUUID();
-        }
-        return mimeBoundary;
-    }
-
-    public String getRootContentId() {
-        if (rootContentId == null) {
-            rootContentId =
-                "0."
-                    + UUIDGenerator.getUUID()
-                    + "@apache.org";
-        }
-        return rootContentId;
-    }
-
-    public String getNextContentId() {
-        nextid++;
-        return nextid
-            + "."
-            + UUIDGenerator.getUUID()
-            + "@apache.org";
-    }
-
-    /**
-     * Returns the character set endocing scheme If the value of the
-     * charSetEncoding is not set then the default will be returned
-     * 
-     * @return
-     */
-    public String getCharSetEncoding() {
-        return this.charSetEncoding;
-    }
-
-    public void setCharSetEncoding(String charSetEncoding) {
-        this.charSetEncoding = charSetEncoding;
-    }
-
-    public String getXmlVersion() {
-        return xmlVersion;
-    }
-
-    public void setXmlVersion(String xmlVersion) {
-        this.xmlVersion = xmlVersion;
-    }
-
-    /**
-     * @param b
-     */
-    public void setSoap11(boolean b) {
-        isSoap11 = b;
-    }
-
-    public boolean isIgnoreXMLDeclaration() {
-        return ignoreXMLDeclaration;
-    }
-
-    public void ignoreXMLDeclaration(boolean ignoreXMLDeclaration) {
-        this.ignoreXMLDeclaration = ignoreXMLDeclaration;
-    }
-
-
-    /**
-     * @param b
-     */
-    public void setDoOptimize(boolean b) {
-        doOptimize = b;
-    }
-}
+/*
+ * 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.axis2.om.impl;
+
+    import org.apache.axis2.om.OMText;
+    import org.apache.axis2.soap.SOAP11Constants;
+    import org.apache.axis2.soap.SOAP12Constants;
+    import org.apache.axis2.util.UUIDGenerator;
+
+    import javax.xml.stream.FactoryConfigurationError;
+    import javax.xml.stream.XMLOutputFactory;
+    import javax.xml.stream.XMLStreamException;
+    import javax.xml.stream.XMLStreamWriter;
+    import java.io.ByteArrayOutputStream;
+    import java.io.OutputStream;
+    import java.util.LinkedList;
+
+
+/**
+ * For the moment this assumes that transport takes the decision of whether
+ * to optimise or not by looking at whether the MTOM optimise is enabled &
+ * also looking at the OM tree whether it has any optimisable content
+ */
+public class OMOutputImpl {
+    private XMLStreamWriter xmlWriter;
+    private boolean doOptimize;
+    private OutputStream outStream;
+    private LinkedList binaryNodeList;
+    private ByteArrayOutputStream bufferedSoapOutStream;
+    private String mimeBoundary = null;
+    private String rootContentId = null;
+    private int nextid = 0;
+    private boolean isSoap11 = true;
+
+    /**
+     * Field DEFAULT_CHAR_SET_ENCODING specifies the default
+     * character encoding scheme to be used
+     */
+    public static final String DEFAULT_CHAR_SET_ENCODING = "utf-8";
+
+    private String charSetEncoding;
+    private String xmlVersion;
+    private boolean ignoreXMLDeclaration = false;
+
+
+    public OMOutputImpl() {
+    }
+
+    public OMOutputImpl(XMLStreamWriter xmlWriter) {
+        this.xmlWriter = xmlWriter;
+    }
+
+    /**
+     * This creates a new OMOutputImpl with default encoding
+     * @see OMOutputImpl#DEFAULT_CHAR_SET_ENCODING
+     * @param outStream
+     * @param doOptimize
+     * @throws XMLStreamException
+     * @throws FactoryConfigurationError
+     */
+    public OMOutputImpl(OutputStream outStream, boolean doOptimize)
+        throws XMLStreamException, FactoryConfigurationError {
+        setOutputStream(outStream, doOptimize);
+    }
+
+    public void setOutputStream(OutputStream outStream, boolean doOptimize)
+        throws XMLStreamException, FactoryConfigurationError {
+
+        this.doOptimize = doOptimize;
+        this.outStream = outStream;
+
+        if (charSetEncoding == null) //Default encoding is UTF-8
+            this.charSetEncoding = DEFAULT_CHAR_SET_ENCODING;
+
+        XMLOutputFactory factory = XMLOutputFactory.newInstance();
+//        factory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.TRUE);
+        if (doOptimize) {
+            bufferedSoapOutStream = new ByteArrayOutputStream();
+            xmlWriter = factory.createXMLStreamWriter(bufferedSoapOutStream,
+                                                      this.charSetEncoding);
+            binaryNodeList = new LinkedList();
+        } else {
+            xmlWriter = factory.createXMLStreamWriter(outStream,
+                                                      this.charSetEncoding);
+        }
+    }
+
+    public void flush() throws XMLStreamException {
+        xmlWriter.flush();
+        String SOAPContentType;
+        if (doOptimize) {
+            if (isSoap11)
+            {
+                SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE;
+            }
+            else
+            {
+                SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE;
+            }
+            MIMEOutputUtils.complete(
+                outStream,
+                bufferedSoapOutStream,
+                binaryNodeList,
+                getMimeBoundary(),
+                getRootContentId(),
+                this.charSetEncoding,SOAPContentType);
+        }
+    }
+
+    public boolean isOptimized() {
+        return doOptimize;
+    }
+
+    public String getContentType() {
+        String SOAPContentType;
+        if (isOptimized()) {
+            if (isSoap11) {
+                SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE;
+            } else {
+                SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE;
+            }
+            return MIMEOutputUtils.getContentTypeForMime(
+                    getMimeBoundary(),
+                    getRootContentId(),
+                    this.getCharSetEncoding(), SOAPContentType);
+        } else {
+            if (!isSoap11) {
+                return SOAP12Constants.SOAP_12_CONTENT_TYPE;
+            } else {
+                return SOAP11Constants.SOAP_11_CONTENT_TYPE;
+            }
+        }
+    }
+
+    public void writeOptimized(OMText node) {
+        binaryNodeList.add(node);
+    }
+
+    public void setXmlStreamWriter(XMLStreamWriter xmlWriter) {
+        this.xmlWriter = xmlWriter;
+    }
+
+    public XMLStreamWriter getXmlStreamWriter() {
+        return xmlWriter;
+    }
+
+    public String getMimeBoundary() {
+        if (mimeBoundary == null) {
+            mimeBoundary =
+                "MIMEBoundary"
+                    + UUIDGenerator.getUUID();
+        }
+        return mimeBoundary;
+    }
+
+    public String getRootContentId() {
+        if (rootContentId == null) {
+            rootContentId =
+                "0."
+                    + UUIDGenerator.getUUID()
+                    + "@apache.org";
+        }
+        return rootContentId;
+    }
+
+    public String getNextContentId() {
+        nextid++;
+        return nextid
+            + "."
+            + UUIDGenerator.getUUID()
+            + "@apache.org";
+    }
+
+    /**
+     * Returns the character set endocing scheme If the value of the
+     * charSetEncoding is not set then the default will be returned
+     * 
+     * @return
+     */
+    public String getCharSetEncoding() {
+        return this.charSetEncoding;
+    }
+
+    public void setCharSetEncoding(String charSetEncoding) {
+        this.charSetEncoding = charSetEncoding;
+    }
+
+    public String getXmlVersion() {
+        return xmlVersion;
+    }
+
+    public void setXmlVersion(String xmlVersion) {
+        this.xmlVersion = xmlVersion;
+    }
+
+    /**
+     * @param b
+     */
+    public void setSoap11(boolean b) {
+        isSoap11 = b;
+    }
+
+    public boolean isIgnoreXMLDeclaration() {
+        return ignoreXMLDeclaration;
+    }
+
+    public void ignoreXMLDeclaration(boolean ignoreXMLDeclaration) {
+        this.ignoreXMLDeclaration = ignoreXMLDeclaration;
+    }
+
+
+    /**
+     * @param b
+     */
+    public void setDoOptimize(boolean b) {
+        doOptimize = b;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/OMOutputImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMAttributeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMAttributeImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMAttributeImpl.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMAttributeImpl.java Thu Sep 15 11:52:11 2005
@@ -1,122 +1,122 @@
-/*
- * 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.axis2.om.impl.llom;
-
-import org.apache.axis2.om.OMAttribute;
-import org.apache.axis2.om.OMNamespace;
-
-import javax.xml.namespace.QName;
-
-/**
- * Class OMAttributeImpl
- */
-public class OMAttributeImpl implements OMAttribute {
-    /**
-     * Field localName
-     */
-    private String localName;
-
-    /**
-     * Field value
-     */
-    private String value;
-
-    /**
-     * Field namespace
-     */
-    private OMNamespace namespace;
-
-    /**
-     * Constructor OMAttributeImpl
-     *
-     * @param localName
-     * @param ns
-     * @param value
-     */
-    public OMAttributeImpl(String localName, OMNamespace ns, String value) {
-        setLocalName(localName);
-        setValue(value);
-        setOMNamespace(ns);
-    }
-
-    /**
-     *
-     * @return qname
-     */
-    public QName getQName() {
-        if(namespace != null){
-            return new QName(namespace.getName(), localName, namespace.getPrefix());
-        }else{
-            return new QName(localName);
-        }
-    }
-
-    // -------- Getters and Setters
-
-    /**
-     * Method getLocalName
-     *
-     * @return local name
-     */
-    public String getLocalName() {
-        return localName;
-    }
-
-    /**
-     * Method setLocalName
-     *
-     * @param localName
-     */
-    public void setLocalName(String localName) {
-        this.localName = localName;
-    }
-
-    /**
-     * Method getValue
-     *
-     * @return value
-     */
-    public String getValue() {
-        return value;
-    }
-
-    /**
-     * Method setValue
-     *
-     * @param value
-     */
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    /**
-     * Method setOMNamespace
-     *
-     * @param omNamespace
-     */
-    public void setOMNamespace(OMNamespace omNamespace) {
-        this.namespace = omNamespace;
-    }
-
-    /**
-     * Method getNamespace
-     *
-     * @return namespace
-     */
-    public OMNamespace getNamespace() {
-        return namespace;
-    }
-}
+/*
+ * 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.axis2.om.impl.llom;
+
+import org.apache.axis2.om.OMAttribute;
+import org.apache.axis2.om.OMNamespace;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Class OMAttributeImpl
+ */
+public class OMAttributeImpl implements OMAttribute {
+    /**
+     * Field localName
+     */
+    private String localName;
+
+    /**
+     * Field value
+     */
+    private String value;
+
+    /**
+     * Field namespace
+     */
+    private OMNamespace namespace;
+
+    /**
+     * Constructor OMAttributeImpl
+     *
+     * @param localName
+     * @param ns
+     * @param value
+     */
+    public OMAttributeImpl(String localName, OMNamespace ns, String value) {
+        setLocalName(localName);
+        setValue(value);
+        setOMNamespace(ns);
+    }
+
+    /**
+     *
+     * @return qname
+     */
+    public QName getQName() {
+        if(namespace != null){
+            return new QName(namespace.getName(), localName, namespace.getPrefix());
+        }else{
+            return new QName(localName);
+        }
+    }
+
+    // -------- Getters and Setters
+
+    /**
+     * Method getLocalName
+     *
+     * @return local name
+     */
+    public String getLocalName() {
+        return localName;
+    }
+
+    /**
+     * Method setLocalName
+     *
+     * @param localName
+     */
+    public void setLocalName(String localName) {
+        this.localName = localName;
+    }
+
+    /**
+     * Method getValue
+     *
+     * @return value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Method setValue
+     *
+     * @param value
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Method setOMNamespace
+     *
+     * @param omNamespace
+     */
+    public void setOMNamespace(OMNamespace omNamespace) {
+        this.namespace = omNamespace;
+    }
+
+    /**
+     * Method getNamespace
+     *
+     * @return namespace
+     */
+    public OMNamespace getNamespace() {
+        return namespace;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMAttributeImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native