Author: veithen
Date: Sun Mar 11 22:34:10 2012
New Revision: 1299471

URL: http://svn.apache.org/viewvc?rev=1299471&view=rev
Log:
Made DOMSOAPFactory abstract (instead of using methods that throw 
UnsupportedOperationException and that are overridden in subclasses).

Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java?rev=1299471&r1=1299470&r2=1299471&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
 Sun Mar 11 22:34:10 2012
@@ -41,13 +41,12 @@ import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.soap.SOAPMessage;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.SOAPVersion;
 import org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl;
 import org.apache.axiom.soap.impl.dom.SOAPMessageImpl;
 import org.apache.axiom.soap.impl.dom.soap11.SOAP11FaultDetailImpl;
 import org.apache.axiom.soap.impl.dom.soap12.SOAP12FaultImpl;
 
-public class DOMSOAPFactory extends OMDOMFactory implements SOAPFactory {
+public abstract class DOMSOAPFactory extends OMDOMFactory implements 
SOAPFactory {
     public DOMSOAPFactory(OMDOMMetaFactory metaFactory) {
         super(metaFactory);
     }
@@ -59,14 +58,6 @@ public class DOMSOAPFactory extends OMDO
         super(doc);
     }
 
-    public String getSoapVersionURI() {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPVersion getSOAPVersion() {
-        throw new UnsupportedOperationException();
-    }
-
     public SOAPMessage createSOAPMessage(OMXMLParserWrapper builder) {
         SOAPMessageImpl messageImpl = new SOAPMessageImpl(builder, this);
         this.document = messageImpl;
@@ -83,145 +74,10 @@ public class DOMSOAPFactory extends OMDO
         return new SOAPEnvelopeImpl((DocumentImpl) this.createOMDocument(), 
builder, this);
     }
 
-    public SOAPEnvelope createSOAPEnvelope() throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-    
-    public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace 
ns,
-                                                 SOAPHeader parent) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace 
ns,
-                                                 SOAPHeader parent, 
OMXMLParserWrapper builder)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
     public SOAPFault createSOAPFault(SOAPBody parent) throws 
SOAPProcessingException {
         return new SOAP12FaultImpl(parent, this);
     }
 
-    public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper 
builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper 
builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent,
-                                               OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent,
-                                                   OMXMLParserWrapper builder) 
{
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent,
-                                                   OMXMLParserWrapper builder) 
{
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws 
SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, 
OMXMLParserWrapper builder) {
-        throw new UnsupportedOperationException();
-    }
-
-    public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
-        throw new UnsupportedOperationException();
-    }
-
     public SOAPEnvelope getDefaultFaultEnvelope() throws 
SOAPProcessingException {
         SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
         SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());
@@ -247,15 +103,6 @@ public class DOMSOAPFactory extends OMDO
         throw new UnsupportedOperationException("TODO");
     }
 
-    public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace 
ns)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException("TODO");
-    }
-
-    public SOAPFault createSOAPFault() throws SOAPProcessingException {
-        return null;
-    }
-
     public SOAPBody createSOAPBody() throws SOAPProcessingException {
         throw new UnsupportedOperationException("TODO");
     }

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java?rev=1299471&r1=1299470&r2=1299471&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java
 Sun Mar 11 22:34:10 2012
@@ -26,13 +26,11 @@ import org.apache.axiom.om.util.StAXUtil
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
-import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
 import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory;
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
-import java.io.InputStream;
 import java.io.OutputStream;
 
 public abstract class OMDOMTestCase extends AbstractTestCase {
@@ -63,13 +61,6 @@ public abstract class OMDOMTestCase exte
         return builder;
     }
 
-
-    protected StAXSOAPModelBuilder getOMBuilder(InputStream in) throws 
Exception {
-        XMLStreamReader parser = StAXUtils.createXMLStreamReader(in);
-        builder = new StAXSOAPModelBuilder(parser, new DOMSOAPFactory(), null);
-        return builder;
-    }
-
     protected XMLStreamWriter getStAXStreamWriter(OutputStream out) throws 
XMLStreamException {
         return StAXUtils.createXMLStreamWriter(out);
     }


Reply via email to