axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r330032 [1/3] - in /webservices/axis2/trunk/java/modules/saaj: src/org/apache/axis2/om/impl/dom/ src/org/apache/axis2/soap/impl/dom/ test-resources/soap/ test-resources/soap/soap11/ test/org/apache/axis2/om/impl/dom/
Date Tue, 01 Nov 2005 11:48:33 GMT
Author: ruchithf
Date: Tue Nov  1 03:47:57 2005
New Revision: 330032

URL: http://svn.apache.org/viewcvs?rev=330032&view=rev
Log:
Porting OM tests to OM-DOM

Added:
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/OMElementTest.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/emtyBodymessage.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/invalidMustUnderstandSOAP12.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/minimalMessage.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/reallyReallyBigMessage.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/sample1.txt
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/sample1.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/security2-soap.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soap11/
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soap11/soap11fault.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soap11/soap11message.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soap12message.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soapmessage.txt
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soapmessage.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/soapmessage1.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/whitespacedMessage.xml
    webservices/axis2/trunk/java/modules/saaj/test-resources/soap/wrongEnvelopeNamespace.xml
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/om/impl/dom/AbstractTestCase.java
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/om/impl/dom/MessagesTest.java
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/om/impl/dom/OMDOMTestCase.java
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/om/impl/dom/OMTestUtils.java
Modified:
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/DocumentImpl.java
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/SOAPMessageImpl.java

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/DocumentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/DocumentImpl.java?rev=330032&r1=330031&r2=330032&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/DocumentImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/DocumentImpl.java
Tue Nov  1 03:47:57 2005
@@ -51,6 +51,10 @@
 	
     protected Hashtable identifiers;
     
+    private String xmlVersion;
+    
+    private String charEncoding;
+    
 	/**
 	 * @param ownerDocument
 	 */
