You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2006/07/11 21:33:22 UTC
svn commit: r420955 [8/8] - in /webservices/axis2/trunk/java/modules/jaxws:
./ src/javax/jws/ src/javax/xml/ws/handler/ src/org/apache/axis2/jaxws/
src/org/apache/axis2/jaxws/binding/ src/org/apache/axis2/jaxws/client/
src/org/apache/axis2/jaxws/core/ ...
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,890 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.message;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBIntrospector;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
+import org.apache.axis2.jaxws.message.factory.OMBlockFactory;
+import org.apache.axis2.jaxws.message.factory.SourceBlockFactory;
+import org.apache.axis2.jaxws.message.factory.XMLStringBlockFactory;
+import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
+
+import client.EchoString;
+import client.ObjectFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * BlockTests
+ * Tests to create and validate blocks.
+ * These are not client/server tests.
+ */
+public class BlockTests extends TestCase {
+
+ // String test variables
+ private static final String sampleText =
+ "<pre:a xmlns:pre=\"urn://sample\">" +
+ "<b>Hello</b>" +
+ "<c>World</c>" +
+ "</pre:a>";
+ private static final QName sampleQName = new QName("urn://sample", "a");
+
+
+ private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ private static XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+
+
+
+ public BlockTests() {
+ super();
+ }
+
+ public BlockTests(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<String> flow
+ * @throws Exception
+ */
+ public void testStringOutflow() throws Exception {
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<String> client
+ Block block = f.createFrom(sampleText, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and
+ * simulate a different Dispatch<String> flow
+ * @throws Exception
+ */
+ public void testStringOutflow2() throws Exception {
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<String> client
+ Block block = f.createFrom(sampleText, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + sampleQName + " but found: " + qName, sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and
+ * simulate a different String parameter flow
+ * @throws Exception
+ */
+ public void testStringOutflow3() throws Exception {
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS String parameter on the client.
+ // In this case, we know the QName prior to creating the Block...so let's pass it in.
+ Block block = f.createFrom(sampleText, null, sampleQName);
+
+ // We passed in a qname, so it should be immediately available
+ assertTrue(block.isQNameAvailable());
+
+ // Make sure the QName is correct.
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<String> input flow
+ * @throws Exception
+ */
+ public void testStringInflow() throws Exception {
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof String);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ assertTrue(sampleText.equals(bo.toString()));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * slightly more complicated Dispatch<String> inflow
+ * @throws Exception
+ */
+ public void testStringInflow2() throws Exception {
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Let's assume we need to get the QName to find the operation name.
+ // This will cause an underlying parse
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof String);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ assertTrue(sampleText.equals(bo.toString()));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * slightly more complicated String inflow
+ * @throws Exception
+ */
+ public void testStringInflow3() throws Exception {
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow. Assume that we know the QName already
+ Block block = f.createFrom(inflow, null, sampleQName);
+
+ // We passed in a qname, so the following should return false
+ assertTrue(block.isQNameAvailable());
+
+ // Let's assume we need to get the QName to find the operation name.
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof String);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ assertTrue(sampleText.equals(bo.toString()));
+
+ }
+
+ /**
+ * Create a Block representing an JAXB and simulate a
+ * normal Dispatch<JAXB> flow
+ * @throws Exception
+ */
+ public void testJAXBOutflow() throws Exception {
+ // Get the BlockFactory
+ JAXBBlockFactory f = (JAXBBlockFactory)
+ FactoryRegistry.getFactory(JAXBBlockFactory.class);
+
+ // Create a jaxb object
+ ObjectFactory factory = new ObjectFactory();
+ EchoString jaxb = factory.createEchoString();
+ jaxb.setInput("Hello World");
+ JAXBContext jbc = JAXBContext.newInstance("client");
+ JAXBIntrospector jbi = jbc.createJAXBIntrospector();
+ QName expectedQName = jbi.getElementName(jaxb);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<JAXB> client
+ Block block = f.createFrom(jaxb, jbc, null);
+
+ // JAXB objects set the qname from their internal data
+ assertTrue(block.isQNameAvailable());
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + expectedQName + " but found: " + qName, expectedQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(newText.contains("Hello World"));
+ assertTrue(newText.contains("echoString"));
+
+ }
+
+ /**
+ * Create a Block representing an JAXB and simulate a
+ * slightly more complicated Dispatch<JAXB> flow
+ * @throws Exception
+ */
+ public void testJAXBOutflow2() throws Exception {
+ // Get the BlockFactory
+ JAXBBlockFactory f = (JAXBBlockFactory)
+ FactoryRegistry.getFactory(JAXBBlockFactory.class);
+
+ // Create a jaxb object
+ ObjectFactory factory = new ObjectFactory();
+ EchoString jaxb = factory.createEchoString();
+ jaxb.setInput("Hello World");
+ JAXBContext jbc = JAXBContext.newInstance("client");
+ JAXBIntrospector jbi = jbc.createJAXBIntrospector();
+ QName expectedQName = jbi.getElementName(jaxb);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs with an outbound JAX-WS JAXB parameter
+ Block block = f.createFrom(jaxb, jbc, expectedQName);
+
+ // We did pass in a qname, so the following should return false
+ assertTrue(block.isQNameAvailable());
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + expectedQName + " but found: " + qName, expectedQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(newText.contains("Hello World"));
+ assertTrue(newText.contains("echoString"));
+
+ }
+
+ /**
+ * Create a Block representing an JAXB and simulate a
+ * normal Dispatch<JAXB> input flow
+ * @throws Exception
+ */
+ public void testJAXBInflow() throws Exception {
+ // Get the BlockFactory
+ JAXBBlockFactory f = (JAXBBlockFactory)
+ FactoryRegistry.getFactory(JAXBBlockFactory.class);
+
+ // Create a jaxb object
+ ObjectFactory factory = new ObjectFactory();
+ EchoString jaxb = factory.createEchoString();
+ jaxb.setInput("Hello World");
+ JAXBContext jbc = JAXBContext.newInstance("client");
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
+ jbc.createMarshaller().marshal(jaxb, writer);
+ writer.flush();
+ sw.flush();
+ StringReader sr = new StringReader(sw.toString());
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, jbc, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object.
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof EchoString);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check for accuracy
+ assertTrue("Unexpected:" + ((EchoString)bo).getInput(), ((EchoString)bo).getInput().equals(jaxb.getInput()));
+
+ }
+
+ /**
+ * Create a Block representing an JAXB and simulate a
+ * normal Dispatch<JAXB> input flow
+ * @throws Exception
+ */
+ public void testJAXBInflow2() throws Exception {
+ // Get the BlockFactory
+ JAXBBlockFactory f = (JAXBBlockFactory)
+ FactoryRegistry.getFactory(JAXBBlockFactory.class);
+
+ // Create a jaxb object
+ ObjectFactory factory = new ObjectFactory();
+ EchoString jaxb = factory.createEchoString();
+ jaxb.setInput("Hello World");
+ JAXBContext jbc = JAXBContext.newInstance("client");
+ JAXBIntrospector jbi = jbc.createJAXBIntrospector();
+ QName expectedQName = jbi.getElementName(jaxb);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
+ jbc.createMarshaller().marshal(jaxb, writer);
+ writer.flush();
+ sw.flush();
+ StringReader sr = new StringReader(sw.toString());
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, jbc, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + expectedQName + " but found: " + qName, expectedQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object.
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof EchoString);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check for accuracy
+ assertTrue("Unexpected:" + ((EchoString)bo).getInput(), ((EchoString)bo).getInput().equals(jaxb.getInput()));
+
+ }
+
+ /**
+ * Create a Block representing an JAXB and simulate a
+ * normal Dispatch<JAXB> input flow
+ * @throws Exception
+ */
+ public void testJAXBInflow3() throws Exception {
+ // Get the BlockFactory
+ JAXBBlockFactory f = (JAXBBlockFactory)
+ FactoryRegistry.getFactory(JAXBBlockFactory.class);
+
+ // Create a jaxb object
+ ObjectFactory factory = new ObjectFactory();
+ EchoString jaxb = factory.createEchoString();
+ jaxb.setInput("Hello World");
+ JAXBContext jbc = JAXBContext.newInstance("client");
+ JAXBIntrospector jbi = jbc.createJAXBIntrospector();
+ QName expectedQName = jbi.getElementName(jaxb);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
+ jbc.createMarshaller().marshal(jaxb, writer);
+ writer.flush();
+ sw.flush();
+ StringReader sr = new StringReader(sw.toString());
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, jbc, expectedQName);
+
+ // We passed in a qname, so the following should return false
+ assertTrue(block.isQNameAvailable());
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + expectedQName + " but found: " + qName, expectedQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object.
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof EchoString);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check for accuracy
+ assertTrue("Unexpected:" + ((EchoString)bo).getInput(), ((EchoString)bo).getInput().equals(jaxb.getInput()));
+
+ }
+
+ /**
+ * Create a Block representing an OM and simulate a
+ * normal Dispatch<OMElement> flow
+ * @throws Exception
+ */
+ public void testOMOutflow() throws Exception {
+ // Get the BlockFactory
+ OMBlockFactory f = (OMBlockFactory)
+ FactoryRegistry.getFactory(OMBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<OMElement> client
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inputReader = inputFactory.createXMLStreamReader(sr);
+ StAXOMBuilder builder = new StAXOMBuilder(inputReader);
+ OMElement om = builder.getDocumentElement();
+ Block block = f.createFrom(om, null, null);
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+
+ /**
+ * Create a Block representing an OM and simulate a
+ * different Dispatch<OMElement> flow
+ * @throws Exception
+ */
+ public void testOMOutflow2() throws Exception {
+ // Get the BlockFactory
+ OMBlockFactory f = (OMBlockFactory)
+ FactoryRegistry.getFactory(OMBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<OMElement> client
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inputReader = inputFactory.createXMLStreamReader(sr);
+ StAXOMBuilder builder = new StAXOMBuilder(inputReader);
+ OMElement om = builder.getDocumentElement();
+ Block block = f.createFrom(om, null, null);
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + sampleQName + " but found: " + qName, sampleQName.equals(qName));
+
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * Dispatch<OMElement> inflow
+ * @throws Exception
+ */
+ public void testOMInflow() throws Exception {
+ // Get the BlockFactory
+ OMBlockFactory f = (OMBlockFactory)
+ FactoryRegistry.getFactory(OMBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, null, null);
+
+ // Let's assume we need to get the QName to find the operation name.
+ // This will cause an underlying parse
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof OMElement);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ assertTrue(sampleText.equals(bo.toString()));
+
+ }
+
+ /**
+ * Create a Block representing a Source and simulate a
+ * normal Dispatch<Source> flow
+ * @throws Exception
+ */
+ public void testStreamSourceOutflow() throws Exception {
+ // Get the BlockFactory
+ SourceBlockFactory f = (SourceBlockFactory)
+ FactoryRegistry.getFactory(SourceBlockFactory.class);
+
+ StreamSource ss = new StreamSource(new StringReader(sampleText));
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<Source> client
+ Block block = f.createFrom(ss, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing a Source and
+ * simulate a different Dispatch<Source> flow
+ * @throws Exception
+ */
+ public void testStreamSourceOutflow2() throws Exception {
+ // Get the BlockFactory
+ SourceBlockFactory f = (SourceBlockFactory)
+ FactoryRegistry.getFactory(SourceBlockFactory.class);
+
+ StreamSource ss = new StreamSource(new StringReader(sampleText));
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<Source> client
+ Block block = f.createFrom(ss, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assume that we need to find the QName (perhaps to identify the operation and
+ // determine if handlers are installed). This is not very perfomant since
+ // it causes an underlying parse of the String...but we need to support this.
+ QName qName = block.getQName();
+ assertTrue("Expected: " + sampleQName + " but found: " + qName, sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing a Source and
+ * simulate a different Source parameter flow
+ * @throws Exception
+ */
+ public void testStreamSourceOutflow3() throws Exception {
+ // Get the BlockFactory
+ SourceBlockFactory f = (SourceBlockFactory)
+ FactoryRegistry.getFactory(SourceBlockFactory.class);
+
+ StreamSource ss = new StreamSource(new StringReader(sampleText));
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS String parameter on the client.
+ // In this case, we know the QName prior to creating the Block...so let's pass it in.
+ Block block = f.createFrom(ss, null, sampleQName);
+
+ // We passed in a qname, so it should be immediately available
+ assertTrue(block.isQNameAvailable());
+
+ // Make sure the QName is correct.
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ XMLStreamReader reader = block.getXMLStreamReader(true);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<Source> input flow
+ * @throws Exception
+ */
+ public void testStreamSourceInflow() throws Exception {
+ // Get the BlockFactory
+ SourceBlockFactory f = (SourceBlockFactory)
+ FactoryRegistry.getFactory(SourceBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof Source);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ XMLStreamReader reader = inputFactory.createXMLStreamReader((Source) bo);
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * slightly more complicated Dispatch<Source> inflow
+ * @throws Exception
+ */
+ public void testStreamSourceInflow2() throws Exception {
+
+ // Get the BlockFactory
+ SourceBlockFactory f = (SourceBlockFactory)
+ FactoryRegistry.getFactory(SourceBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow.
+ Block block = f.createFrom(inflow, null, null);
+
+ // We didn't pass in a qname, so the following should return false
+ assertTrue(!block.isQNameAvailable());
+
+ // Let's assume we need to get the QName to find the operation name.
+ // This will cause an underlying parse
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof Source);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ XMLStreamReader reader = inputFactory.createXMLStreamReader((Source) bo);
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+
+ /**
+ * Create a Block representing an Source and simulate a
+ * slightly more complicated Source inflow
+ * @throws Exception
+ */
+ public void testStreamSourceInflow3() throws Exception {
+
+ // Get the BlockFactory
+ SourceBlockFactory f = (SourceBlockFactory)
+ FactoryRegistry.getFactory(SourceBlockFactory.class);
+
+ // On inbound, there will already be a XMLStreamReader (probably from OM)
+ // which represents the message. We will simulate this with inflow.
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+
+ // Create a Block from the inflow. Assume that we know the QName already
+ Block block = f.createFrom(inflow, null, sampleQName);
+
+ // We passed in a qname, so the following should return false
+ assertTrue(block.isQNameAvailable());
+
+ // Let's assume we need to get the QName to find the operation name.
+ QName qName = block.getQName();
+ assertTrue(sampleQName.equals(qName));
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof Source);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ XMLStreamReader reader = inputFactory.createXMLStreamReader((Source) bo);
+ Reader2Writer r2w = new Reader2Writer(reader);
+ String newText = r2w.getAsString();
+ assertTrue(sampleText.equals(newText));
+
+ }
+}
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,242 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.message;
+
+import java.io.StringReader;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
+import org.apache.axis2.jaxws.message.factory.MessageFactory;
+import org.apache.axis2.jaxws.message.factory.XMLStringBlockFactory;
+import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
+
+/**
+ * MessageTests
+ * Tests to create and validate Message processing
+ * These are not client/server tests.
+ */
+public class MessageTests extends TestCase {
+
+ // String test variables
+ private static final String sampleText =
+ "<pre:a xmlns:pre=\"urn://sample\">" +
+ "<b>Hello</b>" +
+ "<c>World</c>" +
+ "</pre:a>";
+
+ private static final String sampleEnvelope =
+ "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
+ "<soapenv:Header /><soapenv:Body>" +
+ sampleText +
+ "</soapenv:Body></soapenv:Envelope>";
+
+ private static final QName sampleQName = new QName("urn://sample", "a");
+
+ private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+
+ public MessageTests() {
+ super();
+ }
+
+ public MessageTests(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<String> flow
+ * @throws Exception
+ */
+ public void testStringOutflow() throws Exception {
+
+ // Create a SOAP 1.1 Message
+ MessageFactory mf = (MessageFactory)
+ FactoryRegistry.getFactory(MessageFactory.class);
+ Message m = mf.create(Protocol.soap11);
+
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<String> client
+ Block block = f.createFrom(sampleText, null, null);
+
+ // Add the block to the message as normal body content.
+ m.setBodyBlock(0, block);
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is a XMLStreamReader will be requested...to go to OM. At this point the
+ // block should be consumed.
+ OMElement om = m.getAsOMElement();
+
+ // The block should not be consumed yet...because the message has not been read
+ assertTrue(!block.isConsumed());
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(om.getXMLStreamReaderWithoutCaching());
+ String newText = r2w.getAsString();
+ System.out.println(newText);
+ assertTrue(newText.contains(sampleText));
+ assertTrue(newText.contains("soap"));
+ assertTrue(newText.contains("Envelope"));
+ assertTrue(newText.contains("Body"));
+
+ // The block should be consumed at this point
+ assertTrue(block.isConsumed());
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<String> flow with an application handler
+ * @throws Exception
+ */
+ public void testStringOutflow2() throws Exception {
+
+ // Create a SOAP 1.1 Message
+ MessageFactory mf = (MessageFactory)
+ FactoryRegistry.getFactory(MessageFactory.class);
+ Message m = mf.create(Protocol.soap11);
+
+ // Get the BlockFactory
+ XMLStringBlockFactory f = (XMLStringBlockFactory)
+ FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+
+ // Create a Block using the sample string as the content. This simulates
+ // what occurs on the outbound JAX-WS dispatch<String> client
+ Block block = f.createFrom(sampleText, null, null);
+
+ // Add the block to the message as normal body content.
+ m.setBodyBlock(0, block);
+
+ // If there is a JAX-WS handler, the Message is converted into a SOAPEnvelope
+ SOAPEnvelope soapEnvelope = m.getAsSOAPEnvelope();
+
+ // Normally the handler would not touch the body...but for our scenario, assume that it does.
+ String name = soapEnvelope.getBody().getFirstChild().getLocalName();
+ assertTrue("a".equals(name));
+
+ // The block should be consumed at this point
+ assertTrue(block.isConsumed());
+
+ // After the handler processing the message is obtained as an OM
+ OMElement om = m.getAsOMElement();
+
+ // To check that the output is correct, get the String contents of the
+ // reader
+ Reader2Writer r2w = new Reader2Writer(om.getXMLStreamReaderWithoutCaching());
+ String newText = r2w.getAsString();
+ System.out.println(newText);
+ assertTrue(newText.contains(sampleText));
+ assertTrue(newText.contains("soap"));
+ assertTrue(newText.contains("Envelope"));
+ assertTrue(newText.contains("Body"));
+
+
+ }
+
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<String> input flow
+ * @throws Exception
+ */
+
+ public void testStringInflow() throws Exception {
+
+ // On inbound, there will already be an OM
+ // which represents the message. The following code simulates the input
+ // OM
+ StringReader sr = new StringReader(sampleEnvelope);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+ StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(inflow, null);
+ OMElement omElement = builder.getSOAPEnvelope();
+
+ // The JAX-WS layer creates a Message from the OM
+ MessageFactory mf = (MessageFactory)
+ FactoryRegistry.getFactory(MessageFactory.class);
+ Message m = mf.createFrom(omElement);
+
+ // Assuming no handlers are installed, the next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ XMLStringBlockFactory blockFactory =
+ (XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+ Block block = m.getBodyBlock(0, null, blockFactory);
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof String);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ assertTrue(sampleText.equals(bo.toString()));
+
+ }
+
+ /**
+ * Create a Block representing an XMLString and simulate a
+ * normal Dispatch<String> input flow with a JAX-WS Handler
+ * @throws Exception
+ */
+ public void testStringInflow2() throws Exception {
+
+ // On inbound, there will already be an OM
+ // which represents the message. The following code simulates the input
+ // OM
+ StringReader sr = new StringReader(sampleEnvelope);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+ StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(inflow, null);
+ OMElement omElement = builder.getSOAPEnvelope();
+
+ // The JAX-WS layer creates a Message from the OM
+ MessageFactory mf = (MessageFactory)
+ FactoryRegistry.getFactory(MessageFactory.class);
+ Message m = mf.createFrom(omElement);
+
+ // If there is a JAX-WS handler, the Message is converted into a SOAPEnvelope
+ SOAPEnvelope soapEnvelope = m.getAsSOAPEnvelope();
+
+ // Normally the handler would not touch the body...but for our scenario, assume that it does.
+ String name = soapEnvelope.getBody().getFirstChild().getLocalName();
+ assertTrue("a".equals(name));
+
+ // The next thing that will happen
+ // is the proxy code will ask for the business object (String).
+ XMLStringBlockFactory blockFactory =
+ (XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
+ Block block = m.getBodyBlock(0, null, blockFactory);
+ Object bo = block.getBusinessObject(true);
+ assertTrue(bo instanceof String);
+
+ // The block should be consumed
+ assertTrue(block.isConsumed());
+
+ // Check the String for accuracy
+ assertTrue(sampleText.equals(bo.toString()));
+
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.message;
+
+import java.io.StringReader;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
+import org.apache.axis2.jaxws.message.factory.SAAJConverterFactory;
+import org.apache.axis2.jaxws.message.util.SAAJConverter;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
+
+/**
+ * SAAJConverterTests
+ *
+ * Test the basic functionality of the SAAJConverter.
+ * You can also use these tests to as sample code on how to use
+ * the converter.
+ *
+ */
+public class SAAJConverterTests extends TestCase {
+
+ private static final String sampleText =
+ "<pre:a xmlns:pre=\"urn://sample\">" +
+ "<b>Hello</b>" +
+ "<c>World</c>" +
+ "</pre:a>";
+
+ private static final String sampleEnvelope =
+ "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
+ "<soapenv:Header /><soapenv:Body>" +
+ sampleText +
+ "</soapenv:Body></soapenv:Envelope>";
+
+ private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+
+ public SAAJConverterTests() {
+ super();
+ }
+
+ public SAAJConverterTests(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @testStrategy Tests conversions between SAAJ and OM SOAPEnvelopes
+ */
+ public void test1() throws Exception {
+
+ // Bootstrap: Create an OM SOAPEnvelope from the sample text
+ StringReader sr = new StringReader(sampleEnvelope);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+ StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(inflow, null);
+ org.apache.axiom.soap.SOAPEnvelope omEnvelope = builder.getSOAPEnvelope();
+
+ // Step 1: Get the SAAJConverter object from the Factory
+ SAAJConverterFactory f = (SAAJConverterFactory)
+ FactoryRegistry.getFactory(SAAJConverterFactory.class);
+ SAAJConverter converter = f.getSAAJConverter();
+
+ // Step 2: Convert the OM SOAPEnvelope to an SAAJ SOAPEnvelope
+ SOAPEnvelope saajEnvelope = converter.toSAAJ(omEnvelope);
+
+ // Step 2a: Simple assertion check to ensure correctness.
+ String name = saajEnvelope.getBody().getFirstChild().getLocalName();
+ assertTrue("a".equals(name));
+
+ // Step 3: Convert the SAAJ SOAPEnvelope to an OM SOAPEnvelope
+ omEnvelope = converter.toOM(saajEnvelope);
+
+ // Step 3a: Simple assertion check to ensure correctness
+ name = omEnvelope.getBody().getFirstElement().getLocalName();
+ assertTrue("a".equals(name));
+
+ // Step 4: Rinse and repeat
+ saajEnvelope = converter.toSAAJ(omEnvelope);
+ name = saajEnvelope.getBody().getFirstChild().getLocalName();
+ assertTrue("a".equals(name));
+ omEnvelope = converter.toOM(saajEnvelope);
+ name = omEnvelope.getBody().getFirstElement().getLocalName();
+ assertTrue("a".equals(name));
+ }
+
+ /**
+ * @testStrategy Tests conversions between SAAJ and OM for normal element
+ */
+ public void test2() throws Exception {
+
+ // Bootstrap: Create an OM SOAPEnvelope from the sample text.
+ StringReader sr = new StringReader(sampleEnvelope);
+ XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
+ StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(inflow, null);
+ org.apache.axiom.soap.SOAPEnvelope omEnvelope = builder.getSOAPEnvelope();
+
+ // Bootstrap: Get an OMElement from the body
+ OMElement om = omEnvelope.getBody().getFirstElement();
+
+ // Bootstrap: Get an SAAJ Body to hold the target SOAPElement
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage message = msgFactory.createMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ // Step 1: Get the SAAJConverter object from the Factory
+ SAAJConverterFactory f = (SAAJConverterFactory)
+ FactoryRegistry.getFactory(SAAJConverterFactory.class);
+ SAAJConverter converter = f.getSAAJConverter();
+
+ // Step 2: Convert OM to SAAJ
+ SOAPElement se = converter.toSAAJ(om, body);
+
+ // Step 2a: Verify
+ assertTrue(se instanceof SOAPBodyElement);
+ assertTrue(se.getLocalName().equals("a"));
+
+ // Step 3: Convert SAAJ to OM
+ om = converter.toOM(se);
+
+ // Step 3a: Verify
+ assertTrue(om.getLocalName().equals("a"));
+
+ // Step 4: Rinse and Repeat
+ se = converter.toSAAJ(om, body);
+ assertTrue(se instanceof SOAPBodyElement);
+ assertTrue(se.getLocalName().equals("a"));
+ om = converter.toOM(se);
+ assertTrue(om.getLocalName().equals("a"));
+ }
+}
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/XMLStreamReaderSplitterTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/XMLStreamReaderSplitterTests.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/XMLStreamReaderSplitterTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/XMLStreamReaderSplitterTests.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.message;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBIntrospector;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
+import org.apache.axis2.jaxws.message.factory.XMLStringBlockFactory;
+import org.apache.axis2.jaxws.message.util.Reader2Writer;
+import org.apache.axis2.jaxws.message.util.XMLStreamReaderSplitter;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
+
+import client.EchoString;
+import client.ObjectFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests XMLStreamReaderSplitter
+ */
+public class XMLStreamReaderSplitterTests extends TestCase {
+
+ // String test variables
+ private static final String sampleText =
+ "<body>" +
+ "spurious text" +
+ "<pre:a1 xmlns:pre=\"urn://sample\">" +
+ "<b1>Hello</b1>" +
+ "<c1>World</c1>" +
+ "</pre:a1>" +
+ "<!-- Spurious Comment -->" +
+ "<pre:a2 xmlns:pre=\"urn://sample2\">" +
+ "<b2>Hello</b2>" +
+ "<c2>World</c2>" +
+ "</pre:a2>" +
+ "</body>";
+
+
+ private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ private static XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+
+
+
+ public XMLStreamReaderSplitterTests() {
+ super();
+ }
+
+ public XMLStreamReaderSplitterTests(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test XMLStreamReaderSplitter
+ * @throws Exception
+ */
+ public void test() throws Exception {
+ // Create a full XMLStreamReader for the message
+ StringReader sr = new StringReader(sampleText);
+ XMLStreamReader fullReader = inputFactory.createXMLStreamReader(sr);
+
+ // Advance past the first element (body)
+ fullReader.next();
+ fullReader.next();
+
+ // Create a Splitter
+ XMLStreamReaderSplitter splitter = new XMLStreamReaderSplitter(fullReader);
+
+ // Pipe the splitter to the writer. This should generated only the
+ // first element tree.
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
+ Reader2Writer r2w = new Reader2Writer(splitter);
+ r2w.outputTo(writer);
+ writer.flush();
+ sw.flush();
+ String tree1 = sw.toString();
+
+ // Now get the next Stream
+ XMLStreamReader stream2 = splitter.getNextReader();
+ r2w = new Reader2Writer(stream2);
+ sw = new StringWriter();
+ writer = outputFactory.createXMLStreamWriter(sw);
+ r2w.outputTo(writer);
+ writer.flush();
+ sw.flush();
+ String tree2 = sw.toString();
+
+ // Do assertion checks
+ assertTrue(!tree1.contains("text"));
+ assertTrue(!tree1.contains("Comment"));
+ assertTrue( tree1.contains("a1"));
+ assertTrue(!tree1.contains("a2"));
+
+ assertTrue(!tree2.contains("text"));
+ assertTrue(!tree2.contains("Comment"));
+ assertTrue(!tree2.contains("a1"));
+ assertTrue( tree2.contains("a2"));
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/ProviderTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/ProviderTestCase.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/ProviderTestCase.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/ProviderTestCase.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.provider;
+
+import java.io.File;
+import javax.xml.namespace.QName;
+import junit.framework.TestCase;
+
+public abstract class ProviderTestCase extends TestCase {
+
+ public QName portName = new QName("http://ws.apache.org/axis2", "SimpleProviderServiceSOAP11port0");
+ public String providerResourceDir = "test-resources"+File.separator+"provider";
+ public String basedir = null;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ //StartServer startServer = new StartServer("server1");
+ //startServer.testStartServer();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ //StopServer stopServer = new StopServer("server1");
+ //stopServer.testStopServer();
+ }
+
+ public ProviderTestCase(String name) {
+ super(name);
+ if(basedir == null){
+ basedir = new File(".").getAbsolutePath();
+ }
+ providerResourceDir = new File(basedir, providerResourceDir).getAbsolutePath();
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.provider;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.Map;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+public class SourceProviderTests extends ProviderTestCase {
+
+ private String endpointUrl = "http://localhost:8080/axis2/services/SourceProviderService";
+ private QName serviceName = new QName("http://ws.apache.org/axis2", "SourceProviderService");
+ private String xmlDir = "xml";
+
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public SourceProviderTests(String name) {
+ super(name);
+ }
+
+ public void testProviderSource(){
+ try{
+ String resourceDir = new File(providerResourceDir, xmlDir).getAbsolutePath();
+ String fileName = resourceDir+File.separator+"web.xml";
+
+ File file = new File(fileName);
+ InputStream inputStream = new FileInputStream(file);
+ StreamSource xmlStreamSource = new StreamSource(inputStream);
+
+ Service svc = Service.create(serviceName);
+ svc.addPort(portName,null, null);
+ Dispatch<Source> dispatch = svc.createDispatch(portName, Source.class, null);
+ Map<String, Object> requestContext = dispatch.getRequestContext();
+ requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl);
+ System.out.println(">> Invoking Source Provider Dispatch");
+ Source response = dispatch.invoke(xmlStreamSource);
+
+ System.out.println(">> Response [" + response.toString() + "]");
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/StringProviderTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/StringProviderTests.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/StringProviderTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/StringProviderTests.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.provider;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+
+public class StringProviderTests extends ProviderTestCase {
+
+ String endpointUrl = "http://localhost:8080/axis2/services/StringProviderService";
+ String xmlString = "<invoke>test input</invoke>";
+ private QName serviceName = new QName("http://ws.apache.org/axis2", "StringProviderService");
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public StringProviderTests(String name) {
+ super(name);
+ }
+
+ public void testProviderString() {
+ System.out.println("---------------------------------------");
+ Service svc = Service.create(serviceName);
+ svc.addPort(portName,null, endpointUrl);
+ Dispatch<String> dispatch = svc
+ .createDispatch(portName, String.class, null);
+ Map<String, Object> requestContext = dispatch.getRequestContext();
+ requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointUrl);
+ System.out.println(">> Invoking SimpleProvider");
+ String retVal = dispatch.invoke(xmlString);
+ System.out.println(">> Response [" + retVal + "]");
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/MANIFEST.MF?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/MANIFEST.MF (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/MANIFEST.MF Tue Jul 11 12:33:12 2006
@@ -0,0 +1 @@
+Manifest-Version: 1.0
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/services.xml?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/services.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/META-INF/services.xml Tue Jul 11 12:33:12 2006
@@ -0,0 +1,12 @@
+<serviceGroup>
+ <service name="SourceProviderService">
+ <messageReceivers>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
+ </messageReceivers>
+ <parameter locked="false" name="ServiceClass">org.apache.axis2.jaxws.provider.source.SourceProvider</parameter>
+ <operation name="invoke" mep="http://www.w3.org/2004/08/wsdl/in-out">
+ <actionMapping/>
+ </operation>
+ </service>
+</serviceGroup>
+
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.provider.source;
+
+import javax.xml.ws.Provider;
+import javax.xml.transform.Source;
+
+public class SourceProvider implements Provider<Source> {
+
+ public Source invoke(Source source) {
+ System.out.println(">> SourceProvider: Request received.\n");
+ System.out.println(">> Source toString: \n"+source.toString());
+ return source;
+ }
+}
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/MANIFEST.MF?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/MANIFEST.MF (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/MANIFEST.MF Tue Jul 11 12:33:12 2006
@@ -0,0 +1 @@
+Manifest-Version: 1.0
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/services.xml?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/services.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/META-INF/services.xml Tue Jul 11 12:33:12 2006
@@ -0,0 +1,12 @@
+<serviceGroup>
+ <service name="StringProviderService">
+ <messageReceivers>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
+ </messageReceivers>
+ <parameter locked="false" name="ServiceClass">org.apache.axis2.jaxws.provider.string.StringProvider</parameter>
+ <operation name="invoke" mep="http://www.w3.org/2004/08/wsdl/in-out">
+ <actionMapping/>
+ </operation>
+ </service>
+</serviceGroup>
+
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/StringProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/StringProvider.java?rev=420955&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/StringProvider.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/provider/string/StringProvider.java Tue Jul 11 12:33:12 2006
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * 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.
+ */
+package org.apache.axis2.jaxws.provider.string;
+
+import javax.xml.ws.Provider;
+
+public class StringProvider implements Provider<String> {
+
+ private static String responseGood = "<provider><message>request processed</message></provider>";
+ private static String responseBad = "<provider><message>ERROR:null request received</message><provider>";
+
+ public String invoke(String obj) {
+ if (obj != null) {
+ String str = (String) obj;
+ System.out.println(">> StringProvider received a new request");
+ System.out.println(">> request [" + str + "]");
+
+ return responseGood;
+ }
+ System.out.println(">> ERROR:null request received");
+ return responseBad;
+ }
+}
Modified: webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceMessageReceiverInOut.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceMessageReceiverInOut.java?rev=420955&r1=420954&r2=420955&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceMessageReceiverInOut.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceMessageReceiverInOut.java Tue Jul 11 12:33:12 2006
@@ -160,4 +160,4 @@
}
-
+
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceSkeleton.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceSkeleton.java?rev=420955&r1=420954&r2=420955&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceSkeleton.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/server/EchoServiceSkeleton.java Tue Jul 11 12:33:12 2006
@@ -27,4 +27,4 @@
return output;
}
}
-
+
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/jaxws/test/server/EchoString.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/server/EchoString.java?rev=420955&r1=420954&r2=420955&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/server/EchoString.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/server/EchoString.java Tue Jul 11 12:33:12 2006
@@ -130,4 +130,4 @@
}
-
+
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/jaxws/test/server/EchoStringResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/server/EchoStringResponse.java?rev=420955&r1=420954&r2=420955&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/server/EchoStringResponse.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/server/EchoStringResponse.java Tue Jul 11 12:33:12 2006
@@ -106,4 +106,4 @@
}
-
+
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org