You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2005/02/15 07:23:26 UTC
svn commit: r153902 [3/8] - in
webservices/axis/trunk/java/dev/scratch/prototype2/src:
java/org/apache/axis/addressing/ java/org/apache/axis/addressing/miheaders/
java/org/apache/axis/addressing/om/ java/org/apache/axis/clientapi/
java/org/apache/axis/context/ java/org/apache/axis/deployment/
java/org/apache/axis/deployment/listener/
java/org/apache/axis/deployment/repository/utill/
java/org/apache/axis/description/ java/org/apache/axis/engine/
java/org/apache/axis/handlers/ java/org/apache/axis/om/
java/org/apache/axis/om/impl/llom/ java/org/apache/axis/om/impl/llom/builder/
java/org/apache/axis/om/impl/llom/factory/
java/org/apache/axis/om/impl/llom/serialize/
java/org/apache/axis/om/impl/llom/traverse/
java/org/apache/axis/phaseresolver/ java/org/apache/axis/providers/
java/org/apache/axis/receivers/ java/org/apache/axis/transport/
java/org/apache/axis/transport/http/ java/org/apache/axis/wsdl/wsdltowom/
java/org/apache/wsdl/ java/org/apache/wsdl/impl/ java/org/apache/wsdl/util/
test/org/apache/axis/ test/org/apache/axis/addressing/
test/org/apache/axis/addressing/miheaders/ test/org/apache/axis/clientapi/
test/org/apache/axis/deployment/ test/org/apache/axis/description/
test/org/apache/axis/encoding/ test/org/apache/axis/engine/
test/org/apache/axis/integration/ test/org/apache/axis/misc/
test/org/apache/axis/om/ test/org/apache/axis/om/builder/
test/org/apache/axis/om/builder/dummy/ test/org/apache/axis/om/factory/
test/org/apache/axis/om/impl/builder/
test/org/apache/axis/om/impl/seriliazer/
test/org/apache/axis/om/impl/streamwrapper/
test/org/apache/axis/om/impl/traverse/ test/org/apache/axis/testUtils/
test/org/apache/axis/transport/ test/org/apache/wsdl/
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMStAXWrapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMStAXWrapper.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMStAXWrapper.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMStAXWrapper.java Mon Feb 14 22:22:34 2005
@@ -1,7 +1,9 @@
package org.apache.axis.om.impl.llom;
-import java.util.Iterator;
-import java.util.Stack;
+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;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
@@ -9,17 +11,8 @@
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-
-import org.apache.axis.om.OMAttribute;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMNamedNode;
-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.impl.llom.exception.OMStreamingException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.Iterator;
+import java.util.Stack;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -38,8 +31,8 @@
*/
/**
- * Note - This class also implements the streaming constants interface
- * to get access to the StAX constants
+ * Note - This class also implements the streaming constants interface
+ * to get access to the StAX constants
*/
public class OMStAXWrapper implements XMLStreamReader, XMLStreamConstants {
@@ -63,7 +56,6 @@
private int currentEvent = 0;
-
// SwitchingAllowed is set to false by default
// this means that unless the user explicitly states
// that he wants things not to be cached, everything will
@@ -99,10 +91,10 @@
* root element if the entire document is needed
*/
OMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode) {
- this(builder,startNode,false);
+ this(builder, startNode, false);
}
- OMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode,boolean cacheOff) {
+ OMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode, boolean cacheOff) {
//create a navigator
this.navigator = new OMNavigator(startNode);
this.builder = builder;
@@ -114,14 +106,15 @@
updateNextNode();
switchingAllowed = cacheOff;
}
+
/**
* @see javax.xml.stream.XMLStreamReader#getPrefix()
*/
public String getPrefix() {
String returnStr = null;
- if (parser!=null){
+ if (parser != null) {
returnStr = parser.getPrefix();
- }else{
+ } else {
if (currentEvent == START_ELEMENT || currentEvent == END_ELEMENT) {
OMNamespace ns = ((OMElement) lastNode).getNamespace();
returnStr = ns == null ? null : ns.getPrefix();
@@ -135,9 +128,9 @@
*/
public String getNamespaceURI() {
String returnStr = null;
- if (parser!=null){
+ if (parser != null) {
returnStr = parser.getNamespaceURI();
- }else{
+ } else {
if (currentEvent == START_ELEMENT || currentEvent == END_ELEMENT || currentEvent == NAMESPACE) {
OMNamespace ns = ((OMElement) lastNode).getNamespace();
returnStr = ns == null ? null : ns.getName();
@@ -150,21 +143,21 @@
* @see javax.xml.stream.XMLStreamReader#hasName()
*/
public boolean hasName() {
- if (parser!= null){
+ if (parser != null) {
return parser.hasName();
- }else{
+ } else {
return (currentEvent == START_ELEMENT || currentEvent == END_ELEMENT);
}
}
/**
- *@see javax.xml.stream.XMLStreamReader#getLocalName()
+ * @see javax.xml.stream.XMLStreamReader#getLocalName()
*/
public String getLocalName() {
String returnStr = null;
- if (parser!=null){
+ if (parser != null) {
returnStr = parser.getLocalName();
- }else{
+ } else {
if (currentEvent == START_ELEMENT || currentEvent == END_ELEMENT || currentEvent == ENTITY_REFERENCE) {
returnStr = ((OMElement) lastNode).getLocalName();
}
@@ -174,13 +167,13 @@
}
/**
- *@see javax.xml.stream.XMLStreamReader#getName()
+ * @see javax.xml.stream.XMLStreamReader#getName()
*/
public QName getName() {
QName returnName = null;
- if (parser!=null){
+ if (parser != null) {
returnName = parser.getName();
- } else{
+ } else {
if (currentEvent == START_ELEMENT || currentEvent == END_ELEMENT) {
returnName = getQName((OMNamedNode) lastNode);
}
@@ -206,9 +199,9 @@
*/
public int getTextLength() {
int returnLength = 0;
- if (parser!=null){
+ if (parser != null) {
returnLength = parser.getTextLength();
- } else{
+ } else {
OMText textNode = (OMText) lastNode;
returnLength = textNode.getValue().length();
}
@@ -221,7 +214,7 @@
*/
public int getTextStart() {
int returnLength = 0;
- if (parser !=null) {
+ if (parser != null) {
returnLength = parser.getTextStart();
}
//Note - this has no relevant method in the OM
@@ -230,13 +223,12 @@
}
/**
- *
- * @see javax.xml.stream.XMLStreamReader#getTextCharacters(int, char[], int, int)
+ * @see javax.xml.stream.XMLStreamReader#getTextCharacters(int, char[], int, int)
*/
public int getTextCharacters(int i, char[] chars, int i1, int i2) throws XMLStreamException {
int returnLength = 0;
if (hasText()) {
- if (parser!=null) {
+ if (parser != null) {
try {
returnLength = parser.getTextCharacters(i, chars, i1, i2);
} catch (XMLStreamException e) {
@@ -254,7 +246,7 @@
public char[] getTextCharacters() {
char[] returnArray = null;
- if (parser!=null) {
+ if (parser != null) {
returnArray = parser.getTextCharacters();
} else {
if (hasText()) {
@@ -272,9 +264,9 @@
*/
public String getText() {
String returnString = null;
- if (parser!=null){
+ if (parser != null) {
returnString = parser.getText();
- } else {
+ } else {
if (hasText()) {
OMText textNode = (OMText) lastNode;
@@ -294,17 +286,16 @@
}
/**
- * @see javax.xml.stream.XMLStreamReader#getNamespaceURI
- *
+ * @see javax.xml.stream.XMLStreamReader#getNamespaceURI
*/
public String getNamespaceURI(int i) {
String returnString = null;
- if (parser!=null){
+ if (parser != null) {
returnString = parser.getNamespaceURI(i);
- }else{
+ } else {
if (isStartElement() || isEndElement() || currentEvent == NAMESPACE) {
- OMNamespace ns = (OMNamespace)getItemFromIterator(((OMElement)lastNode).getAllDeclaredNamespaces(),i);
- returnString = ns==null?null:ns.getName();
+ OMNamespace ns = (OMNamespace) getItemFromIterator(((OMElement) lastNode).getAllDeclaredNamespaces(), i);
+ returnString = ns == null ? null : ns.getName();
}
}
@@ -316,12 +307,12 @@
*/
public String getNamespacePrefix(int i) {
String returnString = null;
- if (parser !=null){
+ if (parser != null) {
returnString = parser.getNamespacePrefix(i);
} else {
if (isStartElement() || isEndElement() || currentEvent == NAMESPACE) {
- OMNamespace ns = (OMNamespace)getItemFromIterator(((OMElement)lastNode).getAllDeclaredNamespaces(),i);
- returnString = ns==null?null:ns.getPrefix();
+ OMNamespace ns = (OMNamespace) getItemFromIterator(((OMElement) lastNode).getAllDeclaredNamespaces(), i);
+ returnString = ns == null ? null : ns.getPrefix();
}
}
return returnString;
@@ -332,11 +323,11 @@
*/
public int getNamespaceCount() {
int returnCount = 0;
- if (parser!=null){
+ if (parser != null) {
returnCount = parser.getNamespaceCount();
- } else{
+ } else {
if (isStartElement() || isEndElement() || currentEvent == NAMESPACE) {
- returnCount = getCount(((OMElement)lastNode).getAllDeclaredNamespaces());
+ returnCount = getCount(((OMElement) lastNode).getAllDeclaredNamespaces());
}
}
@@ -349,9 +340,9 @@
*/
public boolean isAttributeSpecified(int i) {
boolean returnValue = false;
- if (parser!=null){
+ if (parser != null) {
returnValue = parser.isAttributeSpecified(i);
- }else {
+ } else {
if (isStartElement() || currentEvent == ATTRIBUTE) {
//theres nothing to be returned here
} else {
@@ -366,16 +357,16 @@
*/
public String getAttributeValue(int i) {
String returnString = null;
- if (parser!=null){
+ if (parser != null) {
returnString = parser.getAttributeValue(i);
- }else{
+ } else {
if (isStartElement() || currentEvent == ATTRIBUTE) {
OMAttribute attrib = getAttribute((OMElement) lastNode, i);
if (attrib != null) {
returnString = attrib.getValue();
}
- }else{
+ } else {
throw new IllegalStateException("attribute type accessed in illegal event!");
}
}
@@ -384,19 +375,18 @@
}
/**
- *
* @see javax.xml.stream.XMLStreamReader#getAttributeType
*/
public String getAttributeType(int i) {
String returnString = null;
- if (parser!=null){
+ if (parser != null) {
returnString = parser.getAttributeType(i);
} else {
if (isStartElement() || currentEvent == ATTRIBUTE) {
//todo implement this
- } else {
- throw new IllegalStateException("attribute type accessed in illegal event!");
- }
+ } else {
+ throw new IllegalStateException("attribute type accessed in illegal event!");
+ }
}
return returnString;
@@ -407,10 +397,10 @@
*/
public String getAttributePrefix(int i) {
String returnString = null;
- if (parser!=null){
- returnString = parser.getAttributePrefix(i);
- }else{
- if (isStartElement() || currentEvent == ATTRIBUTE) {
+ if (parser != null) {
+ returnString = parser.getAttributePrefix(i);
+ } else {
+ if (isStartElement() || currentEvent == ATTRIBUTE) {
OMAttribute attrib = getAttribute((OMElement) lastNode, i);
if (attrib != null) {
@@ -420,9 +410,9 @@
}
}
- } else {
- throw new IllegalStateException("attribute prefix accessed in illegal event!");
- }
+ } else {
+ throw new IllegalStateException("attribute prefix accessed in illegal event!");
+ }
}
return returnString;
@@ -433,19 +423,19 @@
*/
public String getAttributeLocalName(int i) {
String returnString = null;
- if (parser!=null){
- returnString = parser.getAttributeLocalName(i);
- }else{
- if (isStartElement() || currentEvent == ATTRIBUTE) {
+ if (parser != null) {
+ returnString = parser.getAttributeLocalName(i);
+ } else {
+ if (isStartElement() || currentEvent == ATTRIBUTE) {
OMAttribute attrib = getAttribute((OMElement) lastNode, i);
if (attrib != null)
returnString = attrib.getLocalName();
- } else {
- throw new IllegalStateException("attribute localName accessed in illegal event!");
- }
+ } else {
+ throw new IllegalStateException("attribute localName accessed in illegal event!");
+ }
}
return returnString;
@@ -456,9 +446,9 @@
*/
public String getAttributeNamespace(int i) {
String returnString = null;
- if (parser!=null){
- returnString = parser.getAttributeNamespace(i);
- }else{
+ if (parser != null) {
+ returnString = parser.getAttributeNamespace(i);
+ } else {
if (isStartElement() || currentEvent == ATTRIBUTE) {
OMAttribute attrib = getAttribute((OMElement) lastNode, i);
@@ -469,9 +459,9 @@
}
}
- } else {
- throw new IllegalStateException("attribute nameSpace accessed in illegal event!");
- }
+ } else {
+ throw new IllegalStateException("attribute nameSpace accessed in illegal event!");
+ }
}
return returnString;
@@ -482,16 +472,16 @@
*/
public QName getAttributeName(int i) {
QName returnQName = null;
- if (parser!=null){
- returnQName = parser.getAttributeName(i);
- }else{
- if (isStartElement() || currentEvent == ATTRIBUTE) {
+ if (parser != null) {
+ returnQName = parser.getAttributeName(i);
+ } else {
+ if (isStartElement() || currentEvent == ATTRIBUTE) {
returnQName = getAttribute((OMElement) lastNode, i).getQName();
- } else {
- throw new IllegalStateException("attribute count accessed in illegal event!");
- }
+ } else {
+ throw new IllegalStateException("attribute count accessed in illegal event!");
+ }
}
return returnQName;
@@ -503,18 +493,18 @@
*/
public int getAttributeCount() {
int returnCount = 0;
- if (parser!=null){
+ if (parser != null) {
returnCount = parser.getAttributeCount();
- }else{
- if (isStartElement() || currentEvent == ATTRIBUTE) {
+ } else {
+ if (isStartElement() || currentEvent == ATTRIBUTE) {
OMElement elt = (OMElement) lastNode;
returnCount = getCount(elt.getAttributes());
- } else {
- throw new IllegalStateException("attribute count accessed in illegal event!");
- }
+ } else {
+ throw new IllegalStateException("attribute count accessed in illegal event!");
+ }
}
@@ -529,10 +519,10 @@
public boolean isWhiteSpace() {
boolean b;
- if (parser!=null){
- b = parser.isWhiteSpace();
- }else{
- b = (currentEvent == SPACE);
+ if (parser != null) {
+ b = parser.isWhiteSpace();
+ } else {
+ b = (currentEvent == SPACE);
}
return b;
@@ -540,19 +530,19 @@
public boolean isCharacters() {
boolean b;
- if (parser!=null){
- b = parser.isCharacters();
- }else{
- b = (currentEvent == CHARACTERS);
+ if (parser != null) {
+ b = parser.isCharacters();
+ } else {
+ b = (currentEvent == CHARACTERS);
}
return b;
}
public boolean isEndElement() {
boolean b;
- if (parser!=null){
+ if (parser != null) {
b = parser.isEndElement();
- }else{
+ } else {
b = (currentEvent == END_ELEMENT);
}
@@ -560,11 +550,11 @@
}
/**
- * @see javax.xml.stream.XMLStreamReader#require(int, String, String)
* @param i
* @param s
* @param s1
* @throws XMLStreamException
+ * @see javax.xml.stream.XMLStreamReader#require(int, String, String)
*/
public void require(int i, String s, String s1) throws XMLStreamException {
throw new XMLStreamException();
@@ -572,10 +562,10 @@
public boolean isStartElement() {
boolean b;
- if (parser!=null){
- b = parser.isStartElement();
- }else{
- b = (currentEvent == START_ELEMENT);
+ if (parser != null) {
+ b = parser.isStartElement();
+ } else {
+ b = (currentEvent == START_ELEMENT);
}
return b;
@@ -583,14 +573,14 @@
public String getNamespaceURI(String s) {
String returnString = null;
- if (parser!=null){
+ if (parser != null) {
returnString = parser.getNamespaceURI(s);
- }else{
+ } else {
if (isStartElement() || isEndElement() || currentEvent == NAMESPACE) {
//Nothing to do here! How to get the namespacace references
- }
+ }
}
return returnString;
@@ -598,7 +588,7 @@
public void close() throws XMLStreamException {
//this doesnot mean anything with respect to the OM
- if (parser!=null) {
+ if (parser != null) {
parser.close();
}
@@ -606,7 +596,7 @@
}
public boolean hasNext() throws XMLStreamException {
- return !(state==COMPLETED);
+ return !(state == COMPLETED);
}
/**
@@ -626,24 +616,24 @@
public String getElementText() throws XMLStreamException {
String returnText = "";
- if (parser!=null){
+ if (parser != null) {
try {
returnText = parser.getElementText();
} catch (XMLStreamException e) {
throw new OMStreamingException(e);
}
- }else{
- if (currentNode.getType() == OMNode.ELEMENT_NODE) {
+ } else {
+ if (currentNode.getType() == OMNode.ELEMENT_NODE) {
//todo complete this
return null;
}
}
-
+
return returnText;
}
public int next() throws XMLStreamException {
- switch(state){
+ switch (state) {
case COMPLETED:
throw new OMStreamingException("Parser completed!");
case SWITCH_AT_NEXT:
@@ -721,14 +711,14 @@
}
private void updateCompleteStatus() {
- if (state==NAVIGABLE){
+ if (state == NAVIGABLE) {
if (rootNode == currentNode)
if (isFirst)
isFirst = false;
else
state = COMPLETED;
- } else{
- state = (currentEvent == END_DOCUMENT)?COMPLETED:state;
+ } else {
+ state = (currentEvent == END_DOCUMENT) ? COMPLETED : state;
}
}
@@ -785,7 +775,7 @@
switch (nodeType) {
case OMNode.ELEMENT_NODE:
OMElement element = (OMElement) node;
- log.info("Generating events from element {" + element.getNamespaceName()+ '}' + element.getLocalName() + " Generated OM tree");
+ log.info("Generating events from element {" + element.getNamespaceName() + '}' + element.getLocalName() + " Generated OM tree");
returnEvent = generateElementEvents(element);
break;
case OMNode.TEXT_NODE:
@@ -893,7 +883,7 @@
if (ns != null) {
String prefix = ns.getPrefix();
String uri = ns.getName();
- if (prefix==null || prefix.equals(""))
+ if (prefix == null || prefix.equals(""))
returnName = new QName(uri, localPart);
else
returnName = new QName(uri, localPart, prefix);
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMTextImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMTextImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMTextImpl.java Mon Feb 14 22:22:34 2005
@@ -1,14 +1,10 @@
package org.apache.axis.om.impl.llom;
+import org.apache.axis.om.*;
+
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-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;
-
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -28,8 +24,8 @@
public class OMTextImpl extends OMNodeImpl implements OMText, OMConstants {
protected short textType = TEXT_NODE;
-
- public OMTextImpl(OMElement parent, String text) {
+
+ public OMTextImpl(OMElement parent, String text) {
super(parent);
setValue(text);
done = true;
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPBodyImpl.java Mon Feb 14 22:22:34 2005
@@ -1,16 +1,9 @@
package org.apache.axis.om.impl.llom;
-import java.util.Iterator;
+import org.apache.axis.om.*;
import javax.xml.namespace.QName;
-
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMException;
-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 java.util.Iterator;
/**
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPEnvelopeImpl.java Mon Feb 14 22:22:34 2005
@@ -1,14 +1,6 @@
package org.apache.axis.om.impl.llom;
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
-import org.apache.axis.om.SOAPHeader;
+import org.apache.axis.om.*;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -45,7 +37,7 @@
super(SOAPENVELOPE_LOCAL_NAME, ns);
}
- /**
+ /**
* Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
* SOAPEnvelope</CODE> object.
* <p/>
@@ -63,18 +55,18 @@
// while(header == null && body == null){
// builder.next();
// }
-// }
- OMNode node = getFirstChild();
- while(node != null){
- if(node != null && node.getType() == OMNode.ELEMENT_NODE){
- OMElement element = (OMElement)node;
- if(OMConstants.HEADER_LOCAL_NAME.equals(element.getLocalName())){
- return (SOAPHeader)element;
- }
- }
- node = node.getNextSibling();
- }
- return null;
+// }
+ OMNode node = getFirstChild();
+ while (node != null) {
+ if (node != null && node.getType() == OMNode.ELEMENT_NODE) {
+ OMElement element = (OMElement) node;
+ if (OMConstants.HEADER_LOCAL_NAME.equals(element.getLocalName())) {
+ return (SOAPHeader) element;
+ }
+ }
+ node = node.getNextSibling();
+ }
+ return null;
}
/**
@@ -92,8 +84,8 @@
* obtaining the <CODE>SOAPBody</CODE> object
*/
public SOAPBody getBody() throws OMException {
- //Look at this . this code forces the OM to build the whole thing because
- //the iterator needs to stay <i>ahead</i> one node.We need to do this manually
+ //Look at this . this code forces the OM to build the whole thing because
+ //the iterator needs to stay <i>ahead</i> one node.We need to do this manually
// if(builder != null){
// while( body == null){
// builder.next();
@@ -103,17 +95,17 @@
// return body;
- OMNode node = getFirstChild();
- while(node != null){
- if(node != null && node.getType() == OMNode.ELEMENT_NODE){
- OMElement element = (OMElement)node;
- if(OMConstants.BODY_LOCAL_NAME.equals(element.getLocalName())){
- return (SOAPBody)element;
- }
- }
- node = node.getNextSibling();
- }
- return null;
+ OMNode node = getFirstChild();
+ while (node != null) {
+ if (node != null && node.getType() == OMNode.ELEMENT_NODE) {
+ OMElement element = (OMElement) node;
+ if (OMConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
+ return (SOAPBody) element;
+ }
+ }
+ node = node.getNextSibling();
+ }
+ return null;
// Iterator bodyIterator = this.getChildrenWithName(new QName(OMConstants.BODY_NAMESPACE_URI, OMConstants.BODY_LOCAL_NAME));
// SOAPBody soapBody = null;
// if (bodyIterator.hasNext()) {
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java Mon Feb 14 22:22:34 2005
@@ -1,23 +1,14 @@
package org.apache.axis.om.impl.llom;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Iterator;
+import org.apache.axis.om.*;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-
-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.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPFault;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -78,9 +69,9 @@
return new QName("", strings[1], strings[0]);
}
}
- }else {
+ } else {
faultCodeElement = (OMElementImpl) this.getChildWithName(new QName(this.ns.getName(), OMConstants.SOAPFAULT_CODE_LOCAL_NAME, this.ns.getPrefix()));
- if(faultCodeElement != null){
+ if (faultCodeElement != null) {
return this.getFaultCode();
}
}
@@ -106,9 +97,9 @@
}
}
- }else {
+ } else {
faultActorElement = (OMElementImpl) this.getChildWithName(new QName(this.ns.getName(), OMConstants.SOAPFAULT_ACTOR_LOCAL_NAME, this.ns.getPrefix()));
- if(faultActorElement != null){
+ if (faultActorElement != null) {
return this.getFaultString();
}
}
@@ -134,9 +125,9 @@
return ((OMText) o).getValue();
}
}
- }else {
+ } else {
faultStringElement = (OMElementImpl) this.getChildWithName(new QName(this.ns.getName(), OMConstants.SOAPFAULT_STRING_LOCAL_NAME, this.ns.getPrefix()));
- if(faultStringElement != null){
+ if (faultStringElement != null) {
return this.getFaultString();
}
}
@@ -162,9 +153,9 @@
return (OMNode) o;
}
}
- }else {
+ } else {
detailElement = (OMElementImpl) this.getChildWithName(new QName(this.ns.getName(), OMConstants.SOAPFAULT_DETAIL_LOCAL_NAME, this.ns.getPrefix()));
- if(detailElement != null){
+ if (detailElement != null) {
return this.getDetailInformation();
}
}
@@ -174,22 +165,22 @@
public Exception getException() throws OMException {
if (e == null) {
-
- OMNode detailsInformationNode = this.getDetailInformation();
- if (detailsInformationNode instanceof OMElement) {
- try {
- StringWriter sw = new StringWriter();
- XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(sw);
- ((OMElement) detailsInformationNode).serialize(writer, true);
- writer.flush();
- return new Exception(sw.toString());
- } catch (XMLStreamException e1) {
- throw new OMException("Exception in StAX Writer", e1);
- }
- } else if (detailsInformationNode instanceof OMText) {
- return new Exception(((OMText) detailsInformationNode).getValue());
+ OMNode detailsInformationNode = this.getDetailInformation();
+ if (detailsInformationNode instanceof OMElement) {
+ try {
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(sw);
+ ((OMElement) detailsInformationNode).serialize(writer, true);
+ writer.flush();
+ return new Exception(sw.toString());
+ } catch (XMLStreamException e1) {
+ throw new OMException("Exception in StAX Writer", e1);
}
+ } else if (detailsInformationNode instanceof OMText) {
+
+ return new Exception(((OMText) detailsInformationNode).getValue());
+ }
} else {
return e;
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderBlockImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderBlockImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderBlockImpl.java Mon Feb 14 22:22:34 2005
@@ -1,13 +1,8 @@
package org.apache.axis.om.impl.llom;
-import javax.xml.namespace.QName;
+import org.apache.axis.om.*;
-import org.apache.axis.om.OMAttribute;
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPHeaderBlock;
+import javax.xml.namespace.QName;
/**
* Copyright 2001-2004 The Apache Software Foundation.
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPHeaderImpl.java Mon Feb 14 22:22:34 2005
@@ -1,17 +1,10 @@
package org.apache.axis.om.impl.llom;
-import java.util.Iterator;
+import org.apache.axis.om.*;
+import org.apache.axis.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
import javax.xml.namespace.QName;
-
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPEnvelope;
-import org.apache.axis.om.SOAPHeader;
-import org.apache.axis.om.SOAPHeaderBlock;
-import org.apache.axis.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
+import java.util.Iterator;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -90,7 +83,7 @@
if (o instanceof SOAPHeaderBlock) {
SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) o;
String actor = soapHeaderBlock.getActor();
- if(actor != null && actor.equalsIgnoreCase(paramActor)){
+ if (actor != null && actor.equalsIgnoreCase(paramActor)) {
// headerBlocksIter.
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXBuilder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXBuilder.java Mon Feb 14 22:22:34 2005
@@ -1,18 +1,12 @@
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;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -29,6 +23,7 @@
* limitations under the License.
* <p/>
*/
+
/**
* 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.
@@ -58,7 +53,7 @@
protected StAXBuilder(XMLStreamReader parser) {
this(OMFactory.newInstance(), parser);
- omfactory = OMFactory.newInstance();
+ omfactory = OMFactory.newInstance();
}
public void setOmbuilderFactory(OMFactory ombuilderFactory) {
@@ -80,7 +75,7 @@
//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),parser.getAttributeValue(i), ns);
+ node.insertAttribute(parser.getAttributeLocalName(i), parser.getAttributeValue(i), ns);
}
}
@@ -237,7 +232,6 @@
public abstract int next() throws OMException;
/**
- *
* @return
*/
public short getBuilderType() {
@@ -252,5 +246,5 @@
throw new UnsupportedOperationException();
}
-
+
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXOMBuilder.java Mon Feb 14 22:22:34 2005
@@ -1,17 +1,11 @@
package org.apache.axis.om.impl.llom.builder;
+import org.apache.axis.om.*;
+import org.apache.axis.om.impl.llom.OMDocument;
+
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamReader;
-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.SOAPEnvelope;
-import org.apache.axis.om.impl.llom.OMDocument;
-
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -29,7 +23,7 @@
* <p/>
*/
-/**
+/**
* This will construct an OM without using SOAP specific classes like SOAPEnvelope, SOAPHeader, SOAPHeaderBlock and SOAPBody.
* And this will habe the Document concept also.
*/
@@ -40,13 +34,13 @@
public StAXOMBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
super(ombuilderFactory, parser);
document = new OMDocument(this);
- omfactory = OMFactory.newInstance();
+ omfactory = OMFactory.newInstance();
}
public StAXOMBuilder(XMLStreamReader parser) {
super(parser);
document = new OMDocument(this);
- omfactory = OMFactory.newInstance();
+ omfactory = OMFactory.newInstance();
}
protected OMNode createOMElement() throws OMException {
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXSOAPModelBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXSOAPModelBuilder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXSOAPModelBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/builder/StAXSOAPModelBuilder.java Mon Feb 14 22:22:34 2005
@@ -1,22 +1,15 @@
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.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.*;
import org.apache.axis.om.impl.llom.OMElementImpl;
import org.apache.axis.om.impl.llom.SOAPEnvelopeImpl;
import org.apache.axis.om.impl.llom.exception.OMBuilderException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -39,7 +32,7 @@
private SOAPEnvelopeImpl envelope;
private boolean headerPresent = false;
private boolean bodyPresent = false;
- private Log log = LogFactory.getLog(getClass());
+ private Log log = LogFactory.getLog(getClass());
/**
* element level 1 = envelope level
@@ -83,7 +76,7 @@
//fill in the attributes
processAttributes(node);
- log.info("Build the OMElelment {" + node.getNamespaceName()+ '}' + node.getLocalName() + "By the StaxSOAPModelBuilder");
+ log.info("Build the OMElelment {" + node.getNamespaceName() + '}' + node.getLocalName() + "By the StaxSOAPModelBuilder");
return node;
}
@@ -95,7 +88,7 @@
if (!elementName.equalsIgnoreCase(OMConstants.SOAPENVELOPE_LOCAL_NAME)) {
throw new OMException("First Element must contain the local name, " + OMConstants.SOAPENVELOPE_LOCAL_NAME);
}
- envelope = (SOAPEnvelopeImpl)ombuilderFactory.createSOAPEnvelope(null, this);
+ envelope = (SOAPEnvelopeImpl) ombuilderFactory.createSOAPEnvelope(null, this);
element = (OMElementImpl) envelope;
processNamespaceData(element, true);
@@ -109,16 +102,16 @@
throw new OMBuilderException("Header Body wrong order!");
}
headerPresent = true;
- element = ombuilderFactory.createSOAPHeader((SOAPEnvelope)parent, this);
- //envelope.setHeader((SOAPHeader)element);
+ element = ombuilderFactory.createSOAPHeader((SOAPEnvelope) parent, this);
+ //envelope.setHeader((SOAPHeader)element);
processNamespaceData(element, true);
} else if (elementName.equals(OMConstants.BODY_LOCAL_NAME)) {
if (bodyPresent) {
throw new OMBuilderException("Multiple body elements encountered");
}
bodyPresent = true;
- element = ombuilderFactory.createSOAPBody((SOAPEnvelope)parent, this);
- //envelope.setBody((SOAPBody)element);
+ element = ombuilderFactory.createSOAPBody((SOAPEnvelope) parent, this);
+ //envelope.setBody((SOAPBody)element);
processNamespaceData(element, true);
} else {
throw new OMBuilderException(elementName + " is not supported here. Envelope can not have elements other than Header and Body.");
@@ -129,9 +122,9 @@
element = ombuilderFactory.createSOAPHeaderBlock(elementName, null, parent, this);
processNamespaceData(element, false);
- }else if (elementLevel == 3 && parent.getLocalName().equalsIgnoreCase(OMConstants.BODY_LOCAL_NAME) && elementName.equalsIgnoreCase(OMConstants.BODY_FAULT_LOCAL_NAME)) {
+ } else if (elementLevel == 3 && parent.getLocalName().equalsIgnoreCase(OMConstants.BODY_LOCAL_NAME) && elementName.equalsIgnoreCase(OMConstants.BODY_FAULT_LOCAL_NAME)) {
// this is a headerblock
- element = ombuilderFactory.createSOAPFault(null, (SOAPBody)parent, this);
+ element = ombuilderFactory.createSOAPFault(null, (SOAPBody) parent, this);
processNamespaceData(element, false);
} else {
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java Mon Feb 14 22:22:34 2005
@@ -1,18 +1,10 @@
package org.apache.axis.om.impl.llom.factory;
-import java.util.Stack;
-
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.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.*;
import javax.xml.namespace.QName;
+import java.util.Stack;
/**
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMXMLBuilderFactory.java Mon Feb 14 22:22:34 2005
@@ -1,10 +1,10 @@
package org.apache.axis.om.impl.llom.factory;
-import javax.xml.stream.XMLStreamReader;
-
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 javax.xml.stream.XMLStreamReader;
/**
* Copyright 2001-2004 The Apache Software Foundation.
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java Mon Feb 14 22:22:34 2005
@@ -1,8 +1,5 @@
package org.apache.axis.om.impl.llom.serialize;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xml.sax.Attributes;
@@ -10,6 +7,9 @@
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -70,9 +70,9 @@
}
public void startPrefixMapping(String prefix, String uri) throws SAXException {
- try {
- writer.writeNamespace(prefix,uri);
- writer.setPrefix(prefix,uri);
+ try {
+ writer.writeNamespace(prefix, uri);
+ writer.setPrefix(prefix, uri);
} catch (XMLStreamException e) {
throw new SAXException(e);
}
@@ -86,31 +86,30 @@
}
}
- private String getPrefix(String qName){
- if (qName!=null){
- return qName.substring(0,qName.indexOf(":"));
+ private String getPrefix(String qName) {
+ if (qName != null) {
+ return qName.substring(0, qName.indexOf(":"));
}
return null;
}
-
-
-
+
+
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
try {
- log.info("writing element {"+namespaceURI+'}'+ localName +" directly to stream ");
-
+ log.info("writing element {" + namespaceURI + '}' + localName + " directly to stream ");
+
String prefix = getPrefix(qName);
//it is only the prefix we want to learn from the QName! so we can get rid of the
//spliting QName
- if (prefix ==null){
- writer.writeStartElement(namespaceURI,localName);
- }else{
- writer.writeStartElement(prefix,localName,namespaceURI);
+ if (prefix == null) {
+ writer.writeStartElement(namespaceURI, localName);
+ } else {
+ writer.writeStartElement(prefix, localName, namespaceURI);
}
- if (atts!=null){
+ if (atts != null) {
int attCount = atts.getLength();
for (int i = 0; i < attCount; i++) {
-
+
writer.writeAttribute(atts.getURI(i),
localName,
atts.getValue(i));
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java Mon Feb 14 22:22:34 2005
@@ -1,12 +1,13 @@
package org.apache.axis.om.impl.llom.serialize;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMSerializer;
+
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMSerializer;
//import java.util.Stack;
@@ -27,11 +28,11 @@
*/
public class StreamingOMSerializer implements XMLStreamConstants, OMSerializer {
- /* The behavior of the serializer is such that it returns when it encounters the
- starting element for the second time. The depth variable tracks the depth of the
- serilizer and tells it when to return.
- Note that it is assumed that this serilization starts on an Element
- */
+ /* The behavior of the serializer is such that it returns when it encounters the
+ starting element for the second time. The depth variable tracks the depth of the
+ serilizer and tells it when to return.
+ Note that it is assumed that this serilization starts on an Element
+ */
private int depth = 0;
public void serialize(Object obj, XMLStreamWriter writer) throws XMLStreamException {
@@ -50,7 +51,7 @@
if (event == START_ELEMENT) {
serializeElement(reader, writer);
- depth ++;
+ depth++;
} else if (event == ATTRIBUTE) {
serializeAttributes(reader, writer);
} else if (event == CHARACTERS) {
@@ -69,7 +70,7 @@
//this is eaten
}
}
- if (depth==0) break;
+ if (depth == 0) break;
}
}
@@ -83,18 +84,18 @@
String writer_prefix = writer.getPrefix(nameSpaceName);
if (nameSpaceName != null) {
- if (writer_prefix!=null){
+ if (writer_prefix != null) {
writer.writeStartElement(nameSpaceName, reader.getLocalName());
- }else{
- if (prefix!=null){
- writer.writeStartElement(prefix, reader.getLocalName(),nameSpaceName);
- writer.writeNamespace(prefix, nameSpaceName);
- writer.setPrefix(prefix,nameSpaceName);
- }else{
- writer.writeStartElement(nameSpaceName,reader.getLocalName());
- writer.writeDefaultNamespace(nameSpaceName);
- writer.setDefaultNamespace(nameSpaceName);
- }
+ } else {
+ if (prefix != null) {
+ writer.writeStartElement(prefix, reader.getLocalName(), nameSpaceName);
+ writer.writeNamespace(prefix, nameSpaceName);
+ writer.setPrefix(prefix, nameSpaceName);
+ } else {
+ writer.writeStartElement(nameSpaceName, reader.getLocalName());
+ writer.writeDefaultNamespace(nameSpaceName);
+ writer.setDefaultNamespace(nameSpaceName);
+ }
}
} else {
throw new OMException("Non namespace qualified elements are not allowed");
@@ -166,9 +167,9 @@
private void serializeNamespace(String prefix, String URI, XMLStreamWriter writer) throws XMLStreamException {
String prefix1 = writer.getPrefix(URI);
- if (prefix1==null) {
+ if (prefix1 == null) {
writer.writeNamespace(prefix, URI);
- writer.setPrefix(prefix,URI);
+ writer.setPrefix(prefix, URI);
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenIterator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenIterator.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenIterator.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenIterator.java Mon Feb 14 22:22:34 2005
@@ -1,9 +1,9 @@
package org.apache.axis.om.impl.llom.traverse;
-import java.util.Iterator;
-
import org.apache.axis.om.OMException;
import org.apache.axis.om.OMNode;
+
+import java.util.Iterator;
/**
* Copyright 2001-2004 The Apache Software Foundation.
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenQNameIterator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenQNameIterator.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenQNameIterator.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenQNameIterator.java Mon Feb 14 22:22:34 2005
@@ -1,9 +1,9 @@
package org.apache.axis.om.impl.llom.traverse;
-import javax.xml.namespace.QName;
-
import org.apache.axis.om.OMNode;
import org.apache.axis.om.impl.llom.OMNamedNodeImpl;
+
+import javax.xml.namespace.QName;
/**
* Copyright 2001-2004 The Apache Software Foundation.
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/traverse/OMChildrenWithSpecificAttributeIterator.java Mon Feb 14 22:22:34 2005
@@ -1,11 +1,11 @@
package org.apache.axis.om.impl.llom.traverse;
-import javax.xml.namespace.QName;
-
import org.apache.axis.om.OMAttribute;
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMNode;
+import javax.xml.namespace.QName;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -48,9 +48,9 @@
if (attr != null && attr.getValue().equalsIgnoreCase(attributeValue)) {
isMatchingNodeFound = true;
needToMoveForward = false;
- }else{
+ } else {
currentChild = currentChild.getNextSibling();
- needToMoveForward = !(currentChild == null);
+ needToMoveForward = !(currentChild == null);
}
} else {
// get the next named node
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseHolder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseHolder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseHolder.java Mon Feb 14 22:22:34 2005
@@ -1,8 +1,5 @@
package org.apache.axis.phaseresolver;
-import java.util.ArrayList;
-import java.util.Vector;
-
import org.apache.axis.deployment.DeploymentConstants;
import org.apache.axis.description.AxisGlobal;
import org.apache.axis.description.AxisService;
@@ -15,6 +12,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import java.util.ArrayList;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -48,7 +47,7 @@
private AxisService service;
- public PhaseHolder(EngineRegistry registry,AxisService serviceIN) {
+ public PhaseHolder(EngineRegistry registry, AxisService serviceIN) {
this.registry = registry;
this.service = serviceIN;
}
@@ -64,11 +63,11 @@
return false;
}
- private boolean isPhaseExistinER(String phaseName){
+ private boolean isPhaseExistinER(String phaseName) {
ArrayList pahselist = registry.getPhases();
for (int i = 0; i < pahselist.size(); i++) {
String pahse = (String) pahselist.get(i);
- if(pahse.equals(phaseName)){
+ if (pahse.equals(phaseName)) {
return true;
}
}
@@ -86,7 +85,7 @@
addPhase(newpPhase);
newpPhase.addHandler(handler);
} else {
- throw new PhaseException("Invalid Phase ," + phaseName + "for the handler " + handler.getName() + " dose not exit in server.xml");
+ throw new PhaseException("Invalid Phase ," + phaseName + "for the handler " + handler.getName() + " dose not exit in server.xml");
}
}
@@ -107,7 +106,7 @@
return null;
}
- private void OrderdPhases() {
+ private void OrderdPhases() {
//todo complet this using phaseordeer
PhaseMetaData[] phase = new PhaseMetaData[phaseholder.size()];
for (int i = 0; i < phaseholder.size(); i++) {
@@ -148,208 +147,219 @@
/**
* cahinType
- * 1 : inFlowExcChain
- * 2 : OutFlowExeChain
- * 3 : FaultFlowExcechain
+ * 1 : inFlowExcChain
+ * 2 : OutFlowExeChain
+ * 3 : FaultFlowExcechain
+ *
* @param chainType
* @throws org.apache.axis.phaseresolver.PhaseException
+ *
*/
- public void getOrderdHandlers(int chainType) throws PhaseException {
+ public void getOrderdHandlers(int chainType) throws PhaseException {
try {
OrderdPhases();
- // Vector tempHander = new Vector();
+ // Vector tempHander = new Vector();
HandlerMetaData[] handlers;
switch (chainType) {
- case 1 : {
- ArrayList inChain = new ArrayList();// service.getExecutableInChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- axisPhase.addHandler(handlers[j].getHandler());
+ case 1:
+ {
+ ArrayList inChain = new ArrayList();// service.getExecutableInChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ axisPhase.addHandler(handlers[j].getHandler());
+ }
+ inChain.add(axisPhase);
}
- inChain.add(axisPhase);
+ service.setPhases(inChain, EngineRegistry.INFLOW);
+ break;
}
- service.setPhases(inChain,EngineRegistry.INFLOW);
- break;
- }
- case 2 : {
- ArrayList outChain =new ArrayList();// service.getExecutableOutChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- axisPhase.addHandler(handlers[j].getHandler());
+ case 2:
+ {
+ ArrayList outChain = new ArrayList();// service.getExecutableOutChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ axisPhase.addHandler(handlers[j].getHandler());
+ }
+ outChain.add(axisPhase);
}
- outChain.add(axisPhase);
+ service.setPhases(outChain, EngineRegistry.OUTFLOW);
+ break;
}
- service.setPhases(outChain,EngineRegistry.OUTFLOW);
- break;
- }
- case 3 : {
- ArrayList faultChain = new ArrayList();//service.getExecutableFaultChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- axisPhase.addHandler(handlers[j].getHandler());
+ case 3:
+ {
+ ArrayList faultChain = new ArrayList();//service.getExecutableFaultChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ axisPhase.addHandler(handlers[j].getHandler());
+ }
+ faultChain.add(axisPhase);
}
- faultChain.add(axisPhase);
+ service.setPhases(faultChain, EngineRegistry.FAULTFLOW);
+ break;
}
- service.setPhases(faultChain,EngineRegistry.FAULTFLOW);
- break;
- }
}
} catch (AxisFault e) {
throw new PhaseException(e);
- }
+ }
}
- public void buildTransportChain(AxisTransport trnsport , int chainType) throws PhaseException {
- try{
+ public void buildTransportChain(AxisTransport trnsport, int chainType) throws PhaseException {
+ try {
OrderdPhases();
- // Vector tempHander = new Vector();
+ // Vector tempHander = new Vector();
HandlerMetaData[] handlers;
Class handlerClass = null;
Handler handler;
switch (chainType) {
- case 1 : {
- ArrayList inChain = new ArrayList();// service.getExecutableInChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try{
- handlerClass = Class.forName(handlers[j].getClassName(), true, Thread.currentThread().getContextClassLoader());//getHandlerClass(handlermd.getClassName(), loader1);
- handler = (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- }catch (ClassNotFoundException e){
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
+ case 1:
+ {
+ ArrayList inChain = new ArrayList();// service.getExecutableInChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ try {
+ handlerClass = Class.forName(handlers[j].getClassName(), true, Thread.currentThread().getContextClassLoader());//getHandlerClass(handlermd.getClassName(), loader1);
+ handler = (Handler) handlerClass.newInstance();
+ handler.init(handlers[j]);
+ handlers[j].setHandler(handler);
+ axisPhase.addHandler(handlers[j].getHandler());
+ } catch (ClassNotFoundException e) {
+ throw new PhaseException(e);
+ } catch (IllegalAccessException e) {
+ throw new PhaseException(e);
+ } catch (InstantiationException e) {
+ throw new PhaseException(e);
+ }
}
+ inChain.add(axisPhase);
}
- inChain.add(axisPhase);
+ trnsport.setPhases(inChain, EngineRegistry.INFLOW);
+ break;
}
- trnsport.setPhases(inChain,EngineRegistry.INFLOW);
- break;
- }
- case 2 : {
- ArrayList outChain =new ArrayList();// service.getExecutableOutChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try{
- handlerClass = Class.forName(handlers[j].getClassName(), true, Thread.currentThread().getContextClassLoader());//getHandlerClass(handlermd.getClassName(), loader1);
- handler = (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- }catch (ClassNotFoundException e){
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
+ case 2:
+ {
+ ArrayList outChain = new ArrayList();// service.getExecutableOutChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ try {
+ handlerClass = Class.forName(handlers[j].getClassName(), true, Thread.currentThread().getContextClassLoader());//getHandlerClass(handlermd.getClassName(), loader1);
+ handler = (Handler) handlerClass.newInstance();
+ handler.init(handlers[j]);
+ handlers[j].setHandler(handler);
+ axisPhase.addHandler(handlers[j].getHandler());
+ } catch (ClassNotFoundException e) {
+ throw new PhaseException(e);
+ } catch (IllegalAccessException e) {
+ throw new PhaseException(e);
+ } catch (InstantiationException e) {
+ throw new PhaseException(e);
+ }
}
+ outChain.add(axisPhase);
}
- outChain.add(axisPhase);
+ trnsport.setPhases(outChain, EngineRegistry.OUTFLOW);
+ break;
}
- trnsport.setPhases(outChain,EngineRegistry.OUTFLOW);
- break;
- }
- case 3 : {
- ArrayList faultChain = new ArrayList();//service.getExecutableFaultChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- try{
- handlerClass = Class.forName(handlers[j].getClassName(), true, Thread.currentThread().getContextClassLoader());//getHandlerClass(handlermd.getClassName(), loader1);
- handler = (Handler) handlerClass.newInstance();
- handler.init(handlers[j]);
- handlers[j].setHandler(handler);
- axisPhase.addHandler(handlers[j].getHandler());
- }catch (ClassNotFoundException e){
- throw new PhaseException(e);
- } catch (IllegalAccessException e) {
- throw new PhaseException(e);
- } catch (InstantiationException e) {
- throw new PhaseException(e);
+ case 3:
+ {
+ ArrayList faultChain = new ArrayList();//service.getExecutableFaultChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ try {
+ handlerClass = Class.forName(handlers[j].getClassName(), true, Thread.currentThread().getContextClassLoader());//getHandlerClass(handlermd.getClassName(), loader1);
+ handler = (Handler) handlerClass.newInstance();
+ handler.init(handlers[j]);
+ handlers[j].setHandler(handler);
+ axisPhase.addHandler(handlers[j].getHandler());
+ } catch (ClassNotFoundException e) {
+ throw new PhaseException(e);
+ } catch (IllegalAccessException e) {
+ throw new PhaseException(e);
+ } catch (InstantiationException e) {
+ throw new PhaseException(e);
+ }
}
+ faultChain.add(axisPhase);
}
- faultChain.add(axisPhase);
+ trnsport.setPhases(faultChain, EngineRegistry.FAULTFLOW);
+ break;
}
- trnsport.setPhases(faultChain,EngineRegistry.FAULTFLOW);
- break;
- }
}
- } catch (AxisFault e) {
+ } catch (AxisFault e) {
throw new PhaseException(e);
}
}
- public void buildGoblalChain(AxisGlobal axisGlobal, int chainType) throws PhaseException {
+ public void buildGoblalChain(AxisGlobal axisGlobal, int chainType) throws PhaseException {
try {
OrderdPhases();
- // Vector tempHander = new Vector();
+ // Vector tempHander = new Vector();
HandlerMetaData[] handlers;
switch (chainType) {
- case 1 : {
- ArrayList inChain = new ArrayList();// service.getExecutableInChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- axisPhase.addHandler(handlers[j].getHandler());
+ case 1:
+ {
+ ArrayList inChain = new ArrayList();// service.getExecutableInChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ axisPhase.addHandler(handlers[j].getHandler());
+ }
+ inChain.add(axisPhase);
}
- inChain.add(axisPhase);
+ axisGlobal.setPhases(inChain, EngineRegistry.INFLOW);
+ break;
}
- axisGlobal.setPhases(inChain,EngineRegistry.INFLOW);
- break;
- }
- case 2 : {
- ArrayList outChain =new ArrayList();// service.getExecutableOutChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- axisPhase.addHandler(handlers[j].getHandler());
+ case 2:
+ {
+ ArrayList outChain = new ArrayList();// service.getExecutableOutChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ axisPhase.addHandler(handlers[j].getHandler());
+ }
+ outChain.add(axisPhase);
}
- outChain.add(axisPhase);
+ axisGlobal.setPhases(outChain, EngineRegistry.OUTFLOW);
+ break;
}
- axisGlobal.setPhases(outChain,EngineRegistry.OUTFLOW);
- break;
- }
- case 3 : {
- ArrayList faultChain = new ArrayList();//service.getExecutableFaultChain();
- for (int i = 0; i < phaseholder.size(); i++) {
- PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
- Phase axisPhase = new Phase(phase.getName());
- handlers = phase.getOrderedHandlers();
- for (int j = 0; j < handlers.length; j++) {
- axisPhase.addHandler(handlers[j].getHandler());
+ case 3:
+ {
+ ArrayList faultChain = new ArrayList();//service.getExecutableFaultChain();
+ for (int i = 0; i < phaseholder.size(); i++) {
+ PhaseMetaData phase = (PhaseMetaData) phaseholder.get(i);
+ Phase axisPhase = new Phase(phase.getName());
+ handlers = phase.getOrderedHandlers();
+ for (int j = 0; j < handlers.length; j++) {
+ axisPhase.addHandler(handlers[j].getHandler());
+ }
+ faultChain.add(axisPhase);
}
- faultChain.add(axisPhase);
+ axisGlobal.setPhases(faultChain, EngineRegistry.FAULTFLOW);
+ break;
}
- axisGlobal.setPhases(faultChain,EngineRegistry.FAULTFLOW);
- break;
- }
}
} catch (AxisFault e) {
throw new PhaseException(e);
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseMetaData.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseMetaData.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseMetaData.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/phaseresolver/PhaseMetaData.java Mon Feb 14 22:22:34 2005
@@ -1,11 +1,10 @@
package org.apache.axis.phaseresolver;
+import org.apache.axis.description.HandlerMetaData;
import java.util.ArrayList;
-import org.apache.axis.description.HandlerMetaData;
-
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -128,7 +127,7 @@
}
*/
- phaseHandlers.add(handler);
+ phaseHandlers.add(handler);
}