@@ -233,13 +237,11 @@
 	///OMDocument Methods
 	///
 	public String getCharsetEncoding() {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
+		return this.charEncoding;
 	}
 
 	public String getXMLVersion() {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
+		return this.xmlVersion;
 	}
 
 	public String isStandalone() {
@@ -258,13 +260,11 @@
 	}
 
 	public void setCharsetEncoding(String charsetEncoding) {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
+		this.charEncoding = charsetEncoding;
 	}
 
 	public void setOMDocumentElement(OMElement rootElement) {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
+		this.firstChild = (ElementImpl)rootElement;
 	}
 
 	public void setStandalone(String isStandalone) {
@@ -273,8 +273,7 @@
 	}
 
 	public void setXMLVersion(String version) {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
+		this.xmlVersion = version;
 	}
 	
 	/**

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java?rev=330032&r1=330031&r2=330032&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
Tue Nov  1 03:47:57 2005
@@ -74,6 +74,7 @@
 		super(ownerDocument);
 		this.localName = tagName;
 		this.namespace = ns;
+		this.declareNamespace(ns);
 	}
 	
 	public ElementImpl(DocumentImpl ownerDocument, String tagName, NamespaceImpl ns, OMXMLParserWrapper
builder) {
@@ -81,6 +82,7 @@
 		this.localName = tagName;
 		this.namespace = ns;
 		this.builder = builder;
+		this.declareNamespace(ns);
 	}
 	
 	public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns) {
@@ -89,9 +91,24 @@
 	}
 	
 	public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns, OMXMLParserWrapper
builder) {
-		this((DocumentImpl)parentNode.getOwnerDocument(), tagName, ns,builder);
-		this.parentNode.addChild(this);
+		this(tagName,ns,builder);
+		if(this.parentNode != null) {
+			this.ownerNode = (DocumentImpl)parentNode.getOwnerDocument();
+			this.isOwned(true);
+			this.parentNode.addChild(this);
+		}
+		
 	}
+	
+	public ElementImpl(String tagName, NamespaceImpl ns, OMXMLParserWrapper builder) {
+		this.localName = tagName;
+		this.namespace = ns;
+		this.builder = builder;
+		if(ns != null) {
+			this.declareNamespace(ns);
+		}
+	}
+	
 	
 	///
 	///org.w3c.dom.Node methods

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/SOAPMessageImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/SOAPMessageImpl.java?rev=330032&r1=330031&r2=330032&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/SOAPMessageImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/SOAPMessageImpl.java
Tue Nov  1 03:47:57 2005
@@ -38,7 +38,8 @@
     }
 
     public SOAPMessageImpl(OMXMLParserWrapper parserWrapper) {
-        super(parserWrapper);
+        super();
+        this.builder = parserWrapper;
     }
 
 

Added: webservices/axis2/trunk/java/modules/saaj/test-resources/soap/OMElementTest.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/test-resources/soap/OMElementTest.xml?rev=330032&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test-resources/soap/OMElementTest.xml (added)
+++ webservices/axis2/trunk/java/modules/saaj/test-resources/soap/OMElementTest.xml Tue Nov
 1 03:47:57 2005
@@ -0,0 +1,22 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+    <soapenv:Header>
+        <wsa:MessageID soapenv:mustUnderstand="0">
+            uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5</wsa:MessageID>
+        <wsa:To soapenv:mustUnderstand="0">
+            http://localhost:8081/axis/services/BankPort</wsa:To>
+        <wsa:From soapenv:mustUnderstand="0">
+            <Address xmlns="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+                http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
+            </Address>
+        </wsa:From>
+    </soapenv:Header>
+    <soapenv:Body>
+        <axis2:echoVoid xmlns:axis2="http://ws.apache.org/axis2">This is some text
+            <axis2:input>2</axis2:input>
+            Some Other Text
+        </axis2:echoVoid>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/saaj/test-resources/soap/emtyBodymessage.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/test-resources/soap/emtyBodymessage.xml?rev=330032&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test-resources/soap/emtyBodymessage.xml (added)
+++ webservices/axis2/trunk/java/modules/saaj/test-resources/soap/emtyBodymessage.xml Tue
Nov  1 03:47:57 2005
@@ -0,0 +1,18 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+    <soapenv:Header>
+        <wsa:MessageID soapenv:mustUnderstand="0">
+            uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5</wsa:MessageID>
+        <wsa:To soapenv:mustUnderstand="0">
+            http://localhost:8081/axis/services/BankPort</wsa:To>
+        <wsa:From soapenv:mustUnderstand="0">
+            <Address xmlns="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+                http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
+            </Address>
+        </wsa:From>
+    </soapenv:Header>
+    <soapenv:Body>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/saaj/test-resources/soap/invalidMustUnderstandSOAP12.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/test-resources/soap/invalidMustUnderstandSOAP12.xml?rev=330032&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test-resources/soap/invalidMustUnderstandSOAP12.xml
(added)
+++ webservices/axis2/trunk/java/modules/saaj/test-resources/soap/invalidMustUnderstandSOAP12.xml
Tue Nov  1 03:47:57 2005
@@ -0,0 +1,13 @@
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xml="http://www.w3.org/XML/1998/namespace">
+    <env:Header>
+        <test2:echoOk2 xmlns:test2="http://example2.org/ts-tests"
+            env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
+            env:mustUnderstand="someOtherValue"
+            env:anyAttribute="any value">
+            foo
+        </test2:echoOk2>
+    </env:Header>
+    <env:Body>
+
+    </env:Body>
+</env:Envelope>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/saaj/test-resources/soap/minimalMessage.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/test-resources/soap/minimalMessage.xml?rev=330032&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test-resources/soap/minimalMessage.xml (added)
+++ webservices/axis2/trunk/java/modules/saaj/test-resources/soap/minimalMessage.xml Tue Nov
 1 03:47:57 2005
@@ -0,0 +1,4 @@
+<?xml version='1.0' ?>
+<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
+    <env:Body/>
+</env:Envelope>
\ No newline at end of file



Mime
View raw message