1 16 package org.apache.axis2.transport.tcp; 17 18 import junit.framework.TestCase; 19 import org.apache.axis2.engine.AxisFault; 20 import org.apache.axis2.om.impl.llom.builder.StAXBuilder; 21 import org.apache.axis2.soap.SOAPEnvelope; 22 import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder; 23 24 import javax.xml.stream.XMLInputFactory; 25 import javax.xml.stream.XMLStreamReader; 26 import java.io.InputStream ; 27 28 public class TCPTransportTest extends TestCase { 29 public TCPTransportTest(String arg0) { 30 super(arg0); 31 } 33 34 public void testTransportSender() throws AxisFault { 35 59 60 } 61 62 69 70 public SOAPEnvelope createSOAPEnvelope(InputStream in) throws AxisFault { 71 try { 72 XMLStreamReader xmlreader = 73 XMLInputFactory.newInstance().createXMLStreamReader(in); 74 StAXBuilder builder = new StAXSOAPModelBuilder(xmlreader); 75 return (SOAPEnvelope) builder.getDocumentElement(); 76 } catch (Exception e) { 77 throw new AxisFault(e.getMessage(), e); 78 } 79 } 80 81 } 82 | Popular Tags |