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 de...@apache.org on 2005/02/10 05:50:18 UTC

svn commit: r153153 - in webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1: ./ META-INF/ org/ org/apache/ org/apache/axis/ org/apache/axis/sample/ org/apache/axis/sample/echo/ org/apache/axis/sample/handlers/

Author: deepal
Date: Wed Feb  9 20:50:15 2005
New Revision: 153153

URL: http://svn.apache.org/viewcvs?view=rev&rev=153153
Log:
added loging handler to service1  and also replced echo service codes to the servcice. 

Added:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoProvider.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStruct.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStructEncoder.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/handlers/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/handlers/LoggingHandler.java
Removed:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/Echo1.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/Handler1.java
Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/META-INF/service.xml

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/META-INF/service.xml?view=diff&r1=153152&r2=153153
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/META-INF/service.xml (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/META-INF/service.xml Wed Feb  9 20:50:15 2005
@@ -2,7 +2,7 @@
     <java:implementation class="org.apache.axis.sample.echo.EchoImpl" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
     
    <inflow>
-        <handler name="logging" class="org.apache.axis.samples.userguide.sample3.server.LoggingHandler">
+        <handler name="logging" class="org.apache.axis.samples.handlers.LoggingHandler">
             <order phase="p1" phaseFirst="true"/>
          </handler>
    </inflow>
@@ -11,7 +11,7 @@
     </outflow>
 
     <faultflow>
-        <handler name="logging2" class="org.apache.axis.samples.userguide.sample3.server.LoggingHandler">
+        <handler name="logging2" class="org.apache.axis.samples.handlers.LoggingHandler">
             
         </handler>
     </faultflow>

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoImpl.java?view=auto&rev=153153
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoImpl.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoImpl.java Wed Feb  9 20:50:15 2005
@@ -0,0 +1,26 @@
+/**
+ * Echo.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter.
+ */
+
+package org.apache.axis.sample.echo;
+
+public class EchoImpl {
+	public EchoImpl(){}
+	public java.lang.String echoString(java.lang.String in) {
+		return in;
+	}
+	public java.lang.String[] echoStringArray(java.lang.String[] in) {
+		return in;
+	}
+	public org.apache.axis.sample.echo.EchoStruct echoEchoStruct(
+		org.apache.axis.sample.echo.EchoStruct in) {
+		return in;
+	}
+	public org.apache.axis.sample.echo.EchoStruct[] echoEchoStructArray(
+		org.apache.axis.sample.echo.EchoStruct[] in) {
+		return in;
+	}
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoProvider.java?view=auto&rev=153153
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoProvider.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoProvider.java Wed Feb  9 20:50:15 2005
@@ -0,0 +1,168 @@
+/*
+ * Created on Jan 29, 2005
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+package org.apache.axis.sample.echo;
+
+import java.lang.reflect.Method;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.encoding.Encoder;
+import org.apache.axis.encoding.ArrayTypeEncoder;
+import org.apache.axis.encoding.SimpleTypeEncoder;
+import org.apache.axis.encoding.SimpleTypeEncodingUtils;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.impl.llom.builder.ObjectToOMBuilder;
+import org.apache.axis.impl.providers.SimpleJavaProvider;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.SOAPEnvelope;
+
+public class EchoProvider extends SimpleJavaProvider {
+
+    public Object[] deserializeParameters(
+      MessageContext msgContext,
+      Method method)
+      throws AxisFault {
+      //   org.TimeRecorder.BEFORE_DESERALIZE = System.currentTimeMillis();
+      XMLStreamReader xpp =
+          msgContext.getSoapOperationElement().getPullParser(true);
+		Class[] parms = method.getParameterTypes();
+		Object[] objs = new Object[parms.length];
+		
+		try {
+			int event = xpp.next();
+			while (XMLStreamConstants.START_ELEMENT != event
+				&& XMLStreamConstants.END_ELEMENT != event) {
+				event = xpp.next();
+			}
+            //now we are at the opearion element event 
+            event = xpp.next();
+            while (XMLStreamConstants.START_ELEMENT != event
+                && XMLStreamConstants.END_ELEMENT != event) {
+                event = xpp.next();
+            }
+        //          now we are at the parameter element event 
+            
+			if (XMLStreamConstants.END_ELEMENT == event) {
+				return null;
+			} else {
+				for (int i = 0; i < parms.length; i++) {
+					if (int.class.equals(parms[i])) {
+						objs[i] =
+							new Integer(
+								SimpleTypeEncodingUtils.deserializeInt(xpp));
+					} else if (String.class.equals(parms[i])) {
+						objs[i] =
+							SimpleTypeEncodingUtils.deserializeString(xpp);
+					} else if (String[].class.equals(parms[i])) {
+						objs[i] =
+							SimpleTypeEncodingUtils.deserializeStringArray(xpp);
+					} else if (EchoStruct.class.equals(parms[i])) {
+						Encoder en = new EchoStructEncoder(null);
+						objs[i] = en.deSerialize(xpp);
+					} else if (EchoStruct[].class.equals(parms[i])) {
+                        Encoder encoder = new ArrayTypeEncoder(new EchoStructEncoder(null));
+						objs[i] = encoder.deSerialize(xpp);
+					} else {
+						throw new UnsupportedOperationException("Only int,String and String[] is supported yet");
+					}
+				}
+				return objs;
+
+			}
+		} catch (Exception e) {
+			throw new AxisFault("Exception",e);
+		}
+	}
+
+	public MessageContext invoke(MessageContext msgContext) throws AxisFault {
+		try {
+			//get the implementation class for the Web Service 
+			Object obj = getTheImplementationObject(msgContext);
+			
+			//find the WebService method  
+			Class ImplClass = obj.getClass();
+			AxisOperation op = msgContext.getOperation();
+			String methodName = op.getName().getLocalPart();
+			
+			
+			Method[] methods = ImplClass.getMethods();
+			for (int i = 0; i < methods.length; i++) {
+				if (methods[i].getName().equals(methodName)) {
+					this.method = methods[i];
+					break;
+				}
+			}
+			//deserialize (XML-> java)
+			Object[] parms = deserializeParameters(msgContext, method);
+			//invoke the WebService 
+
+			EchoImpl echo = (EchoImpl)obj;
+			Object result = null;
+			if("echoEchoStruct".equals(methodName))	{
+				result = echo.echoEchoStruct((EchoStruct)parms[0]);
+			}else if ("echoString".equals(methodName))	{
+				result = echo.echoString((String)parms[0]);
+			}else if ("echoStringArray".equals(methodName))	{
+				result = echo.echoStringArray((String[])parms[0]);
+			}else if ("echoEchoStructArray".equals(methodName))	{
+				Object[] parmsIn = (Object[])parms[0];
+				EchoStruct[] structs = new EchoStruct[parmsIn.length];
+				for (int i = 0; i < structs.length; i++) {
+					structs[i] = (EchoStruct) parmsIn[i];
+
+				}
+				result = echo.echoEchoStructArray(structs);
+			}			
+			Encoder outobj = null;
+
+			if (result instanceof String || result instanceof String[]) {
+				outobj = new SimpleTypeEncoder(result);
+			} else if (result instanceof EchoStruct) {
+				outobj = new EchoStructEncoder((EchoStruct) result);
+			} else if (result instanceof EchoStruct[]) {
+				outobj =
+					new ArrayTypeEncoder(
+						(EchoStruct[]) result,
+						new EchoStructEncoder(null));
+			}
+
+			OMFactory fac = OMFactory.newInstance();
+			SOAPEnvelope responseEnvelope = fac.getDefaultEnvelope();
+
+			OMNamespace ns = fac.createOMNamespace("http://soapenc/", "res");
+			OMElement responseMethodName =
+				fac.createOMElement(methodName + "Response", ns);
+			responseEnvelope.getBody().addChild(responseMethodName);
+			OMElement returnelement =
+				fac.createOMElement(methodName + "Return", ns);
+			responseMethodName.addChild(returnelement);
+			returnelement.setBuilder(
+				new ObjectToOMBuilder(returnelement, outobj));
+			returnelement.declareNamespace(
+				OMConstants.ARRAY_ITEM_NSURI,
+				"arrays");
+            returnelement.declareNamespace(
+                "http://axis.apache.org",
+                "s");
+
+			msgContext.setEnvelope(responseEnvelope);
+
+			return msgContext;
+		} catch (SecurityException e) {
+			throw AxisFault.makeFault(e);
+		} catch (IllegalArgumentException e) {
+			throw AxisFault.makeFault(e);
+		}
+	}
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStruct.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStruct.java?view=auto&rev=153153
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStruct.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStruct.java Wed Feb  9 20:50:15 2005
@@ -0,0 +1,319 @@
+/**
+ * EchoStruct.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter.
+ */
+
+package org.apache.axis.sample.echo;
+
+public class EchoStruct implements java.io.Serializable {
+    private java.lang.String value1;
+    private java.lang.String value10;
+    private java.lang.String value11;
+    private java.lang.String value12;
+    private java.lang.String value13;
+    private java.lang.String value2;
+    private int value3;
+    private java.lang.String value4;
+    private java.lang.String value5;
+    private java.lang.String value6;
+    private java.lang.String value7;
+    private java.lang.String value8;
+    private java.lang.String value9;
+
+    public EchoStruct() {
+    }
+
+    public EchoStruct(
+        java.lang.String value1,
+        java.lang.String value10,
+        java.lang.String value11,
+        java.lang.String value12,
+        java.lang.String value13,
+        java.lang.String value2,
+        int value3,
+        java.lang.String value4,
+        java.lang.String value5,
+        java.lang.String value6,
+        java.lang.String value7,
+        java.lang.String value8,
+        java.lang.String value9) {
+        this.value1 = value1;
+        this.value10 = value10;
+        this.value11 = value11;
+        this.value12 = value12;
+        this.value13 = value13;
+        this.value2 = value2;
+        this.value3 = value3;
+        this.value4 = value4;
+        this.value5 = value5;
+        this.value6 = value6;
+        this.value7 = value7;
+        this.value8 = value8;
+        this.value9 = value9;
+    }
+
+    /**
+     * Gets the value1 value for this EchoStruct.
+     * 
+     * @return value1
+     */
+    public java.lang.String getValue1() {
+        return value1;
+    }
+
+    /**
+     * Sets the value1 value for this EchoStruct.
+     * 
+     * @param value1
+     */
+    public void setValue1(java.lang.String value1) {
+        this.value1 = value1;
+    }
+
+    /**
+     * Gets the value10 value for this EchoStruct.
+     * 
+     * @return value10
+     */
+    public java.lang.String getValue10() {
+        return value10;
+    }
+
+    /**
+     * Sets the value10 value for this EchoStruct.
+     * 
+     * @param value10
+     */
+    public void setValue10(java.lang.String value10) {
+        this.value10 = value10;
+    }
+
+    /**
+     * Gets the value11 value for this EchoStruct.
+     * 
+     * @return value11
+     */
+    public java.lang.String getValue11() {
+        return value11;
+    }
+
+    /**
+     * Sets the value11 value for this EchoStruct.
+     * 
+     * @param value11
+     */
+    public void setValue11(java.lang.String value11) {
+        this.value11 = value11;
+    }
+
+    /**
+     * Gets the value12 value for this EchoStruct.
+     * 
+     * @return value12
+     */
+    public java.lang.String getValue12() {
+        return value12;
+    }
+
+    /**
+     * Sets the value12 value for this EchoStruct.
+     * 
+     * @param value12
+     */
+    public void setValue12(java.lang.String value12) {
+        this.value12 = value12;
+    }
+
+    /**
+     * Gets the value13 value for this EchoStruct.
+     * 
+     * @return value13
+     */
+    public java.lang.String getValue13() {
+        return value13;
+    }
+
+    /**
+     * Sets the value13 value for this EchoStruct.
+     * 
+     * @param value13
+     */
+    public void setValue13(java.lang.String value13) {
+        this.value13 = value13;
+    }
+
+    /**
+     * Gets the value2 value for this EchoStruct.
+     * 
+     * @return value2
+     */
+    public java.lang.String getValue2() {
+        return value2;
+    }
+
+    /**
+     * Sets the value2 value for this EchoStruct.
+     * 
+     * @param value2
+     */
+    public void setValue2(java.lang.String value2) {
+        this.value2 = value2;
+    }
+
+    /**
+     * Gets the value3 value for this EchoStruct.
+     * 
+     * @return value3
+     */
+    public int getValue3() {
+        return value3;
+    }
+
+    /**
+     * Sets the value3 value for this EchoStruct.
+     * 
+     * @param value3
+     */
+    public void setValue3(int value3) {
+        this.value3 = value3;
+    }
+
+    /**
+     * Gets the value4 value for this EchoStruct.
+     * 
+     * @return value4
+     */
+    public java.lang.String getValue4() {
+        return value4;
+    }
+
+    /**
+     * Sets the value4 value for this EchoStruct.
+     * 
+     * @param value4
+     */
+    public void setValue4(java.lang.String value4) {
+        this.value4 = value4;
+    }
+
+    /**
+     * Gets the value5 value for this EchoStruct.
+     * 
+     * @return value5
+     */
+    public java.lang.String getValue5() {
+        return value5;
+    }
+
+    /**
+     * Sets the value5 value for this EchoStruct.
+     * 
+     * @param value5
+     */
+    public void setValue5(java.lang.String value5) {
+        this.value5 = value5;
+    }
+
+    /**
+     * Gets the value6 value for this EchoStruct.
+     * 
+     * @return value6
+     */
+    public java.lang.String getValue6() {
+        return value6;
+    }
+
+    /**
+     * Sets the value6 value for this EchoStruct.
+     * 
+     * @param value6
+     */
+    public void setValue6(java.lang.String value6) {
+        this.value6 = value6;
+    }
+
+    /**
+     * Gets the value7 value for this EchoStruct.
+     * 
+     * @return value7
+     */
+    public java.lang.String getValue7() {
+        return value7;
+    }
+
+    /**
+     * Sets the value7 value for this EchoStruct.
+     * 
+     * @param value7
+     */
+    public void setValue7(java.lang.String value7) {
+        this.value7 = value7;
+    }
+
+    /**
+     * Gets the value8 value for this EchoStruct.
+     * 
+     * @return value8
+     */
+    public java.lang.String getValue8() {
+        return value8;
+    }
+
+    /**
+     * Sets the value8 value for this EchoStruct.
+     * 
+     * @param value8
+     */
+    public void setValue8(java.lang.String value8) {
+        this.value8 = value8;
+    }
+
+    /**
+     * Gets the value9 value for this EchoStruct.
+     * 
+     * @return value9
+     */
+    public java.lang.String getValue9() {
+        return value9;
+    }
+
+    /**
+     * Sets the value9 value for this EchoStruct.
+     * 
+     * @param value9
+     */
+    public void setValue9(java.lang.String value9) {
+        this.value9 = value9;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+        if (obj instanceof EchoStruct) {
+            EchoStruct val = (EchoStruct) obj;
+            if (value1.equals(val.value1)
+                && value2.equals(val.value2)
+                && (value3 == val.value3)
+                && value4.equals(val.value4)
+                && value5.equals(val.value5)
+                && value6.equals(val.value6)
+                && value7.equals(val.value7)
+                && value8.equals(val.value8)
+                && value9.equals(val.value9)
+                && value10.equals(val.value10)
+                && value11.equals(val.value11)
+                && value12.equals(val.value12)
+                && value13.equals(val.value13)) {
+                                return true;
+                           
+
+            }
+            
+        }
+        return false;
+
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStructEncoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStructEncoder.java?view=auto&rev=153153
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStructEncoder.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/echo/EchoStructEncoder.java Wed Feb  9 20:50:15 2005
@@ -0,0 +1,365 @@
+/*
+ * Created on Jan 29, 2005
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+package org.apache.axis.sample.echo;
+
+import java.io.IOException;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.encoding.Encoder;
+import org.apache.axis.encoding.SimpleTypeEncodingUtils;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.OMException;
+
+import org.xml.sax.ContentHandler;
+
+public class EchoStructEncoder implements Encoder {
+
+	private static final int VALUE1 = -823812896;
+	private static final int VALUE2 = -823812895;
+	private static final int VALUE3 = -823812894;
+	private static final int VALUE4 = -823812893;
+	private static final int VALUE5 = -823812892;
+	private static final int VALUE6 = -823812891;
+	private static final int VALUE7 = -823812890;
+	private static final int VALUE8 = -823812889;
+	private static final int VALUE9 = -823812888;
+	private static final int VALUE10 = 231604048;
+	private static final int VALUE11 = 231604049;
+	private static final int VALUE12 = 231604050;
+	private static final int VALUE13 = 231604051;
+
+	private ContentHandler contentHandler;
+	private EchoStruct struct;
+    
+    
+    public EchoStructEncoder() {
+    }
+
+	public EchoStructEncoder(EchoStruct struct) {
+		this.struct = struct;
+	}
+
+	public Object deSerialize(XMLStreamReader xpp) throws AxisFault {
+		EchoStruct struct = new EchoStruct();
+
+		try {
+			int event = xpp.next();
+			while (true) {
+				if (XMLStreamConstants.START_ELEMENT == event) {
+					String localName = xpp.getLocalName();
+					int nameCode = localName.hashCode();
+					switch (nameCode) {
+						case VALUE1 :
+							struct.setValue1(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE2 :
+							struct.setValue2(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE3 :
+							struct.setValue3(
+								SimpleTypeEncodingUtils.deserializeInt(xpp));
+							break;
+						case VALUE4 :
+							struct.setValue4(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE5 :
+							struct.setValue5(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE6 :
+							struct.setValue6(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE7 :
+							struct.setValue7(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE8 :
+							struct.setValue8(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE9 :
+							struct.setValue9(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE10 :
+							struct.setValue10(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE11 :
+							struct.setValue11(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE12 :
+							struct.setValue12(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+							break;
+						case VALUE13 :
+							struct.setValue13(
+								SimpleTypeEncodingUtils.deserializeString(xpp));
+						break;
+						default:
+							throw new AxisFault("Unknown elemnt "+ localName);
+					}
+				}
+				if (XMLStreamConstants.END_ELEMENT == event) {
+					break;
+				}
+				if (XMLStreamConstants.END_DOCUMENT == event) {
+					throw new AxisFault("premature and of file");
+				}
+				event = xpp.next();
+			}
+
+			return struct;
+		} catch (XMLStreamException e) {
+			throw AxisFault.makeFault(e);
+		}
+
+	}
+
+	public void serialize(XMLStreamWriter writer)
+		throws IOException, XMLStreamException {
+		writer.writeStartElement("value1");
+
+		writer.writeEndElement();
+	}
+
+	public void serialize(ContentHandler contentHandler)
+		throws OMException {
+		if (contentHandler == null) {
+			throw new OMException("Please set the content Handler");
+		}
+		try {
+			String value = "value1";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value1",
+				null);
+			String strVal = struct.getValue1();
+			char[] str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value1");
+
+			value = "value2";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value2",
+				null);
+			strVal = struct.getValue2();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value2");
+
+			value = "value3";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value3",
+				null);
+			int intVal = struct.getValue3();
+			str = String.valueOf(intVal).toCharArray();
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value3");
+
+			value = "value4";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value4",
+				null);
+			strVal = struct.getValue4();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value4");
+
+			value = "value5";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value5",
+				null);
+			strVal = struct.getValue5();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value5");
+
+			value = "value6";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value6",
+				null);
+			strVal = struct.getValue6();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value6");
+
+			value = "value7";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value7",
+				null);
+			strVal = struct.getValue7();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value7");
+
+			value = "value8";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value8",
+				null);
+			strVal = struct.getValue8();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value8");
+
+			value = "value9";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value9",
+				null);
+			strVal = struct.getValue9();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value9");
+
+			value = "value10";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value10",
+				null);
+			strVal = struct.getValue10();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value10");
+
+			value = "value11";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value11",
+				null);
+			strVal = struct.getValue11();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value11");
+
+			value = "value12";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value12",
+				null);
+			strVal = struct.getValue12();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value12");
+
+			value = "value13";
+			contentHandler.startElement(
+				"http://axis.apache.org",
+				value,
+				"s:value13",
+				null);
+			strVal = struct.getValue13();
+			str = ((strVal == null) ? new char[] {
+			}
+			: strVal.toCharArray());
+			contentHandler.characters(str, 0, str.length);
+			contentHandler.endElement(
+				"http://axis.apache.org",
+				value,
+				"s:value13");
+
+		} catch (Exception e) {
+			throw new OMException(e);
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.axis.encoding.Encoder#setObject(java.lang.Object)
+	 */
+	public void setObject(Object obj) {
+		this.struct = (EchoStruct) obj;
+
+	}
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/handlers/LoggingHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/handlers/LoggingHandler.java?view=auto&rev=153153
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/handlers/LoggingHandler.java (added)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/deployment/service1/org/apache/axis/sample/handlers/LoggingHandler.java Wed Feb  9 20:50:15 2005
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2001-2004 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.samples.handlers;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.impl.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author chathura@opensource.lk
+ * 
+ */
+public class LoggingHandler extends AbstractHandler {
+
+	private Log log = LogFactory.getLog(getClass());
+	/* (non-Javadoc)
+	 * @see org.apache.axis.engine.Handler#invoke(org.apache.axis.context.MessageContext)
+	 */
+	
+	
+	
+	public void invoke(MessageContext msgContext) throws AxisFault {
+		log.info("Incomming message Frrom "+msgContext.getTo().getAddress());
+		System.out.println("Incomming message Frrom "+msgContext.getTo().getAddress());
+
+	}
+	
+	public void revoke(MessageContext msgContext){
+		log.info("Incomming message Revovked at the server "+msgContext.getTo().getAddress() );
+		System.out.println("Incomming message Revovked at the server "+msgContext.getTo().getAddress() );
+	}
+
+}