You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by de...@apache.org on 2007/07/05 08:25:28 UTC
svn commit: r553387 -
/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java
Author: deepal
Date: Wed Jul 4 23:25:27 2007
New Revision: 553387
URL: http://svn.apache.org/viewvc?view=rev&rev=553387
Log:
adding a test case for WSCOMMONS-213
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java
Added: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java?view=auto&rev=553387
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java Wed Jul 4 23:25:27 2007
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.axiom.soap;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.dom.AbstractTestCase;
+import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
+import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory;
+
+import javax.xml.stream.XMLInputFactory;
+import java.io.FileReader;
+
+public class CashWihBuildElementTest extends AbstractTestCase {
+
+ StAXOMBuilder stAXOMBuilder;
+ FileReader testFile;
+ private OMElement rootElement;
+
+ /**
+ * Constructor.
+ */
+ public CashWihBuildElementTest(String testName) {
+ super(testName);
+ }
+
+ protected void setUp() throws Exception {
+ testFile = new FileReader(getTestResourceFile("non_soap.xml"));
+ stAXOMBuilder =
+ OMXMLBuilderFactory.createStAXOMBuilder(
+ OMAbstractFactory.getSOAP11Factory(),
+ XMLInputFactory.newInstance().createXMLStreamReader(
+ testFile));
+ rootElement = stAXOMBuilder.getDocumentElement();
+ }
+
+ public void testWithCashAndBuild() throws Exception {
+ SOAPFactory soapFactory = new SOAP11Factory();
+ SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
+ envelope.getBody().addChild(rootElement);
+// envelope.getBody().getFirstElement().getXMLStreamReaderWithoutCaching();
+ }
+
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org