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 ve...@apache.org on 2005/06/03 16:23:50 UTC
svn commit: r179795 [2/4] - in
/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject:
./ bin/ src/org/apache/axis/encoding/ src/org/apache/axis/om/
src/org/apache/axis/om/impl/llom/ src/org/apache/axis/om/impl/llom/builder/
src/org/apache/axis/om/impl/llom/factory/
src/org/apache/axis/om/impl/llom/mtom/
src/org/apache/axis/om/impl/llom/serialize/
src/org/apache/axis/om/impl/llom/traverse/
src/org/apache/axis/om/impl/llom/util/ src/org/apache/axis/om/impl/mtom/
src/org/apache/axis/soap/ src/org/apache/axis/soap/impl/
src/org/apache/axis/soap/impl/llom/
src/org/apache/axis/soap/impl/llom/builder/
src/org/apache/axis/soap/impl/llom/factory/
src/org/apache/axis/soap/impl/llom/soap11/
src/org/apache/axis/soap/impl/llom/soap12/ test/org/ test/org/apache/
test/org/apache/axis/ test/org/apache/axis/om/
test/org/apache/axis/om/infoset/
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMNodeImpl.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMNodeImpl.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMNodeImpl.java Fri Jun 3 07:23:47 2005
@@ -1,27 +1,24 @@
/*
- * 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.
- */
+* 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.axis.om.impl.llom;
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMException;
import org.apache.axis.om.OMNode;
-//import org.apache.axis.om.OMContainer;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
+import org.apache.axis.om.OMXMLParserWrapper;
/**
* Class OMNodeImpl
@@ -30,8 +27,7 @@
/**
* Field parent
*/
- //protected OMElementImpl parent;
- protected OMElementImpl parent;
+ protected OMElementImpl parent;
/**
* Field nextSibling
@@ -42,12 +38,11 @@
* Field previousSibling
*/
protected OMNodeImpl previousSibling;
-
- /**
- * Field value
+ /**
+ * Field builder
*/
- protected String value;
-
+ protected OMXMLParserWrapper builder;
+
/**
* Field done
*/
@@ -56,7 +51,7 @@
/**
* Field nodeType
*/
- protected short nodeType;
+ protected int nodeType;
/**
* Constructor OMNodeImpl
@@ -98,7 +93,7 @@
return;
}
- if (element instanceof OMNodeImpl) {
+ if (element instanceof OMNodeImpl) {//todo fix me
if(this.parent != null){
this.detach();
}
@@ -114,8 +109,8 @@
* @throws OMException
*/
public OMNode getNextSibling() throws OMException {
- if ((nextSibling == null) && (parent != null) && !((OMElementImpl)parent).isComplete()) {
- ((OMElementImpl)parent).buildNext();
+ if ((nextSibling == null) && (parent != null) && !parent.isComplete()) {
+ parent.buildNext();
}
return nextSibling;
}
@@ -129,28 +124,6 @@
this.nextSibling = (OMNodeImpl) node;
}
- /**
- * This will return the literal value of the node.
- * OMText --> the text
- * OMElement --> local name of the element in String format
- * OMAttribute --> the value of the attribue
- *
- * @return
- * @throws org.apache.axis.om.OMException
- * @throws OMException
- */
- public String getValue() throws OMException {
- return value;
- }
-
- /**
- * Method setValue
- *
- * @param value
- */
- public void setValue(String value) {
- this.value = value;
- }
/**
* this will indicate whether parser has parsed this information item completely or not.
@@ -160,7 +133,7 @@
* @return
*/
public boolean isComplete() {
- return true;
+ return done;
}
/**
@@ -178,20 +151,22 @@
* @throws org.apache.axis.om.OMException
* @throws OMException
*/
- public void detach() throws OMException {
+ public OMNode detach() throws OMException {
if (parent == null) {
throw new OMException(
"Elements that doesn't have a parent can not be detached");
}
OMNodeImpl nextSibling = (OMNodeImpl) getNextSibling();
if (previousSibling == null) {
- ((OMElementImpl)parent).setFirstChild(nextSibling);
+ parent.setFirstChild(nextSibling);
} else {
previousSibling.setNextSibling(nextSibling);
}
if (nextSibling != null) {
nextSibling.setPreviousSibling(previousSibling);
}
+
+ return this;
}
/**
@@ -237,7 +212,7 @@
siblingImpl.setPreviousSibling(previousSibling);
siblingImpl.setNextSibling(this);
if (previousSibling == null) {
- ((OMElementImpl)parent).setFirstChild(siblingImpl);
+ parent.setFirstChild(siblingImpl);
} else {
previousSibling.setNextSibling(siblingImpl);
}
@@ -252,7 +227,7 @@
* @throws org.apache.axis.om.OMException
* @throws OMException
*/
- public short getType() throws OMException {
+ public int getType() throws OMException {
return nodeType;
}
@@ -262,7 +237,7 @@
* @param nodeType
* @throws OMException
*/
- public void setType(short nodeType) throws OMException {
+ public void setType(int nodeType) throws OMException {
this.nodeType = nodeType;
}
@@ -284,13 +259,21 @@
this.previousSibling = (OMNodeImpl) previousSibling;
}
- /**
- * Method serialize
- *
- * @param writer
- * @param cache
- * @throws XMLStreamException
+
+
+ /**
+ * This will completely parse this node and build the object structure in the memory.
+ * However a programmatically created node will have done set to true by default and will cause
+ * populateyourself not to work properly!
+ * @throws OMException
*/
+ public void build() throws OMException {
+ while(!done){
+ builder.next();
+ }
+ }
+
+
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMPIImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMPIImpl.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMPIImpl.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMPIImpl.java Fri Jun 3 07:23:47 2005
@@ -23,6 +23,7 @@
public class OMPIImpl extends OMNodeImpl implements OMPI {
String piTarget;
+ String value;
/**
* @param parent
@@ -30,7 +31,7 @@
public OMPIImpl(OMElement parent, String piTarget, String content) {
super(parent);
this.piTarget = piTarget;
- this.setValue(content);
+ this.value = content;
}
/* (non-Javadoc)
@@ -44,7 +45,7 @@
* @see org.apache.axis.om.OMPI#getContent()
*/
public String getContent() {
- return getValue();
+ return value;
}
/* (non-Javadoc)
@@ -57,12 +58,15 @@
/* (non-Javadoc)
* @see org.apache.axis.om.OMNode#serialize(javax.xml.stream.XMLStreamWriter, boolean)
*/
- public void serialize(XMLStreamWriter writer, boolean cache)
+ private void serialize(XMLStreamWriter writer, boolean cache)
throws XMLStreamException {
writer.writeProcessingInstruction(piTarget, this.value);
OMNode nextSibling = this.getNextSibling();
if (nextSibling != null) {
- nextSibling.serialize(writer, cache);
+ if(!cache)
+ nextSibling.serialize(writer);
+ else
+ nextSibling.serializeWithCache(writer);
}
}
@@ -72,5 +76,17 @@
public void serialize(XMLStreamWriter writer) throws XMLStreamException {
serialize(writer,false);
}
+
+ public void serializeWithCache(XMLStreamWriter writer) throws XMLStreamException {
+ serialize(writer,true);
+ }
+
+ public void discard() throws OMException {
+ if (done) {
+ this.detach();
+ } else {
+ builder.discard(this.parent);
+ }
+ }
}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,187 @@
+package org.apache.axis.om.impl.llom;
+
+import org.apache.axis.om.OMAttribute;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.impl.llom.serialize.StreamingOMSerializer;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.Iterator;
+
+/*
+ * 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.
+ *
+ *
+ */
+class OMSerializerUtil {
+
+ /**
+ * Method serializeEndpart
+ *
+ * @param writer
+ * @throws javax.xml.stream.XMLStreamException
+ */
+ static void serializeEndpart(XMLStreamWriter writer)
+ throws XMLStreamException {
+ writer.writeEndElement();
+ }
+
+ /**
+ * Method serializeAttribute
+ *
+ * @param attr
+ * @param writer
+ * @throws XMLStreamException
+ */
+ static void serializeAttribute(OMAttribute attr, XMLStreamWriter writer)
+ throws XMLStreamException {
+
+ // first check whether the attribute is associated with a namespace
+ OMNamespace ns = attr.getNamespace();
+ String prefix = null;
+ String namespaceName = null;
+ if (ns != null) {
+
+ // add the prefix if it's availble
+ prefix = ns.getPrefix();
+ namespaceName = ns.getName();
+ if (prefix != null) {
+ writer.writeAttribute(prefix, namespaceName,
+ attr.getLocalName(), attr.getValue());
+ } else {
+ writer.writeAttribute(namespaceName, attr.getLocalName(),
+ attr.getValue());
+ }
+ } else {
+ writer.writeAttribute(attr.getLocalName(), attr.getValue());
+ }
+ }
+
+ /**
+ * Method serializeNamespace
+ *
+ * @param namespace
+ * @param writer
+ * @throws XMLStreamException
+ */
+ static void serializeNamespace(OMNamespace namespace, XMLStreamWriter writer)
+ throws XMLStreamException {
+ if (namespace != null) {
+ String uri = namespace.getName();
+ String prefix = writer.getPrefix(uri);
+ String ns_prefix = namespace.getPrefix();
+ if (prefix == null) {
+ writer.writeNamespace(ns_prefix, namespace.getName());
+ writer.setPrefix(ns_prefix, uri);
+ }
+ }
+ }
+
+
+ /**
+ * Method serializeStartpart
+ *
+ * @param writer
+ * @throws XMLStreamException
+ */
+ static void serializeStartpart(OMElementImpl element,XMLStreamWriter writer)
+ throws XMLStreamException {
+ String nameSpaceName = null;
+ String writer_prefix = null;
+ String prefix = null;
+ if (element.ns != null) {
+ nameSpaceName = element.ns.getName();
+ writer_prefix = writer.getPrefix(nameSpaceName);
+ prefix = element.ns.getPrefix();
+ if (nameSpaceName != null) {
+ if (writer_prefix != null) {
+ writer.writeStartElement(nameSpaceName,
+ element.getLocalName());
+ } else {
+ if (prefix != null) {
+ writer.writeStartElement(prefix, element.getLocalName(),
+ nameSpaceName);
+ writer.writeNamespace(prefix, nameSpaceName);
+ writer.setPrefix(prefix, nameSpaceName);
+ } else {
+ writer.writeStartElement(nameSpaceName,
+ element.getLocalName());
+ writer.writeDefaultNamespace(nameSpaceName);
+ writer.setDefaultNamespace(nameSpaceName);
+ }
+ }
+ } else {
+ writer.writeStartElement(element.getLocalName());
+// throw new OMException(
+// "Non namespace qualified elements are not allowed");
+ }
+ } else {
+ writer.writeStartElement(element.getLocalName());
+// throw new OMException(
+// "Non namespace qualified elements are not allowed");
+ }
+
+ // add the elements attributes
+ if (element.attributes != null) {
+ Iterator attributesList = element.attributes.values().iterator();
+ while (attributesList.hasNext()) {
+ serializeAttribute((OMAttribute) attributesList.next(), writer);
+ }
+ }
+
+ // add the namespaces
+ Iterator namespaces = element.getAllDeclaredNamespaces();
+ if (namespaces != null) {
+ while (namespaces.hasNext()) {
+ serializeNamespace((OMNamespace) namespaces.next(), writer);
+ }
+ }
+ }
+
+
+ /**
+ * Method serializeNormal
+ *
+ * @param writer
+ * @param cache
+ * @throws XMLStreamException
+ */
+ static void serializeNormal(OMElementImpl element,XMLStreamWriter writer, boolean cache)
+ throws XMLStreamException {
+
+ if (cache){
+ element.build();
+ }
+
+ serializeStartpart(element,writer);
+ OMNode firstChild = element.firstChild;
+ if (firstChild != null) {
+ if (cache){
+ firstChild.serializeWithCache(writer);
+ }else{
+ firstChild.serialize(writer);
+ }
+ }
+ serializeEndpart(writer);
+ }
+
+ static void serializeByPullStream(OMElementImpl element,XMLStreamWriter writer) throws XMLStreamException {
+ StreamingOMSerializer streamingOMSerializer = new StreamingOMSerializer();
+ streamingOMSerializer.serialize(element.getXMLStreamReaderWithoutCaching(),
+ writer);
+ return;
+ }
+}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMStAXWrapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMStAXWrapper.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMStAXWrapper.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMStAXWrapper.java Fri Jun 3 07:23:47 2005
@@ -15,12 +15,7 @@
*/
package org.apache.axis.om.impl.llom;
-import org.apache.axis.om.OMAttribute;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.*;
import org.apache.axis.om.impl.llom.exception.OMStreamingException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -170,10 +165,10 @@
*
* @param builder
* @param startNode
- * @param cacheOff
+ * @param cache
*/
OMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode,
- boolean cacheOff) {
+ boolean cache) {
// create a navigator
this.navigator = new OMNavigator(startNode);
@@ -185,7 +180,7 @@
// returns the starting node at the first call to it
currentNode = navigator.next();
updateNextNode();
- switchingAllowed = cacheOff;
+ switchingAllowed = !cache;
}
/**
@@ -297,7 +292,7 @@
returnLength = parser.getTextLength();
} else {
OMText textNode = (OMText) lastNode;
- returnLength = textNode.getValue().length();
+ returnLength = textNode.getText().length();
}
return returnLength;
}
@@ -353,7 +348,7 @@
} else {
if (hasText()) {
OMText textNode = (OMText) lastNode;
- String str = textNode.getValue();
+ String str = textNode.getText();
returnArray = str.toCharArray();
}
}
@@ -371,7 +366,7 @@
} else {
if (hasText()) {
OMText textNode = (OMText) lastNode;
- returnString = textNode.getValue();
+ returnString = textNode.getText();
}
}
return returnString;
@@ -1012,7 +1007,7 @@
case OMNode.ELEMENT_NODE:
OMElement element = (OMElement) node;
log.info("Generating events from element {"
- + element.getNamespaceName() + '}'
+ + element.getNamespace().getName() + '}'
+ element.getLocalName() + " Generated OM tree");
returnEvent = generateElementEvents(element);
break;
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMTextImpl.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMTextImpl.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/OMTextImpl.java Fri Jun 3 07:23:47 2005
@@ -15,23 +15,33 @@
*/
package org.apache.axis.om.impl.llom;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.om.DataHandler;
import org.apache.axis.om.OMConstants;
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMException;
import org.apache.axis.om.OMNode;
import org.apache.axis.om.OMText;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
/**
* Class OMTextImpl
*/
public class OMTextImpl extends OMNodeImpl implements OMText, OMConstants {
- /**
- * Field textType
- */
+
+ protected String value;
protected short textType = TEXT_NODE;
+ protected String mimeType;
+
+ public OMTextImpl(String s, String mimeType) {
+ this(s);
+ this.mimeType = mimeType;
+ }
+ public OMTextImpl(OMElement parent, String s, String mimeType) {
+ this(parent, s);
+ this.mimeType = mimeType;
+ }
/**
* Constructor OMTextImpl
@@ -41,7 +51,7 @@
*/
public OMTextImpl(OMElement parent, String text) {
super(parent);
- setValue(text);
+ this.value = text;
done = true;
}
@@ -51,52 +61,7 @@
* @param s
*/
public OMTextImpl(String s) {
- setValue(s);
- }
-
- /**
- * We use the OMText class to hold comments, text, characterData, CData, etc.,
- * The codes are found in OMNode class
- *
- * @param type
- */
- public void setTextType(short type) {
- if ((type == TEXT_NODE) || (type == COMMENT_NODE)
- || (type == CDATA_SECTION_NODE)) {
- this.textType = type;
- } else {
- throw new UnsupportedOperationException(
- "Attempt to set wrong type");
- }
- }
-
- /**
- * Method getTextType
- *
- * @return
- */
- public short getTextType() {
- return textType;
- }
-
- /**
- * Method getFirstChild
- *
- * @return
- * @throws OMException
- */
- public OMNode getFirstChild() throws OMException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Method setFirstChild
- *
- * @param node
- * @throws OMException
- */
- public void setFirstChild(OMNode node) throws OMException {
- throw new UnsupportedOperationException();
+ this.value = s;
}
/**
@@ -104,19 +69,18 @@
* @throws org.apache.axis.om.OMException
* @throws OMException
*/
- public short getType() throws OMException {
+ public int getType() throws OMException {
return textType;
}
/**
* @param writer
- * @param cache
* @throws XMLStreamException
*/
- public void serialize(XMLStreamWriter writer, boolean cache)
- throws XMLStreamException {
+ public void serializeWithCache(XMLStreamWriter writer)
+ throws XMLStreamException {
if (textType == TEXT_NODE) {
- writer.writeCharacters(this.value);
+ writer.writeCharacters(this.value);
} else if (textType == COMMENT_NODE) {
writer.writeComment(this.value);
} else if (textType == CDATA_SECTION_NODE) {
@@ -124,11 +88,57 @@
}
OMNode nextSibling = this.getNextSibling();
if (nextSibling != null) {
- nextSibling.serialize(writer, cache);
+ nextSibling.serializeWithCache(writer);
}
}
public void serialize(XMLStreamWriter writer) throws XMLStreamException {
- this.serialize(writer, false);
+ this.serializeWithCache(writer);
+ }
+
+ /**
+ * Slightly different implementation of the discard method
+ * @throws OMException
+ */
+ public void discard() throws OMException {
+ if (done) {
+ this.detach();
+ } else {
+ builder.discard(this.parent);
+ }
}
+
+ /**
+ * Returns the value
+ * @return
+ */
+ public String getText() {
+ return this.value;
+ }
+
+ public boolean isOptimized() {
+ return false; //Todo
+ }
+
+ /**
+ * @return
+ * @throws org.apache.axis.om.OMException
+ * @throws OMException
+ */
+ public DataHandler getDataHandler() throws OMException {
+ try {
+ if ((value = getText()) != null) {
+ DataHandler dh =
+ (DataHandler) (Class
+ .forName("org.apache.axis.om.impl.llom.mtom.DataHandlerImpl"))
+ .newInstance();
+ dh.init(value, mimeType);
+ }
+ } catch (Exception e) {
+ throw new OMException(e);
+ }
+ return null;
+
+ }
+
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/SAXOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/SAXOMBuilder.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/SAXOMBuilder.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/SAXOMBuilder.java Fri Jun 3 07:23:47 2005
@@ -16,18 +16,15 @@
package org.apache.axis.om.impl.llom.builder;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNode;
+import org.apache.axis.om.*;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
+import java.util.ArrayList;
+import java.util.List;
+
public class SAXOMBuilder extends DefaultHandler {
OMElement root = null;
@@ -35,7 +32,7 @@
OMElement nextElem = null;
- OMFactory factory = OMFactory.newInstance();
+ OMFactory factory = OMAbstractFactory.getOMFactory();
List prefixMappings = new ArrayList();
@@ -98,11 +95,11 @@
else
nextElem.setLocalName(localName);
nextElem
- .setNamespace(nextElem.findInScopeNamespace(namespaceURI, null));
+ .setNamespace(nextElem.findNamespace(namespaceURI, null));
int j = atts.getLength();
for (int i = 0; i < j; i++)
- nextElem.insertAttribute(atts.getLocalName(i), atts.getValue(i),
- nextElem.findInScopeNamespace(atts.getURI(i), null));
+ nextElem.addAttribute(atts.getLocalName(i), atts.getValue(i),
+ nextElem.findNamespace(atts.getURI(i), null));
lastNode = nextElem;
nextElem = null;
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXBuilder.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXBuilder.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXBuilder.java Fri Jun 3 07:23:47 2005
@@ -15,28 +15,18 @@
*/
package org.apache.axis.om.impl.llom.builder;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.*;
import org.apache.axis.om.impl.llom.OMElementImpl;
import org.apache.axis.om.impl.llom.OMNodeImpl;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
/**
* OM should be able to built from any data source. And the model it builds may be a SOAP specific one
* or just an XML model. This class will give some common functionality of OM Building from StAX.
*/
public abstract class StAXBuilder implements OMXMLParserWrapper {
- /**
- * Field ombuilderFactory
- */
- protected OMFactory ombuilderFactory;
/**
* Field parser
@@ -52,12 +42,6 @@
* Field lastNode
*/
protected OMNode lastNode;
-
- // keeps state of occurence of document element
- /**
- * Field foundRootElement
- */
- protected boolean foundRootElement = false;
// returns the state of completion
@@ -88,9 +72,8 @@
* @param parser
*/
protected StAXBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
- this.ombuilderFactory = ombuilderFactory;
this.parser = parser;
- omfactory = OMFactory.newInstance();
+ omfactory = ombuilderFactory;
}
/**
@@ -99,8 +82,7 @@
* @param parser
*/
protected StAXBuilder(XMLStreamReader parser) {
- this(OMFactory.newInstance(), parser);
- omfactory = OMFactory.newInstance();
+ this(OMAbstractFactory.getOMFactory(), parser);
}
/**
@@ -109,7 +91,7 @@
* @param ombuilderFactory
*/
public void setOmbuilderFactory(OMFactory ombuilderFactory) {
- this.ombuilderFactory = ombuilderFactory;
+ this.omfactory = ombuilderFactory;
}
/**
@@ -135,13 +117,13 @@
OMNamespace ns = null;
String uri = parser.getAttributeNamespace(i);
if (uri.hashCode() != 0) {
- ns = node.findInScopeNamespace(uri,
+ ns = node.findNamespace(uri,
parser.getAttributePrefix(i));
}
// todo if the attributes are supposed to namespace qualified all the time
// todo then this should throw an exception here
- node.insertAttribute(parser.getAttributeLocalName(i),
+ node.addAttribute(parser.getAttributeLocalName(i),
parser.getAttributeValue(i), ns);
}
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java Fri Jun 3 07:23:47 2005
@@ -15,18 +15,9 @@
*/
package org.apache.axis.om.impl.llom.builder;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OMComment;
-import org.apache.axis.om.OMPI;
-import org.apache.axis.om.OMDTD;
-//import org.apache.axis.om.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.*;
import org.apache.axis.om.impl.llom.OMDocument;
+import org.apache.axis.soap.SOAPEnvelope;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamReader;
@@ -45,6 +36,12 @@
* Field omFactory
*/
protected OMFactory omFactory;
+
+ //keeps state of occurence of document element
+ /**
+ * Field foundRootElement
+ */
+ protected boolean foundRootElement = false;
/**
* Constructor StAXOMBuilder
@@ -55,7 +52,7 @@
public StAXOMBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
super(ombuilderFactory, parser);
document = new OMDocument(this);
- omfactory = OMFactory.newInstance();
+ omfactory = OMAbstractFactory.getOMFactory();
}
/**
@@ -66,7 +63,7 @@
public StAXOMBuilder(XMLStreamReader parser) {
super(parser);
document = new OMDocument(this);
- omfactory = OMFactory.newInstance();
+ omfactory = OMAbstractFactory.getOMFactory();
}
/**
@@ -193,8 +190,7 @@
}
return dtd;
}
- /**/
-
+
/**
* Method getOMEnvelope
*
@@ -240,30 +236,6 @@
e.setComplete(true);
}
break;
- case XMLStreamConstants.DTD:
- /*
- System.out.println("DTD element encountered. Currently no support for DTD");
- System.out.println("DTD text is: "+parser.getText());
- next();
- */
- lastNode = createOMDTD();
- break;
- case XMLStreamConstants.PROCESSING_INSTRUCTION:
- /*
- System.out.println("Processing Instruction element encountered. Currently no support for Processing Instruction");
- System.out.println("PI text is: "+parser.getText());
- next();
- */
- lastNode = createOMPI();
- break;
- case XMLStreamConstants.COMMENT:
- /*
- System.out.println("Comment element encountered. Currently no support for Comment");
- System.out.println("Comment text is: "+parser.getText());
- next();
- */
- lastNode = createOMComment();
- break;
case XMLStreamConstants.END_DOCUMENT:
done = true;
document.setComplete(true);
@@ -271,6 +243,15 @@
case XMLStreamConstants.SPACE:
next();
break;
+ case XMLStreamConstants.DTD:
+ lastNode = createOMDTD();
+ break;
+ case XMLStreamConstants.PROCESSING_INSTRUCTION:
+ lastNode = createOMPI();
+ break;
+ case XMLStreamConstants.COMMENT:
+ lastNode = createOMComment();
+ break;
default :
throw new OMException();
}
@@ -315,7 +296,7 @@
// set the own namespace
OMNamespace namespace =
- node.findInScopeNamespace(parser.getNamespaceURI(),
+ node.findNamespace(parser.getNamespaceURI(),
parser.getPrefix());
node.setNamespace(namespace);
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java Fri Jun 3 07:23:47 2005
@@ -15,40 +15,22 @@
*/
package org.apache.axis.om.impl.llom.factory;
-import org.apache.axis.om.OMComment;
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMPI;
-import org.apache.axis.om.OMDTD;
-import org.apache.axis.om.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
-import org.apache.axis.om.SOAPFault;
-import org.apache.axis.om.SOAPHeader;
-import org.apache.axis.om.SOAPHeaderBlock;
-import org.apache.axis.om.impl.llom.OMDocument;
-import org.apache.axis.om.impl.llom.OMCommentImpl;
+import org.apache.axis.om.*;
import org.apache.axis.om.impl.llom.OMElementImpl;
import org.apache.axis.om.impl.llom.OMNamespaceImpl;
+import org.apache.axis.om.impl.llom.OMTextImpl;
+import org.apache.axis.om.impl.llom.OMAttributeImpl;
import org.apache.axis.om.impl.llom.OMPIImpl;
import org.apache.axis.om.impl.llom.OMDTDImpl;
-import org.apache.axis.om.impl.llom.OMTextImpl;
-import org.apache.axis.om.impl.llom.SOAPBodyImpl;
-import org.apache.axis.om.impl.llom.SOAPEnvelopeImpl;
-import org.apache.axis.om.impl.llom.SOAPFaultImpl;
-import org.apache.axis.om.impl.llom.SOAPHeaderBlockImpl;
-import org.apache.axis.om.impl.llom.SOAPHeaderImpl;
+import org.apache.axis.om.impl.llom.OMCommentImpl;
+import org.apache.axis.om.impl.llom.OMDocument;
import javax.xml.namespace.QName;
/**
* Class OMLinkedListImplFactory
*/
-public class OMLinkedListImplFactory extends OMFactory {
+public class OMLinkedListImplFactory implements OMFactory {
/**
* Field MAX_TO_POOL
*/
@@ -110,36 +92,6 @@
throws OMException {
return new OMElementImpl(qname, parent);
}
-
- /**
- * Method createOMDTD
- *
- * @param parent
- * @param content
- * @return
- */
- /* */
- //Actually this implementation is just a makeshift implementation of DTD.
- //No validation checking, no processing of contents whatsoever. Just would
- //capture all of the contents as text and wrap it as a OMDTD node.
- public OMDTD createOMDTD(OMDocument parent, String content) {
- OMDTDImpl omDTD = new OMDTDImpl((OMElement)parent, content);
- return omDTD;
- }
- /**/
-
- /**
- * Method createOMPI
- *
- * @param parent
- * @param piTarget
- * @param piData
- * @return
- */
- public OMPI createOMPI(OMElement parent, String piTarget, String piData) {
- OMPIImpl omPI = new OMPIImpl(parent, piTarget, piData);
- return omPI;
- }
/**
* Method createOMNamespace
@@ -163,18 +115,6 @@
OMTextImpl textNode = new OMTextImpl(parent, text);
return textNode;
}
-
- /**
- * Method createOMComment
- *
- * @param parent
- * @param content
- * @return
- */
- public OMComment createOMComment(OMElement parent, String content) throws OMException{
- OMCommentImpl commentNode = new OMCommentImpl(parent,content);
- return commentNode;
- }
/**
* Method createText
@@ -188,140 +128,50 @@
return textNode;
}
+ public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) {
+ return new OMAttributeImpl(localName, ns, value);
+ }
+
/**
- * Method createSOAPBody
- *
- * @param envelope
- * @return
- */
- public SOAPBody createSOAPBody(SOAPEnvelope envelope) {
- SOAPBody soapBody = new SOAPBodyImpl(envelope);
- return soapBody;
- }
-
- /**
- * Method createSOAPBody
- *
- * @param envelope
- * @param builder
- * @return
- */
- public SOAPBody createSOAPBody(SOAPEnvelope envelope,
- OMXMLParserWrapper builder) {
- return new SOAPBodyImpl(envelope, builder);
- }
-
- /**
- * Method createSOAPEnvelope
- *
- * @param ns
- * @param builder
- * @return
- */
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
- OMXMLParserWrapper builder) {
- return new SOAPEnvelopeImpl(ns, builder);
- }
-
- /**
- * Method createSOAPEnvelope
- *
- * @param ns
- * @return
- */
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) {
- return new SOAPEnvelopeImpl(ns);
- }
-
- /**
- * Method createSOAPHeader
- *
- * @param envelope
- * @return
- */
- public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) {
- return new SOAPHeaderImpl(envelope);
- }
-
- /**
- * Method createSOAPHeader
- *
- * @param envelope
- * @param builder
- * @return
- */
- public SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
- OMXMLParserWrapper builder) {
- return new SOAPHeaderImpl(envelope, builder);
- }
-
- /**
- * Method createSOAPHeaderBlock
- *
- * @param localName
- * @param ns
- * @return
- */
- public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
- OMNamespace ns) {
- return new SOAPHeaderBlockImpl(localName, ns);
- }
-
- /**
- * Method createSOAPHeaderBlock
- *
- * @param localName
- * @param ns
+ * Method createOMDTD
+ *
* @param parent
- * @param builder
+ * @param content
* @return
*/
- public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
- OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
- return new SOAPHeaderBlockImpl(localName, ns, parent, builder);
- }
+ /* */
+ //Actually this implementation is just a makeshift implementation of DTD.
+ //No validation checking, no processing of contents whatsoever. Just would
+ //capture all of the contents as text and wrap it as a OMDTD node.
+ public OMDTD createOMDTD(OMDocument parent, String content) {
+ OMDTDImpl omDTD = new OMDTDImpl((OMElement)parent, content);
+ return omDTD;
+ }
+ /**/
/**
- * Method createSOAPFault
+ * Method createOMPI
*
* @param parent
- * @param e
+ * @param piTarget
+ * @param piData
* @return
*/
- public SOAPFault createSOAPFault(SOAPBody parent, Exception e) {
- return new SOAPFaultImpl(parent, e);
+ public OMPI createOMPI(OMElement parent, String piTarget, String piData) {
+ OMPIImpl omPI = new OMPIImpl(parent, piTarget, piData);
+ return omPI;
}
-
+
/**
- * Method createSOAPFault
+ * Method createOMComment
*
- * @param ns
* @param parent
- * @param builder
- * @return
- */
- public SOAPFault createSOAPFault(OMNamespace ns, SOAPBody parent,
- OMXMLParserWrapper builder) {
- return new SOAPFaultImpl(ns, parent, builder);
- }
-
- /**
- * Method getDefaultEnvelope
- *
+ * @param content
* @return
*/
- public SOAPEnvelope getDefaultEnvelope() {
- // Create an envelope
- OMNamespace ns =
- new OMNamespaceImpl(OMConstants.SOAP_ENVELOPE_NAMESPACE_URI,
- OMConstants.SOAPENVELOPE_NAMESPACE_PREFIX);
- SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns);
- SOAPBodyImpl bodyImpl = new SOAPBodyImpl(env);
- env.addChild(bodyImpl);
-
- SOAPHeaderImpl headerImpl = new SOAPHeaderImpl(env);
- headerImpl.setComplete(true);
- env.addChild(headerImpl);
- return env;
+ public OMComment createOMComment(OMElement parent, String content) throws OMException{
+ OMCommentImpl commentNode = new OMCommentImpl(parent,content);
+ return commentNode;
}
+
}
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java Fri Jun 3 07:23:47 2005
@@ -17,7 +17,8 @@
import org.apache.axis.om.OMFactory;
import org.apache.axis.om.impl.llom.builder.StAXOMBuilder;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.axis.soap.SOAPFactory;
+import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
import javax.xml.stream.XMLStreamReader;
@@ -48,13 +49,13 @@
/**
* Method createStAXSOAPModelBuilder
*
- * @param ombuilderFactory
+ * @param soapFactory
* @param parser
* @return
*/
public static StAXSOAPModelBuilder createStAXSOAPModelBuilder(
- OMFactory ombuilderFactory, XMLStreamReader parser) {
- return new StAXSOAPModelBuilder(ombuilderFactory, parser);
+ SOAPFactory soapFactory, XMLStreamReader parser) {
+ return new StAXSOAPModelBuilder(parser);
}
/**
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java Fri Jun 3 07:23:47 2005
@@ -41,7 +41,7 @@
private int depth = 0;
/**
- * Method serialize
+ * Method serializeWithCache
*
* @param obj
* @param writer
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java Fri Jun 3 07:23:47 2005
@@ -77,7 +77,7 @@
// check the current node for the criteria
if (currentChild instanceof OMElement) {
OMAttribute attr =
- ((OMElement) currentChild).getAttributeWithQName(
+ ((OMElement) currentChild).getFirstAttribute(
attributeName);
if ((attr != null)
&& attr.getValue().equalsIgnoreCase(attributeValue)) {
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/EmptyIterator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/EmptyIterator.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/EmptyIterator.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/EmptyIterator.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,36 @@
+package org.apache.axis.om.impl.llom.util;
+
+import java.util.Iterator;
+
+/*
+* 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.
+*
+* An empty Iterator implementation
+*/
+public class EmptyIterator implements Iterator {
+ public void remove() {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean hasNext() {
+ return false;
+ }
+
+ public Object next() {
+ throw new UnsupportedOperationException();
+ }
+}
+
Modified: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/XMLComparator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/XMLComparator.java?rev=179795&r1=179794&r2=179795&view=diff
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/XMLComparator.java (original)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/om/impl/llom/util/XMLComparator.java Fri Jun 3 07:23:47 2005
@@ -1,11 +1,10 @@
package org.apache.axis.om.impl.llom.util;
+import org.apache.axis.om.OMAttribute;
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMAttribute;
import org.apache.axis.om.OMNode;
import org.apache.axis.om.impl.llom.exception.XMLComparisonException;
-import org.apache.axis.om.impl.llom.exception.XMLComparisonException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -83,11 +82,11 @@
OMNode omNode = (OMNode) elementOneChildren.next();
if(omNode instanceof OMElement){
OMElement elementOneChild = (OMElement) omNode;
- OMNode elementTwoChild = elementTwo.getChildWithName(elementOneChild.getQName());
+ OMElement elementTwoChild = elementTwo.getFirstChildWithName(elementOneChild.getQName());
if(elementTwoChild == null){
throw new XMLComparisonException(" There is no " + elementOneChild.getLocalName() + " element under " + elementTwo.getLocalName());
}
- compare(elementOneChild, (OMElement) elementTwoChild);
+ compare(elementOneChild, elementTwoChild);
}
}
}
@@ -99,7 +98,7 @@
Iterator attributes = elementOne.getAttributes();
while (attributes.hasNext()) {
OMAttribute omAttribute = (OMAttribute) attributes.next();
- OMAttribute attr = elementTwo.getAttributeWithQName(omAttribute.getQName());
+ OMAttribute attr = elementTwo.getFirstAttribute(omAttribute.getQName());
if(attr == null){
throw new XMLComparisonException("Attributes are not the same in two elements. Attribute "+ omAttribute.getLocalName() + " != ");
}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPBody.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPBody.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPBody.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPBody.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,69 @@
+/*
+ * 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.axis.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+
+/**
+ * An object that represents the contents of the SOAP body
+ * element in a SOAP message. B SOAP body element consists of XML data
+ * that affects the way the application-specific content is processed.
+ * <P>
+ * B <code>SOAPBody</code> object contains <code>OMBodyBlock</code>
+ * objects, which have the content for the SOAP body.
+ * B <code>SOAPFault</code> object, which carries status and/or
+ * error information, is an example of a <code>OMBodyBlock</code> object.
+ */
+public interface SOAPBody extends OMElement {
+ /**
+ * Creates a new <code>SOAPFault</code> object and adds it to
+ * this <code>SOAPBody</code> object.
+ *
+ * @param e
+ * @return the new <code>SOAPFault</code> object
+ * @throws org.apache.axis.om.OMException if there is a SOAP error
+ * @throws org.apache.axis.om.OMException
+ */
+ public abstract SOAPFault addFault(Exception e) throws OMException;
+
+ /**
+ * Indicates whether a <code>SOAPFault</code> object exists in
+ * this <code>SOAPBody</code> object.
+ *
+ * @return <code>true</code> if a <code>SOAPFault</code> object exists in
+ * this <code>SOAPBody</code> object; <code>false</code>
+ * otherwise
+ */
+ public abstract boolean hasFault();
+
+ /**
+ * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+ * object.
+ *
+ * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+ * object
+ */
+ public abstract SOAPFault getFault();
+
+ /**
+ * @param soapFault
+ * @throws OMException
+ */
+ public abstract void addFault(SOAPFault soapFault) throws OMException;
+
+
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPEnvelope.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPEnvelope.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPEnvelope.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPEnvelope.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,53 @@
+/*
+ * 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.axis.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+
+/**
+ * Interface SOAPEnvelope
+ */
+public interface SOAPEnvelope extends OMElement {
+ /**
+ * Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
+ * SOAPEnvelope</CODE> object.
+ * <P> This SOAPHeader will just be a container for all the headers in the
+ * <CODE>OMMessage</CODE>
+ * </P>
+ *
+ * @return the <CODE>SOAPHeader</CODE> object or <CODE>
+ * null</CODE> if there is none
+ * @throws org.apache.axis.om.OMException if there is a problem
+ * obtaining the <CODE>SOAPHeader</CODE> object
+ */
+ public abstract SOAPHeader getHeader() throws OMException;
+
+ /**
+ * Returns the <CODE>SOAPBody</CODE> object associated with
+ * this <CODE>SOAPEnvelope</CODE> object.
+ * <P> This SOAPBody will just be a container for all the BodyElements in the
+ * <CODE>OMMessage</CODE>
+ * </P>
+ *
+ * @return the <CODE>SOAPBody</CODE> object for this <CODE>
+ * SOAPEnvelope</CODE> object or <CODE>null</CODE> if there
+ * is none
+ * @throws OMException if there is a problem
+ * obtaining the <CODE>SOAPBody</CODE> object
+ */
+ public abstract SOAPBody getBody() throws OMException;
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFactory.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFactory.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFactory.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,115 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMXMLParserWrapper;
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFactory extends OMFactory{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ * @param ns
+ * @param builder
+ * @return
+ */
+ public SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
+ OMXMLParserWrapper builder);
+
+ /**
+ * @param ns
+ * @return
+ */
+ public SOAPEnvelope createSOAPEnvelope();
+ public SOAPEnvelope createSOAPEnvelope(OMNamespace ns);
+
+ /**
+ * @param envelope
+ * @return
+ */
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope);
+
+ /**
+ * @param envelope
+ * @param builder
+ * @return
+ */
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder);
+
+
+
+ /**
+ * @param envelope
+ * @return
+ */
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope);
+
+ /**
+ * @param envelope
+ * @param builder
+ * @return
+ */
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder);
+
+ /**
+ * @param localName
+ * @param ns
+ * @return
+ */
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+ OMNamespace ns);
+
+ /**
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+ OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+ /**
+ * @param parent
+ * @param e
+ * @return
+ */
+ public SOAPFault createSOAPFault(SOAPBody parent, Exception e);
+
+ /**
+ * @param ns
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFault createSOAPFault(OMNamespace ns, SOAPBody parent,
+ OMXMLParserWrapper builder);
+
+ /**
+ * Method getDefaultEnvelope
+ *
+ * @return
+ */
+ public SOAPEnvelope getDefaultEnvelope();
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFault.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFault.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFault.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,86 @@
+/*
+ * 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.axis.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+
+
+/**
+ * An element in the <CODE>SOAPBody</CODE> object that contains
+ * error and/or status information. This information may relate to
+ * errors in the <CODE>OMMessage</CODE> object or to problems
+ * that are not related to the content in the message itself.
+ * Problems not related to the message itself are generally errors
+ * in processing, such as the inability to communicate with an
+ * upstream server.
+ * <P>
+ * The <CODE>SOAPFault</CODE> interface provides methods for
+ * retrieving the information contained in a <CODE>
+ * SOAPFault</CODE> object and for setting the fault code, the
+ * fault actor, and a string describing the fault. B fault code is
+ * one of the codes defined in the SOAP 1.1 specification that
+ * describe the fault. An actor is an intermediate recipient to
+ * whom a message was routed. The message path may include one or
+ * more actors, or, if no actors are specified, the message goes
+ * only to the default actor, which is the final intended
+ * recipient.
+ */
+public interface SOAPFault extends OMElement {
+
+ /**
+ * SOAPFaultCode is a mandatory item in a Fault, in SOAP 1.2 specification
+ * @param soapFaultCode
+ */
+ public void setCode(SOAPFaultCode soapFaultCode);
+ public SOAPFaultCode getCode();
+
+ /**
+ * SOAPFaultReason is a mandatory item in a Fault, in SOAP 1.2 specification
+ * @param reason
+ */
+ public void setReason(SOAPFaultReason reason);
+ public SOAPFaultReason getReason();
+
+ /**
+ * SOAPFaultNode is an optional item in a Fault, in SOAP 1.2 specification
+ * @param node
+ */
+ public void setNode(SOAPFaultNode node);
+ public SOAPFaultNode getNode();
+
+ /**
+ * SOAPFaultRole is an optional item in a Fault, in SOAP 1.2 specification
+ * @param role
+ */
+ public void setRole(SOAPFaultRole role);
+ public SOAPFaultRole getRole();
+
+ /**
+ * SOAPFaultRole is an optional item in a Fault, in SOAP 1.2 specification
+ * @param detail
+ */
+ public void setDetail(SOAPFaultDetail detail);
+ public SOAPFaultDetail getDetail();
+
+ /**
+ * Method getException
+ *
+ * @return
+ * @throws org.apache.axis.om.OMException
+ */
+ public abstract Exception getException() throws OMException;
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCode.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCode.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCode.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,46 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFaultCode extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ * @param value
+ */
+ public void addValue(SOAPFaultCodeValue value);
+
+ /**
+ * @return
+ */
+ public SOAPFaultCodeValue getValue();
+
+ /**
+ * @param value
+ */
+ public void addSubCode(SOAPFaultSubCode value);
+
+ /**
+ * @return
+ */
+ public SOAPFaultSubCode getSubCode();
+
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCodeValue.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCodeValue.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCodeValue.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultCodeValue.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,38 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFaultCodeValue extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ *
+ * @param envFaultCodeEnum - Look in @see SOAP12Constants class for
+ * valid SOAP fault codes covering high level SOAP faults. Look for
+ * constants starting with SOAP_FAULT_VALUE_
+ */
+ public void setValue(String envFaultCodeEnum);
+
+ /**
+ * @return
+ */
+ public String getValue();
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultDetail.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultDetail.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultDetail.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultDetail.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,41 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+
+/**
+ * The Detail element information item is intended for carrying application
+ * specific error information related to the SOAP Body .
+ * <p/>
+ * The Detail element information item has:
+ * A [local name] of Detail .
+ * A [namespace name] of http://www.w3.org/2003/05/soap-envelope .
+ * Zero or more attribute information items in its [attributes] property.
+ * Zero or more child element information items in its [children] property.
+ */
+public interface SOAPFaultDetail extends OMElement {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+ public void addDetailEntry(OMElement detailElement);
+ public Iterator getAllDetailEntries();
+
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultNode.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultNode.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultNode.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,39 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFaultNode extends OMElement {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ * each SOAP node is identified by a URI. The value of the Node element
+ * information item is the URI that identifies the SOAP node that generated
+ * the fault. SOAP nodes that do not act as the ultimate SOAP receiver MUST
+ * include this element information item. An ultimate SOAP receiver MAY
+ * include this element information item to indicate explicitly that it
+ * generated the fault.
+ *
+ * @param uri
+ */
+ public void setNodeValue(String uri);
+
+ public String getNodeValue();
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultReason.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultReason.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultReason.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultReason.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,28 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFaultReason extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ public void setSOAPText(SOAPText soapText);
+ public SOAPText getSOAPText();
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultRole.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultRole.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultRole.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultRole.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,44 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+
+/**
+ * The Role element information item identifies the role the node was operating
+ * in at the point the fault occurred.
+ * <p/>
+ * The Role element information item has:
+ * A [local name] of Role .
+ * A [namespace name] of http://www.w3.org/2003/05/soap-envelope .
+ */
+public interface SOAPFaultRole extends OMElement {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ * The value of the Role element information item MUST be one of the roles
+ * assumed by the node during processing of the message
+ *
+ * @param uri
+ */
+ public void setRoleValue(String uri);
+
+ public String getRoleValue();
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCode.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCode.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCode.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,40 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFaultSubCode extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ * Fault SubCode contain only one mandatory Value child. This value child contains a QName
+ * @param soapFaultSubCodeValue
+ */
+ public void addValue(SOAPFaultSubCodeValue soapFaultSubCodeValue);
+ public SOAPFaultSubCodeValue getValue();
+
+
+ /**
+ * Fault SubCode can contain an optional SubCode
+ * @param subCode
+ */
+ public void addSubCode(SOAPFaultSubCode subCode);
+ public SOAPFaultSubCode getSubCode();
+}
Added: webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCodeValue.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCodeValue.java?rev=179795&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCodeValue.java (added)
+++ webservices/axis/trunk/archive/java/scratch/ashu_jaya_venkat/xml_conformance/XMLConformanceTestingProject/src/org/apache/axis/soap/SOAPFaultSubCodeValue.java Fri Jun 3 07:23:47 2005
@@ -0,0 +1,25 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPFaultSubCodeValue extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+}