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 de...@apache.org on 2005/06/07 09:42:13 UTC

svn commit: r188728 - in /webservices/axis/trunk/java/modules: core/html/HappyAxis.jsp samples/src/sample/axisversion/ samples/src/sample/axisversion/META-INF/ samples/src/sample/axisversion/META-INF/service.xml samples/src/sample/axisversion/Version.java

Author: deepal
Date: Tue Jun  7 00:42:11 2005
New Revision: 188728

URL: http://svn.apache.org/viewcvs?rev=188728&view=rev
Log:
added a verion service into sample

Added:
    webservices/axis/trunk/java/modules/samples/src/sample/axisversion/
    webservices/axis/trunk/java/modules/samples/src/sample/axisversion/META-INF/
    webservices/axis/trunk/java/modules/samples/src/sample/axisversion/META-INF/service.xml
    webservices/axis/trunk/java/modules/samples/src/sample/axisversion/Version.java
Modified:
    webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp

Modified: webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp?rev=188728&r1=188727&r2=188728&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp Tue Jun  7 00:42:11 2005
@@ -48,7 +48,7 @@
     int lastindex = IP.lastIndexOf('/');
     IP = IP.substring(0,lastindex);
     targetEPR = new EndpointReference(AddressingConstants.WSA_TO,
-                    IP + "/services/axisversion/viewVersion");
+                    IP + "/services/Version/getVersion");
 %>
 <%!
     /*
@@ -325,15 +325,13 @@
     }
 
     private String value;
-    private QName operationName = new QName("viewVersion");
+    private QName operationName = new QName("getVersion");
     private OMElement createEnvelope() {
         OMFactory fac = OMAbstractFactory.getOMFactory();
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
-        OMElement method = fac.createOMElement("viewVersion", omNs);
+        OMElement method = fac.createOMElement("Version", omNs);
         OMElement value = fac.createOMElement("myValue", omNs);
-        value.addChild(fac.createText(value, "Hello I am Axis2 versionning service , My version is Axis2 M2 !! "));
         method.addChild(value);
-
         return method;
     }
     public boolean inVokeTheService() {

Added: webservices/axis/trunk/java/modules/samples/src/sample/axisversion/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/axisversion/META-INF/service.xml?rev=188728&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/axisversion/META-INF/service.xml (added)
+++ webservices/axis/trunk/java/modules/samples/src/sample/axisversion/META-INF/service.xml Tue Jun  7 00:42:11 2005
@@ -0,0 +1,8 @@
+<service name="Version">
+    <description>
+        This servics is to get the running Axis version
+    </description>
+    <parameter name="ServiceClass" locked="xsd:false">sample.axisversion.Version</parameter>
+    <operation name="getVersion">
+    </operation>
+  </service>
\ No newline at end of file

Added: webservices/axis/trunk/java/modules/samples/src/sample/axisversion/Version.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/axisversion/Version.java?rev=188728&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/axisversion/Version.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/sample/axisversion/Version.java Tue Jun  7 00:42:11 2005
@@ -0,0 +1,40 @@
+package sample.axisversion;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMAbstractFactory;
+import org.apache.axis.om.OMNamespace;
+
+/*
+ * 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.
+ *
+ * 
+ */
+
+/**
+ * Author : Deepal Jayasinghe
+ * Date: Jun 7, 2005
+ * Time: 1:19:11 PM
+ */
+public class Version {
+
+    public OMElement getVersion() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+        OMElement version = fac.createOMElement("Version", omNs);
+        version.addChild(fac.createText(version, "Hello I am Axis2 versionning service , My version is Axis2 M2 !! "));
+        return version;
+    }
+}