axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: svn commit: r523707 - in /webservices/axis2/trunk/java/modules/saaj: src/org/apache/axis2/saaj/SOAPPartImpl.java test/org/apache/axis2/saaj/AttachmentTest.java test/org/apache/axis2/saaj/SOAPFactoryTest.java
Date Fri, 30 Mar 2007 04:45:59 GMT
Hi Dims;

Dont we need to update 1.2 branch as well ?

Thanks
Deepal


dims@apache.org wrote:

>Author: dims
>Date: Thu Mar 29 06:43:51 2007
>New Revision: 523707
>
>URL: http://svn.apache.org/viewvc?view=rev&rev=523707
>Log:
>part of fix for   AXIS2-2417 -   unimplemented code in kernel module saaj SOAPPartImpl
>
>Modified:
>    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
>    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
>    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/SOAPFactoryTest.java
>
>Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
>URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java?view=diff&rev=523707&r1=523706&r2=523707
>==============================================================================
>--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
(original)
>+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
Thu Mar 29 06:43:51 2007
>@@ -37,27 +37,22 @@
> import javax.xml.transform.TransformerFactory;
> import javax.xml.transform.TransformerFactoryConfigurationError;
> import javax.xml.transform.dom.DOMSource;
>-import javax.xml.transform.dom.DOMResult;
> import javax.xml.transform.stream.StreamResult;
> import javax.xml.transform.stream.StreamSource;
> 
> import org.apache.axiom.attachments.Attachments;
>-import org.apache.axiom.attachments.utils.IOUtils;
>-import org.apache.axiom.om.util.StAXUtils;
> import org.apache.axiom.om.impl.MTOMConstants;
>-import org.apache.axiom.om.impl.dom.factory.OMDOMFactory;
>-import org.apache.axiom.om.impl.builder.StAXBuilder;
>-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>+import org.apache.axiom.om.util.StAXUtils;
> import org.apache.axiom.soap.SOAP11Constants;
> import org.apache.axiom.soap.SOAP12Constants;
> import org.apache.axiom.soap.SOAPFactory;
>-import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
> import org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder;
>+import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
> import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory;
> import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory;
>+import org.apache.axis2.builder.BuilderUtil;
> import org.apache.axis2.saaj.util.IDGenerator;
> import org.apache.axis2.transport.http.HTTPConstants;
>-import org.apache.axis2.builder.BuilderUtil;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.w3c.dom.Attr;
>@@ -866,74 +861,60 @@
>     }
> 
>     public String getInputEncoding() {
>-        // TODO - Fixme.
>     	//return ((DeferredDocumentImpl)(((DOMSource)this.source).getNode())).getInputEncoding();
>     	return this.envelope.getEncodingStyle();
>     }
> 
>     public String getXmlEncoding() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getXmlEncoding();
>     }
> 
>     public boolean getXmlStandalone() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getXmlStandalone();
>     }
> 
>     public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    	document.setXmlStandalone(xmlStandalone);
>     }
> 
>     public String getXmlVersion() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getXmlVersion();
>     }
> 
>     public void setXmlVersion(String xmlVersion) throws DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        document.setXmlVersion(xmlVersion);
>     }
> 
>     public boolean getStrictErrorChecking() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getStrictErrorChecking();
>     }
> 
>     public void setStrictErrorChecking(boolean strictErrorChecking) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        document.setStrictErrorChecking(strictErrorChecking);
>     }
> 
>     public String getDocumentURI() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getDocumentURI();
>     }
> 
>     public void setDocumentURI(String documentURI) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        document.setDocumentURI(documentURI);
>     }
> 
>     public Node adoptNode(Node source) throws DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    	return document.adoptNode(source);
>     }
> 
>     public DOMConfiguration getDomConfig() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getDomConfig();
>     }
> 
>     public void normalizeDocument() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        document.normalizeDocument();
>     }
> 
>     public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws
DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.renameNode(n, namespaceURI, qualifiedName);
>     }
> 
>     /**
>@@ -1339,63 +1320,51 @@
>      */
> 
>     public String getBaseURI() {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getBaseURI();
>     }
> 
>-    public short compareDocumentPosition(Node arg0) throws DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public short compareDocumentPosition(Node node) throws DOMException {
>+        return document.compareDocumentPosition(node);
>     }
> 
>     public String getTextContent() throws DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+        return document.getTextContent();
>     }
> 
>-    public void setTextContent(String arg0) throws DOMException {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public void setTextContent(String textContent) throws DOMException {
>+        document.setTextContent(textContent);
>     }
> 
>-    public boolean isSameNode(Node arg0) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public boolean isSameNode(Node other) {
>+        return document.isSameNode(other);
>     }
> 
>-    public String lookupPrefix(String arg0) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public String lookupPrefix(String namespaceURI) {
>+        return document.lookupPrefix(namespaceURI);
>     }
> 
>-    public boolean isDefaultNamespace(String arg0) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public boolean isDefaultNamespace(String namespaceURI) {
>+        return document.isDefaultNamespace(namespaceURI);
>     }
> 
>-    public String lookupNamespaceURI(String arg0) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public String lookupNamespaceURI(String prefix) {
>+        return document.lookupNamespaceURI(prefix);
>     }
> 
>-    public boolean isEqualNode(Node arg0) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public boolean isEqualNode(Node node) {
>+        return document.isEqualNode(node);
>     }
> 
>-    public Object getFeature(String arg0, String arg1) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public Object getFeature(String feature, String version) {
>+    	return document.getFeature(feature, version);
>     }
> 
>-    public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public Object setUserData(String key, Object data, UserDataHandler handler) {
>+    	return document.setUserData(key, data, handler);
>     }
> 
>-    public Object getUserData(String arg0) {
>-        // TODO - Fixme.
>-        throw new UnsupportedOperationException("TODO");
>+    public Object getUserData(String key) {
>+        return document.getUserData(key);
>     }
> 
>     public String getValue() {
>
>Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
>URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java?view=diff&rev=523707&r1=523706&r2=523707
>==============================================================================
>--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
(original)
>+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
Thu Mar 29 06:43:51 2007
>@@ -344,7 +344,7 @@
> 	private boolean isNetworkedResourceAvailable(String url){
> 		HttpClient client = new HttpClient();
> 		GetMethod method = new GetMethod(url);
>-
>+        client.getHttpConnectionManager().getParams().setConnectionTimeout(3000);		
> 	        client.getHttpConnectionManager().getParams().setConnectionTimeout(3000);		
> 		method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
> 				new DefaultHttpMethodRetryHandler(1, false));
>
>Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/SOAPFactoryTest.java
>URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/SOAPFactoryTest.java?view=diff&rev=523707&r1=523706&r2=523707
>==============================================================================
>--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/SOAPFactoryTest.java
(original)
>+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/SOAPFactoryTest.java
Thu Mar 29 06:43:51 2007
>@@ -29,13 +29,17 @@
> 
> import junit.framework.TestCase;
> 
>+import org.apache.commons.logging.Log;
>+import org.apache.commons.logging.LogFactory;
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> 
>+
> /**
>  * 
>  */
> public class SOAPFactoryTest extends TestCase {
>+	private static final Log log = LogFactory.getLog(SOAPFactoryTest.class);
>     public void testCreateDetail() {
>         try {
>             SOAPFactory sf = SOAPFactory.newInstance();
>@@ -96,7 +100,7 @@
>     	    if(sf == null) {
>     	    	fail("could not create SOAPFactory object");
>     	    }
>-    	    System.out.println("Create a DOMElement");
>+    	    log.info("Create a DOMElement");
>     	    DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
>     	    DocumentBuilder builder = dbfactory.newDocumentBuilder();
>     	    Document document = builder.newDocument();
>@@ -172,7 +176,7 @@
>     		//Expect FaultCode="+SOAPConstants.SOAP_RECEIVER_FAULT
>     		Iterator i = sf.getFaultReasonTexts();
>     		if(i == null) {
>-    			System.out.println("Call to getFaultReasonTexts() returned null iterator");
>+    			log.info("Call to getFaultReasonTexts() returned null iterator");
>     		}
>     		String reason = "";
>     		while(i.hasNext()) {
>@@ -201,7 +205,7 @@
>     		while(i.hasNext()){
>     			reason += (String)i.next();
>     		}
>-    		System.out.println("Actual ReasonText="+reason);
>+    		log.info("Actual ReasonText="+reason);
>     		assertNotNull(reason);
>     		assertTrue(reason.indexOf("This is the fault reason.") > -1);
>     		assertTrue(fc.equals(SOAPConstants.SOAP_RECEIVER_FAULT));
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message