You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2004/12/03 12:22:35 UTC
svn commit: r109665 - in webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis: client engine impl/transport/http
Author: hemapani
Date: Fri Dec 3 03:22:33 2004
New Revision: 109665
URL: http://svn.apache.org/viewcvs?view=rev&rev=109665
Log:
fix the engine test
Modified:
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java?view=diff&rev=109665&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java&r1=109664&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java&r2=109665
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java Fri Dec 3 03:22:33 2004
@@ -15,14 +15,40 @@
*/
package org.apache.axis.client;
+import java.net.URL;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.impl.engine.GlobalImpl;
+import org.apache.axis.impl.registry.EngineRegistryImpl;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMEnvelope;
+import org.apache.axis.registry.EngineRegistry;
+
/**
* This is conveneice API for the User who do not need to see the complexity of the
* Engine.
* @author Srinath Perera (hemapani@opensource.lk)
*/
public class Call {
- public Object[] invoke(Object[] obj){
- return null;
+ private EngineRegistry registry;
+ public Call(){
+ this.registry = new EngineRegistryImpl(new GlobalImpl());
}
-
+ //TODO this a a MOCK call things are subjected to be decided
+
+ public OMElement syncCall(OMElement in,URL url) throws AxisFault{
+ OMEnvelope env = null;
+
+ env.getBody().addChild(in);
+ AxisEngine engine = new AxisEngine(registry);
+ MessageContext msgctx = new MessageContext(registry);
+ msgctx.setEnvelope(env);
+ engine.send(msgctx);
+
+
+ return null;
+ }
+
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java?view=diff&rev=109665&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java&r1=109664&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java&r2=109665
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java Fri Dec 3 03:22:33 2004
@@ -19,7 +19,7 @@
import java.io.OutputStream;
import org.apache.axis.context.MessageContext;
-import org.apache.axis.impl.transport.http.TCPTrasnportSender;
+import org.apache.axis.impl.transport.tcp.TCPTrasnportSender;
/**
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java?view=diff&rev=109665&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java&r1=109664&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java&r2=109665
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleAxisServer.java Fri Dec 3 03:22:33 2004
@@ -18,7 +18,9 @@
+import org.apache.axis.context.MessageContext;
import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.engine.AxisFault;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -76,21 +78,29 @@
* Axis engine for processing.
*/
public void run() {
- // Accept and process requests from the socket
- while (!stopped) {
- Socket socket = null;
- try {
- socket = serverSocket.accept();
-
- } catch (java.io.InterruptedIOException iie) {
- } catch (Exception e) {
- log.debug(e.getMessage(), e);
- break;
- }
- if (socket != null) {
- SimpleAxisWorker worker = new SimpleAxisWorker(this, socket,myAxisServer);
- worker.run();
+ try {
+ // Accept and process requests from the socket
+ while (!stopped) {
+ Socket socket = null;
+ try {
+ socket = serverSocket.accept();
+
+ } catch (java.io.InterruptedIOException iie) {
+ } catch (Exception e) {
+ log.debug(e.getMessage(), e);
+ break;
+ }
+ if (socket != null) {
+ ServerHttpHandler worker = new ServerHttpHandler(this, socket,myAxisServer);
+ MessageContext msgContext = worker.execute();
+ myAxisServer.recive(msgContext);
+ socket.close();
+ }
}
+ } catch (AxisFault e) {
+ e.printStackTrace();
+ }catch (IOException e) {
+ e.printStackTrace();
}
log.info("Simple Axis Server Quit");
}