axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r201866 [2/2] - in /webservices/axis/trunk/java: modules/core/src/org/apache/axis/ modules/core/src/org/apache/axis/clientapi/ modules/core/src/org/apache/axis/context/ modules/core/src/org/apache/axis/engine/ modules/core/src/org/apache/ax...
Date Sun, 26 Jun 2005 15:26:31 GMT
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/local/LocalTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/local/LocalTransportSender.java?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/local/LocalTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/local/LocalTransportSender.java
Sun Jun 26 08:26:29 2005
@@ -35,13 +35,14 @@
 
     }
 
-    public void startSendWithToAddress(MessageContext msgContext, OutputStream out) throws
AxisFault {
+    public OutputStream startSendWithToAddress(MessageContext msgContext, OutputStream out)
throws AxisFault {
+        return out;
     }
 
-    public void finalizeSendWithToAddress(MessageContext msgContext)
+    public void finalizeSendWithToAddress(MessageContext msgContext,OutputStream out)
         throws AxisFault {
         try {
-            InputStream in = new ByteArrayInputStream(out.toByteArray());
+            InputStream in = new ByteArrayInputStream(this.out.toByteArray());
             LocalTransportReceiver localTransportReceiver = new LocalTransportReceiver();
             localTransportReceiver.processMessage(in, msgContext.getTo());
             in.close();
@@ -54,7 +55,7 @@
     /* (non-Javadoc)
      * @see org.apache.axis.transport.AbstractTransportSender#openTheConnection(org.apache.axis.addressing.EndpointReference)
      */
-    protected OutputStream openTheConnection(EndpointReference epr) throws AxisFault {
+    protected OutputStream openTheConnection(EndpointReference epr,MessageContext msgContext)
throws AxisFault {
         //out = new PipedOutputStream();
         out = new ByteArrayOutputStream();
         return out;
@@ -63,7 +64,7 @@
     /* (non-Javadoc)
      * @see org.apache.axis.transport.AbstractTransportSender#startSendWithOutputStreamFromIncomingConnection(org.apache.axis.context.MessageContext,
java.io.Writer)
      */
-    public void startSendWithOutputStreamFromIncomingConnection(
+    public OutputStream startSendWithOutputStreamFromIncomingConnection(
         MessageContext msgContext,
     OutputStream out)
         throws AxisFault {
@@ -72,13 +73,13 @@
     }
 
     public void finalizeSendWithOutputStreamFromIncomingConnection(
-        MessageContext msgContext)
+        MessageContext msgContext,OutputStream out)
         throws AxisFault {
         throw new UnsupportedOperationException();
 
     }
 
-    public void cleanUp() throws AxisFault {
+    public void cleanUp(MessageContext msgContext) throws AxisFault {
     }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailTransportSender.java?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/mail/MailTransportSender.java
Sun Jun 26 08:26:29 2005
@@ -39,7 +39,7 @@
 
     }
 
-    public void finalizeSendWithToAddress(MessageContext msgContext)
+    public void finalizeSendWithToAddress(MessageContext msgContext,OutputStream out)
         throws AxisFault {
             try {
                 TransportOutDescription transportOut = msgContext.getTransportOut();
@@ -91,16 +91,17 @@
 
     }
 
-    public void startSendWithToAddress(MessageContext msgContext, OutputStream out) throws
AxisFault {
+    public OutputStream startSendWithToAddress(MessageContext msgContext, OutputStream out)
throws AxisFault {
+        return out;
     }
 
-    protected OutputStream openTheConnection(EndpointReference epr) throws AxisFault {
+    protected OutputStream openTheConnection(EndpointReference epr,MessageContext msgContext)
throws AxisFault {
         byteArrayOutputStream = new ByteArrayOutputStream();
             return byteArrayOutputStream;
     }
 
     //Output Stream based cases are not supported 
-    public void startSendWithOutputStreamFromIncomingConnection(
+    public OutputStream startSendWithOutputStreamFromIncomingConnection(
         MessageContext msgContext,
     OutputStream out)
         throws AxisFault {
@@ -108,13 +109,13 @@
 
     }
     public void finalizeSendWithOutputStreamFromIncomingConnection(
-        MessageContext msgContext)
+        MessageContext msgContext,OutputStream out)
         throws AxisFault {
     }
     /* (non-Javadoc)
      * @see org.apache.axis.transport.TransportSender#cleanUp()
      */
-    public void cleanUp() throws AxisFault {
+    public void cleanUp(MessageContext msgContext) throws AxisFault {
         // TODO Auto-generated method stub
 
     }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java
Sun Jun 26 08:26:29 2005
@@ -56,10 +56,10 @@
         //TCP no headers   :)
     }
 
-    public void finalizeSendWithOutputStreamFromIncomingConnection(MessageContext msgContext)
{
+    public void finalizeSendWithOutputStreamFromIncomingConnection(MessageContext msgContext,OutputStream
out) {
     }
 
-    public void finalizeSendWithToAddress(MessageContext msgContext) throws AxisFault {
+    public void finalizeSendWithToAddress(MessageContext msgContext,OutputStream out) throws
AxisFault {
         try {
             socket.shutdownOutput();
             msgContext.setProperty(
@@ -69,7 +69,7 @@
         }
     }
 
-    protected OutputStream openTheConnection(EndpointReference toURL) throws AxisFault {
+    protected OutputStream openTheConnection(EndpointReference toURL,MessageContext msgContext)
throws AxisFault {
         if (toURL != null) {
             try {
                 URL url = new URL(toURL.getAddress());
@@ -88,16 +88,18 @@
         }
     }
 
-    public void startSendWithOutputStreamFromIncomingConnection(
+    public OutputStream startSendWithOutputStreamFromIncomingConnection(
         MessageContext msgContext,
         OutputStream out)
         throws AxisFault {
+            return out;
     }
 
-    public void startSendWithToAddress(MessageContext msgContext, OutputStream out) {
+    public OutputStream startSendWithToAddress(MessageContext msgContext, OutputStream out)
{
+        return out;
     }
 
-    public void cleanUp() throws AxisFault {
+    public void cleanUp(MessageContext msgContext) throws AxisFault {
         try {
             if (socket != null) {
                 socket.close();

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java
(original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java
Sun Jun 26 08:26:29 2005
@@ -22,7 +22,10 @@
 import org.apache.axis.transport.http.HTTPConstants;
 import org.apache.axis.transport.http.HTTPTransportReceiver;
 
+import java.io.BufferedInputStream;
 import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
 import java.io.StringReader;
 import java.util.Map;
 
@@ -43,7 +46,8 @@
                 + "Pragma: no-cache\n"
                 + "SOAPAction: \"\"\n"
                 + "Content-Length: 73507\n\nee rwewebtewbeww";
-        StringReader reader = new StringReader(message);
+
+        InputStream reader = new ByteArrayInputStream(message.getBytes());
         HTTPTransportReceiver reciver = new HTTPTransportReceiver();
 
         Map map = reciver.parseTheHeaders(reader, true);
@@ -67,7 +71,7 @@
                 + "Date: Sat, 12 Feb 2005 10:39:39 GMT\n"
                 + "Server: Apache-Coyote/1.1\n"
                 + "Connection: close\n\nA";
-        StringReader reader = new StringReader(message);
+        InputStream reader = new ByteArrayInputStream(message.getBytes());
         HTTPTransportReceiver reciver = new HTTPTransportReceiver();
 
         Map map = reciver.parseTheHeaders(reader, false);
@@ -89,9 +93,9 @@
                     + "Date: Sat, 12 Feb 2005 10:39:39 GMT\n"
                     + "Server: Apache-Coyote/1.1\n"
                     + "Connection: close";
-            StringReader reader = new StringReader(message);
+            InputStream reader = new ByteArrayInputStream(message.getBytes());
             HTTPTransportReceiver reciver = new HTTPTransportReceiver();
-            BufferedReader br = new BufferedReader(reader);
+            BufferedInputStream br = new BufferedInputStream(reader);
             Map map = reciver.parseTheHeaders(br, false);
             fail("test must failed as \n\n is missing");
         } catch (AxisFault e) {

Modified: webservices/axis/trunk/java/modules/samples/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/maven.xml?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/maven.xml (original)
+++ webservices/axis/trunk/java/modules/samples/maven.xml Sun Jun 26 08:26:29 2005
@@ -16,6 +16,11 @@
         <copy file="../addressing/target/addressing.mar" 
 		tofile="target/test-resources/repository-client/modules/addressing.mar"/>
         <mkdir dir="target/toWar/services/"/>
+        
+        <!-- Create Chuncked enabled Repository -->
+        <mkdir dir="target/test-resources/chuncked-enabledRepository"/>
+        <copy file="test/org/apache/axis/engine/chuncking-enabled-axis2.xml" 
+        tofile="target/test-resources/chuncked-enabledRepository/axis2.xml"/>
     </postGoal>
 
     <postGoal name="test:test">

Added: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLChunckedTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLChunckedTest.java?rev=201866&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLChunckedTest.java
(added)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLChunckedTest.java
Sun Jun 26 08:26:29 2005
@@ -0,0 +1,155 @@
+/*
+ * 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.
+ */
+
+package org.apache.axis.engine;
+
+//todo
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+
+import junit.framework.TestCase;
+
+import org.apache.axis.Constants;
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.context.ServiceContext;
+import org.apache.axis.description.ServiceDescription;
+import org.apache.axis.integration.UtilServer;
+import org.apache.axis.om.OMAbstractFactory;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.impl.llom.OMOutput;
+import org.apache.axis.soap.SOAPFactory;
+import org.apache.axis.util.Utils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class EchoRawXMLChunckedTest extends TestCase {
+    private EndpointReference targetEPR =
+            new EndpointReference(AddressingConstants.WSA_TO,
+                    "http://127.0.0.1:"
+            + (UtilServer.TESTING_PORT)
+            + "/axis/services/EchoXMLService/echoOMElement");
+    private Log log = LogFactory.getLog(getClass());
+    private QName serviceName = new QName("EchoXMLService");
+    private QName operationName = new QName("echoOMElement");
+    private QName transportName = new QName("http://localhost/my", "NullTransport");
+
+    private AxisConfiguration engineRegistry;
+    private MessageContext mc;
+    //private Thread thisThread;
+   // private SimpleHTTPServer sas;
+    private ServiceContext serviceContext;
+    private ServiceDescription service;
+
+    private boolean finish = false;
+
+    public EchoRawXMLChunckedTest() {
+        super(EchoRawXMLChunckedTest.class.getName());
+    }
+
+    public EchoRawXMLChunckedTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+        UtilServer.start(Constants.TESTING_PATH + "chuncked-enabledRepository");
+        service =
+                Utils.createSimpleService(serviceName,
+        Echo.class.getName(),
+                        operationName);
+        UtilServer.deployService(service);
+        serviceContext =
+                UtilServer.getConfigurationContext().createServiceContext(service.getName());
+                
+
+    }
+
+    protected void tearDown() throws Exception {
+        UtilServer.unDeployService(serviceName);
+        UtilServer.stop();
+    }
+
+    private OMElement createEnvelope() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+        OMElement method = fac.createOMElement("echoOMElement", omNs);
+        OMElement value = fac.createOMElement("myValue", omNs);
+        value.addChild(fac.createText(value, "Isaac Assimov, the foundation Sega"));
+        method.addChild(value);
+        
+        return method;
+    }
+
+//    public void testEchoXMLASync() throws Exception {
+//                OMElement payload = createEnvelope();
+//
+//        org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call(Constants.TESTING_PATH
+ "chuncked-enabledRepository");
+//
+//        call.setTo(targetEPR);
+//        call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+//
+//        Callback callback = new Callback() {
+//            public void onComplete(AsyncResult result) {
+//                try {
+//                    result.getResponseEnvelope().serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+//                } catch (XMLStreamException e) {
+//                    reportError(e);
+//                } finally {
+//                    finish = true;
+//                }
+//            }
+//
+//            public void reportError(Exception e) {
+//                e.printStackTrace();
+//                finish = true;
+//            }
+//        };
+//
+//        call.invokeNonBlocking(operationName.getLocalPart(), payload, callback);
+//        int index = 0;
+//        while (!finish) {
+//            Thread.sleep(1000);
+//            index++;
+//            if(index > 10 ){
+//                throw new AxisFault("Server is shutdown as the Async response take too
longs time");
+//            }
+//        }
+//        call.close();
+//
+//
+//        log.info("send the reqest");
+//    }
+
+    public void testEchoXMLSync() throws Exception {
+        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+
+        OMElement payload = createEnvelope();
+
+        org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call(Constants.TESTING_PATH
+ "chuncked-enabledRepository");
+
+        call.setTo(targetEPR);
+        call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
+        OMElement result =
+                (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        call.close();
+    }
+}

Added: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/chuncking-enabled-axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/chuncking-enabled-axis2.xml?rev=201866&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/chuncking-enabled-axis2.xml
(added)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/chuncking-enabled-axis2.xml
Sun Jun 26 08:26:29 2005
@@ -0,0 +1,96 @@
+<axisconfig name="AxisJava2.0">
+   <!-- ================================================= -->
+   <!-- Parameters -->
+   <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="xsd:false">true</parameter>
+    <parameter name="hotupdate" locked="xsd:false">false</parameter>
+    <!-- Uncomment this to enable REST support -->
+<!--    <parameter name="eanbleREST" locked="xsd:false">true</parameter>-->
+
+
+
+    <parameter name="userName" locked="xsd:false">admin</parameter>
+    <parameter name="password" locked="xsd:false">axis2</parameter>
+
+
+
+   <!-- ================================================= -->
+   <!-- Message Receivers -->
+   <!-- ================================================= -->
+    <!-- This is the Deafult Message Receiver for the Request Response style Operations
-->
+    <messageReceiver mep="INOUT" class="org.apache.axis.receivers.RawXMLINOutMessageRecevier"/>
+
+   <!-- ================================================= -->
+   <!-- Transport Ins -->
+   <!-- ================================================= -->
+    <transportReceiver name="http" class="org.apache.axis.transport.http.SimpleHTTPServer">
+        <parameter name="port" locked="xsd:false">6060</parameter>
+    </transportReceiver>
+
+  <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport
Receiver
+  <transportReceiver name="mail" class="org.apache.axis.transport.mail.SimpleMailListener">
+        <parameter name="transport.mail.pop3.host" locked="xsd:false">127.0.0.1</parameter>
+        <parameter name="transport.mail.pop3.user" locked="xsd:false">axis2</parameter>
+        <parameter name="transport.mail.pop3.password" locked="xsd:false">axis2</parameter>
+        <parameter name="transport.mail.pop3.port" locked="xsd:false">110</parameter>
+        <parameter name="transport.mail.replyToAddress" locked="xsd:false">axis2@127.0.0.1</parameter>
+    </transportReceiver> -->
+
+    <transportReceiver name="tcp" class="org.apache.axis.transport.tcp.TCPServer">
+        <parameter name="port" locked="xsd:false">6060</parameter>
+    </transportReceiver>
+
+   <!-- ================================================= -->
+   <!-- Transport Outs -->
+   <!-- ================================================= -->
+
+    <transportSender name="http" class="org.apache.axis.transport.http.HTTPTransportSender">
+    	<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+	    <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
+    </transportSender>
+    
+    <transportSender name="tcp" class="org.apache.axis.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local" class="org.apache.axis.transport.local.LocalTransportSender"/>
+
+     <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport
Receiver
+    <transportSender name="mail" class="org.apache.axis.transport.mail.MailTransportSender">
+        <parameter name="transport.mail.smtp.host" locked="xsd:false">127.0.0.1</parameter>
+        <parameter name="transport.mail.smtp.user" locked="xsd:false">axis2</parameter>
+        <parameter name="transport.mail.smtp.password" locked="xsd:false">axis2</parameter>
+        <parameter name="transport.mail.smtp.port" locked="xsd:false">25</parameter>
+    </transportSender>
+    -->
+
+   <!-- ================================================= -->
+   <!-- Global Modules  -->
+   <!-- ================================================= -->
+    <!-- Uncomment this to enable Addressing
+    <module ref="addressing"/> -->
+
+   <!-- ================================================= -->
+   <!-- Phases  -->
+   <!-- ================================================= -->
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+        <phase name="TransportIn"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch"/>
+        <phase name="PostDispatch"/>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any
phase he want      -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+</axisconfig>
+

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
Sun Jun 26 08:26:29 2005
@@ -48,13 +48,17 @@
     public static synchronized void unDeployService(QName service) throws AxisFault {
         reciver.getSystemContext().getAxisConfiguration().removeService(service);
     }
-
+    
     public static synchronized void start() throws Exception {
+        start(org.apache.axis.Constants.TESTING_REPOSITORY);
+    }
+
+    public static synchronized void start(String repositry) throws Exception {
         if (count == 0) {
             ConfigurationContextFactory erfac = new ConfigurationContextFactory();
-            File file = new File(org.apache.axis.Constants.TESTING_REPOSITORY);
+            File file = new File(repositry);
             if (!file.exists()) {
-                throw new Exception("repository directory does not exists");
+                throw new Exception("repository directory "+ file.getAbsolutePath()+ " does
not exists");
             }
             ConfigurationContext er = erfac.buildConfigurationContext(file.getAbsolutePath());
             try {

Modified: webservices/axis/trunk/java/xdocs/faq.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/faq.html?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/faq.html (original)
+++ webservices/axis/trunk/java/xdocs/faq.html Sun Jun 26 08:26:29 2005
@@ -8,7 +8,7 @@
 	</p>
 	</LI>
 	
-	<LI><strong>What is OMElement, What does it represents?</strong><br>
+	<LI><a name="a2"><strong>What is OMElement, What does it represents?</strong></a><br>
 	<p>OMElement is Axis2 representation of XML, it provide a tree model like DOM. If
you are familer with DOM or JDOM you can soon get familerize with OM quickly. For more information
read<a href="OMTutorial.html"> Axiom Tutorial</a> </p> 
 	</p>
 	</LI>
@@ -36,7 +36,11 @@
 	</p>
 	</LI>
 	
-	
+	<LI><a name="b5"><strong>What is the Axis Repository?</strong></a><br>
+	<p>Repository store the configuration of Axis2, the users should specify the repository
folder starting the Aixs Server (HTTP ot TCP). In the case of tomcat it is the webapps/axis2/WEB-INF
folder. Following picture shows a sample repository.</p> 
+	<img src="images/faq/1.jpg"/>
+	<p>modules and services have a archive format defined and they are automatically picked
up by Axis2 when they are copied to corresponding folders. </p>
+	</LI>
 	</ol>	
 	
 </body>

Added: webservices/axis/trunk/java/xdocs/http-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/http-transport.html?rev=201866&view=auto
==============================================================================
--- webservices/axis/trunk/java/xdocs/http-transport.html (added)
+++ webservices/axis/trunk/java/xdocs/http-transport.html Sun Jun 26 08:26:29 2005
@@ -0,0 +1,9 @@
+<html>
+<head>
+<title>HTTP transports</title>
+</head>
+<body>
+<h1><a name="#configTransport">HTTP transports</a></h1>
+<p>The HTTP is configured by default, the server can be started by following </p>
+<code>Java org.apache.axis.transport.http.SimpleHTTPServer repository port</code>
+</body>
\ No newline at end of file

Added: webservices/axis/trunk/java/xdocs/images/faq/1.jpg
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/images/faq/1.jpg?rev=201866&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/axis/trunk/java/xdocs/images/faq/1.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/axis/trunk/java/xdocs/mail-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/mail-transport.html?rev=201866&view=auto
==============================================================================
--- webservices/axis/trunk/java/xdocs/mail-transport.html (added)
+++ webservices/axis/trunk/java/xdocs/mail-transport.html Sun Jun 26 08:26:29 2005
@@ -0,0 +1,105 @@
+<html>
+<head>
+<title>Mail transport</title>
+
+</head>
+
+<body><h1>Mail transport</h1>
+<p>Mail transport has two parts, transport Sender and transport Listener. </p>
+
+ <a>First you need following additional jar dependencies in the classpath, they can
be found by downloading the <a href="http://java.sun.com/products/javamail/">JavaMail
API</a></p>
+  <ol>
+  <LI>pop3.jar</LI>
+  <LI>smtp.jar</LI>
+  <LI>mailapi.jar</LI>
+  <LI>activation.jar</LI>
+  </ol>
+  
+  
+<h2>Transport Sender</h2>
+<p>You need a mail account in a SMTP server, and Mail transport sender can be activated
by adding following entry to the server.xml file or client.xml file or in both.
+  </p>
+  
+  <code>
+  <pre>   &lt;transportSender name="mail" class="org.apache.axis.transport.mail.MailTransportSender"&gt;
+        &lt;parameter name="transport.mail.smtp.host" locked="xsd:false"&gt;smtp
server host&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.smtp.user" locked="xsd:false"&gt;user
name&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.smtp.password" locked="xsd:false"&gt;password&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.smtp.port" locked="xsd:false"&gt;25&lt;/parameter&gt;
+   &lt;/transportSender&gt;
+  </pre>
+  </code>
+  
+  <h2>Transport Receiver</h2>
+ 
+  
+  <p>You need a mail address that has pop access, the mail Listener can be activated
by adding following entry to the server.xml file or client.xml file or in both.</p>
+  
+  <code><pre>  &lt;transportReceiver name="mail" class="org.apache.axis.transport.mail.SimpleMailListener">
+        &lt;parameter name="transport.mail.pop3.host" locked="xsd:false"&gt;pop server
host&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.pop3.user" locked="xsd:false"&gt;user
name&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.pop3.password" locked="xsd:false"&gt;password&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.pop3.port" locked="xsd:false"&gt;110&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.replyToAddress" locked="xsd:false"&gt;email
address&lt;/parameter&gt;
+  &lt;/transportReceiver&gt;
+  </pre></code>
+  
+  <p>At the Client side if the Mail Listener is needed it is automatically started
by Axis2.</p>
+  
+  <h2>Using Mail transport in the Server Side</h2>
+  <p> If the Mail Listener is need to be started as the server it can be done with
following command with the all the axis2 jars and the mail dependency jars in the classpath.</p>
+  <code>Java org.apache.axis.transport.mail.SimpleMailListener repository-directory</code>
+
+  <h2>Using Mail transport in the Client Side</h2>
+  <p>Following code segment shows how to send a oneway SOAP message using the mail
transport, this need the Transport Sender configured.</p>
+<pre>
+<code>
+OMElement payload = ....
+
+MessageSender sender = new MessageSender(serviceContext);
+sender.setTo(targetEPR);
+sender.setSenderTransport(Constants.TRANSPORT_MAIL);
+
+sender.send(operationName.getLocalPart(), payload);
+</code>
+</pre>
+  
+  <h2>Configure James as SMTP and POP server</h2>
+  <p>Download the <a href="http://james.apache.org/">Apache James</a> and
start the James, connect to the James via telnet for administrator James with following code
+</p>
+  <code>
+  <pre>  $telnet 127.0.0.1 4555
+  Trying 127.0.0.1...
+Connected to localhost.localdomain (127.0.0.1).
+Escape character is '^]'.
+JAMES Remote Administration Tool 2.2.0
+Please enter your login and password
+Login id:
+root
+Password:
+root
+Welcome root. HELP for a list of commands
+  </pre>
+  </code>
+
+  <p>add users to the James</p>
+  <code>
+  <pre>adduser axis2-server axis2
+User axis2-server added
+adduser axis2-client axis2
+User axis2-client added
+Connection closed by foreign host.
+  </pre>
+  </code>  
+  
+  <p>Now the James is up and running with the accounts</p>
+  
+  <hr>  
+  
+  <p>&nbsp;</p>
+  
+  
+ 
+   
+</body>
+</html>
\ No newline at end of file

Added: webservices/axis/trunk/java/xdocs/rest-ws.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/rest-ws.html?rev=201866&view=auto
==============================================================================
--- webservices/axis/trunk/java/xdocs/rest-ws.html (added)
+++ webservices/axis/trunk/java/xdocs/rest-ws.html Sun Jun 26 08:26:29 2005
@@ -0,0 +1,52 @@
+
+<html>
+<head><TITLE>RESTful Web Services Support</TITLE></head>
+<body>
+
+<h1>RESTful Web Services Support</h1>
+<p>Axis2 can be configured as REST Cantainer and can be used to send and receives restful
web services. The REST Web Services can be access in two ways, using HTTP GET and POST. </p>
+ 
+ <h2>Doing REST web services with HTTP POST</h2> 
+  <p>REST support can be enabled in the Server side by adding the following line to
the server.xml file.</p>
+  <code>
+    &lt;parameter name="eanbleREST" locked="xsd:false"&gt;true&lt;/parameter&gt;
+    </code>
+  <p>But it act both as a REST endpoint as well as a SOAP endpoint. When a Message
is received if the content type is text/xml and the SOAP Action Headers is missing the Message
is considered as a RESTful Message. Else they are treated as usual SOAP Messages.</p>
+  
+    <p>While sending the Messages decision they should be RESTful or not is up to the
Client side developer. There are two ways to enable REST at the client side, first is to do
the same thing done at the 
+  Server side in the client.xml file or do the following in the Call.</p>
+    
+    
+    
+<code>call.set(Constants.Configuration.DO_REST,"true");</code>
+  
+  <h2>Accsess a REST Web Service Via HTTP GET</h2>
+   <p>Axis2 let the users accsess Web Service that has simple type parameters via the
HTTP GET. For example following URL requests the version service Via HTTP GET. But the Web
Services arrived via GET assumes REST . Other parameter are converted in to the XML and put
them in to the SOAP Body.</p>
+   <code>http://127.0.0.1:8080/axis2/services/Version/getVersion?operation=getVersion</code>
+   <p>Result can be shown in the browser as follows</p>
+   <img src="images/userguide/http-get-ws.png"/>
+   
+  <p>A GET request should fulfil following conditions</p>
+   <ol>
+      <li>All the parameters the Web Service should accept MUST be simple types (e.g.
String, int, float, long)</li>
+      <li>There must be a parameter called operation that states the name of the operation</li>
+   </ol>
+   
+   <p>For an example  request <code>http://127.0.0.1:8080/axis2/services/Version/getVersion?operation=getVersion</code>
will be converted to the following SOAP Message for processing by Axis2</p>
+   <pre>
+   <code>
+&lt;soapenv:Envelope 
+	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"	
+	xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"&gt;	
+    &lt;soapenv:Body&gt;
+   	&lt;axis2:getVersion xmlns:axis2="http://ws.apache.org/goGetWithREST" &gt;&lt;/axis2:getVersion&gt;
+   &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;
+</code>
+   </pre>
+   
+   
+</body>
+</html>
\ No newline at end of file

Added: webservices/axis/trunk/java/xdocs/tcp-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/tcp-transport.html?rev=201866&view=auto
==============================================================================
--- webservices/axis/trunk/java/xdocs/tcp-transport.html (added)
+++ webservices/axis/trunk/java/xdocs/tcp-transport.html Sun Jun 26 08:26:29 2005
@@ -0,0 +1,41 @@
+<html>
+<body>
+<h1>TCP transport</h1> 
+
+<p>TCP transport has come up as a alternative transport with Web Services, the idea
is to open the socket to the server and write SOAP Message to the server. The SOAP Message
must be self contained in terms of the information needed to process the itself.</p>
+<p>Axis2 TCP transport has two parts, a transport Listener for receiving the Messages
and transport Sender to send the SOAP Messages. Axis2 installation has both the components
built in to itself  by default. In the axis2.xml configuration file the two would look like
follows. </p>
+<code>
+<pre>
+&lt:transportReceiver name="tcp" class="org.apache.axis.transport.tcp.TCPServer"&gt:
+    &lt:parameter name="port" locked="xsd:false"&gt:6060&lt:/parameter&gt:
+&lt:/transportReceiver&gt:
+</pre>
+</code>
+<transportSender name="tcp" class="org.apache.axis.transport.tcp.TCPTransportSender"/>
+
+<h2>How to start the TCPServer</h2>
+
+<p>The TCP server can be started by running the class org.apache.axis.transport.tcp.TCPServer
with two parameters <a href="faq.html#b5">repository</a> and port number as argument.
This class needed all the axis dependancy jars in the classapth. </p>
+<p>Alternatively the TCP Server can be run with tcp-server.bat/ tcp-server.sh file
in the bin directory of the Binary distribution of TCP Server.</p> 
+
+<h2>How send SOAP Messages with TCP transport</h2>
+
+<p>The TCP transport can be enabled very easily from the call API, following code segment
demonstrate how it can be done.</p>
+<code>
+<pre>
+OMElement payload = ...
+
+org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call(serviceContext);
+call.setTo(targetEPR);
+call.engageModule(new QName(Constants.MODULE_ADDRESSING));
+call.setTransportInfo(Constants.TRANSPORT_TCP, Constants.TRANSPORT_TCP, false);
+
+OMElement result =
+        (OMElement) call.invokeBlocking("echo", payload);
+call.close();
+</pre>
+</code>
+<p>The method to note is setTransportInfo that accepts sender transport, Listener transport
and should the return path of the TCP Channel need to be used. It is good Idea to engage the
addressing module to make the SOAP Message self contained. Only other option I can think of
is to use the URI of the first child of the SOAP Body to dispatch the service. The
+Parameter is of the type <a href="faq.html#a2">OMElement</a>, the XML represntation
of Axis2.</p>
+</body>
+</html>
\ No newline at end of file

Modified: webservices/axis/trunk/java/xdocs/userguide.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/userguide.html?rev=201866&r1=201865&r2=201866&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/userguide.html (original)
+++ webservices/axis/trunk/java/xdocs/userguide.html Sun Jun 26 08:26:29 2005
@@ -701,136 +701,18 @@
 <a href="CodegenToolReference.html">Service Archiver</a>.</p>
 <hr/>
 <p>&nbsp;</p>
-<h2><a name="#configTransport">Configuring Transports</a></h2>
-<h3>Configuring HTTP transports</h3>
-<p>The HTTP is configured by default, the server can be started by following </p>
-<code>Java org.apache.axis.transport.http.SimpleHTTPServer repository port</code>
-<h3>Configuring TCP transports</h3>
-<p>The TCP transport is configured by default</p>
 
 
-<h3>Configuring Mail transport</h3>
-<p>Mail transport has two parts, transport Sender and transport Listener. </p>
 
- <a>First you need following additional jar dependencies in the classpath, they can
be found by downloading the <a href="http://java.sun.com/products/javamail/">JavaMail
API</a></p>
-  <ol>
-  <LI>pop3.jar</LI>
-  <LI>smtp.jar</LI>
-  <LI>mailapi.jar</LI>
-  <LI>activation.jar</LI>
-  </ol>
+ <h2>Advanced Topics</h2>
+ <ul>
+ 	<li><a href="rest-ws.html">RESTful Web Services</a></li>
+ 	<li><a href="tcp-transport.html">TCP transport</a></li>
+ 	<li><a href="mail-transport.html">Mail Transport</a></li>
+ 	<li><a href="http-transport.html">HTTP Transports</a></li>
+  </ul>
   
-  
-<h4>Transport Sender</h4>
-<p>You need a mail account in a SMTP server, and Mail transport sender can be activated
by adding following entry to the server.xml file or client.xml file or in both.
-  </p>
-  
-  <code>
-  <pre>   &lt;transportSender name="mail" class="org.apache.axis.transport.mail.MailTransportSender"&gt;
-        &lt;parameter name="transport.mail.smtp.host" locked="xsd:false"&gt;smtp
server host&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.smtp.user" locked="xsd:false"&gt;user
name&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.smtp.password" locked="xsd:false"&gt;password&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.smtp.port" locked="xsd:false"&gt;25&lt;/parameter&gt;
-   &lt;/transportSender&gt;
-  </pre>
-  </code>
-  
-  <h4>Transport Receiver</h4>
  
-  
-  <p>You need a mail address that has pop access, the mail Listener can be activated
by adding following entry to the server.xml file or client.xml file or in both.</p>
-  
-  <code><pre>  &lt;transportReceiver name="mail" class="org.apache.axis.transport.mail.SimpleMailListener">
-        &lt;parameter name="transport.mail.pop3.host" locked="xsd:false"&gt;pop server
host&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.pop3.user" locked="xsd:false"&gt;user
name&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.pop3.password" locked="xsd:false"&gt;password&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.pop3.port" locked="xsd:false"&gt;110&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.replyToAddress" locked="xsd:false"&gt;email
address&lt;/parameter&gt;
-  &lt;/transportReceiver&gt;
-  </pre></code>
-  
-  <p>At the Client side if the Mail Listener is needed it is automatically started
by Axis2. If the Mail Listener is need to be started as the server it can be done with following
command with the all the axis2 jars and the mail dependency jars in the classpath.</p>
-  
-  <code>Java org.apache.axis.transport.mail.SimpleMailListener repository-directory</code>
-  
-  <h4>Configure James as SMTP and POP server</h4>
-  <p>Download the <a href="http://james.apache.org/">Apache James</a> and
start the James, connect to the James via telnet for administrator James with following code
-</p>
-  <code>
-  <pre>  $telnet 127.0.0.1 4555
-  Trying 127.0.0.1...
-Connected to localhost.localdomain (127.0.0.1).
-Escape character is '^]'.
-JAMES Remote Administration Tool 2.2.0
-Please enter your login and password
-Login id:
-root
-Password:
-root
-Welcome root. HELP for a list of commands
-  </pre>
-  </code>
-
-  <p>add users to the James</p>
-  <code>
-  <pre>adduser axis2-server axis2
-User axis2-server added
-adduser axis2-client axis2
-User axis2-client added
-Connection closed by foreign host.
-  </pre>
-  </code>  
-  
-  <p>Now the James is up and running with the accounts</p>
-  
-  <hr>  
-  
-  <p>&nbsp;</p>
-  
-  
- <h3>REST Support </h3>
- 
- <h4>Enable REST support in the Server Side</h4>  
-    <p>REST support can be enabled in the Server side by adding the following line
to the server.xml file.</p>
-    
-    <code>
-    &lt;parameter name="eanbleREST" locked="xsd:false"&gt;true&lt;/parameter&gt;
-    </code>
-    
-<!--    -->
-
-  <h4>Enable the REST support for the Client side</h4>
-  <p>There are two ways to enable REST at the client side, first is to do the same
thing done at the 
-  Server side in the client.xml file or do the following in the Call.</p>
-  <code>call.set(Constants.Configuration.DO_REST,"true");</code>
-  
-  <h4>Accsess a REST Web Service Via HTTP GET</h4>
-   <p>Axis2 let the users accsess Web Service that has simple type parameters via the
HTTP GET. For example following URL requests the version service Via HTTP GET. But the Web
Services arrived via GET assumes REST . Other parameter are converted in to the XML and put
them in to the SOAP Body.</p>
-   <code>http://127.0.0.1:8080/axis2/services/Version/getVersion?operation=getVersion</code>
-   <p>Result can be shown in the browser as follows</p>
-   <img src="images/userguide/http-get-ws.png"/>
-   
-  <p>A GET request should fulfil following conditions</p>
-   <ol>
-      <li>All the parameters the Web Service should accept MUST be simple types (e.g.
String, int, float, long)</li>
-      <li>There must be a parameter called operation that states the name of the operation</li>
-   </ol>
-   
-   <p>For an example  request <code>http://127.0.0.1:8080/axis2/services/Version/getVersion?operation=getVersion</code>
will be converted to the following SOAP Message for processing by Axis2</p>
-   <pre>
-   <code>
-       &lt;soapenv:Envelope 
-       		xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
-		xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
-		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"&gt;
-    	    &lt;soapenv:Body&gt;
-        	&lt;axis2:getVersion xmlns:axis2="http://ws.apache.org/goGetWithREST" &gt;&lt;/axis2:getVersion&gt;
-    	    &lt;/soapenv:Body&gt;
-       &lt;/soapenv:Envelope&gt;
-   </code>
-   </pre>
-   
    
 </body>
 </html>



Mime
View raw message