ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r156232 - webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java
Date Sat, 05 Mar 2005 06:54:29 GMT
Author: ajith
Date: Fri Mar  4 22:54:27 2005
New Revision: 156232

URL: http://svn.apache.org/viewcvs?view=rev&rev=156232
Log:
Added a new test case to check the namespace problem. However the test seems to pass ????

Added:
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java

Added: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java?view=auto&rev=156232
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java
(added)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java
Fri Mar  4 22:54:27 2005
@@ -0,0 +1,68 @@
+package org.apache.axis.om.impl.serializer;
+
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileOutputStream;
+import java.io.InputStreamReader;
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * 
+ */
+public class NoNamespaceSerializerTest extends TestCase{
+
+    private String xmlText = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+
+            "<soapenv:Body>\n" +
+            "   <ns1:getBalance xmlns:ns1=\"http://localhost:8081/axis/services/BankPort/\">\n"
+
+            "      <accountNo href=\"#id0\"/>\n" +
+            "   </ns1:getBalance>\n" +
+            " </soapenv:Body></soapenv:Envelope>";
+
+    private XMLStreamReader reader;
+    private XMLStreamWriter writer;
+    private OMXMLParserWrapper builder;
+   // private File tempFile;
+
+
+    protected void setUp() throws Exception {
+        reader = XMLInputFactory.newInstance().
+                createXMLStreamReader(new InputStreamReader(new ByteArrayInputStream(xmlText.getBytes())));
+        writer = XMLOutputFactory.newInstance().
+                createXMLStreamWriter(System.out);
+        builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(),
reader);
+    }
+
+    public void testSerilization() throws Exception{
+       SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
+       env.serialize(writer,false);
+       writer.flush();
+    }
+
+
+}



Mime
View raw message