[wsas-java-dev] svn commit r9385 - in branches/wsas/java/2.1/wsas/java: . modules/samples modules/samples/JAXWS modules/samples/JAXWS/resources modules/samples/JAXWS/resources/META-INF modules/samples/JAXWS/src modules/samples/JAXWS/src/org modules/samples/JAXWS/src/org/wso2 modules/samples/JAXWS/src/org/wso2/wsas modules/samples/JAXWS/src/org/wso2/wsas/jaxws modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator

svn at wso2.org svn at wso2.org
Thu Nov 1 06:41:22 PDT 2007


Author: saminda
Date: Thu Nov  1 06:40:58 2007
New Revision: 9385

Added:
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/build.xml
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/pom.xml
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/CalculatorService.wsdl
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/services.xml
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/Add.java
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/AddResponse.java
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/Calculator.java
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/CalculatorService.java
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/ObjectFactory.java
   branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/package-info.java
Modified:
   branches/wsas/java/2.1/wsas/java/modules/samples/pom.xml
   branches/wsas/java/2.1/wsas/java/pom.xml
Log:
1. Added JAXWS dependecies
2. Added JAXWS sample 


Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/build.xml
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/build.xml	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,95 @@
+<!--
+  ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+  ~
+  ~ 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.
+  -->
+
+<project default="build-all">
+
+    <property name="wso2wsas.home" value="../../"/>
+    <property name="lib" value="${wso2wsas.home}/lib"/>
+    <property name="repo.location" value="${wso2wsas.home}/repository"/>
+    <property name="temp.dir" value="temp"/>
+    <property name="classes" value="${temp.dir}/classes"/>
+    <property name="src" value="src"/>
+    <property name="services" value="services"/>
+    <property name="aarName" value="calculator-jaxws-sample.aar"/>
+    <property name="jarName" value="calculator-jaxws-sample.jar"/>
+
+    <path id="axis2.class.path">
+        <pathelement path="${java.class.path}"/>
+        <fileset dir="${wso2wsas.home}">
+            <include name="lib/*.jar"/>
+        </fileset>
+    </path>
+
+    <target name="init" depends="clean">
+
+        <mkdir dir="${temp.dir}"/>
+        <mkdir dir="${classes}"/>
+        <mkdir dir="${services}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${temp.dir}"/>
+        <delete dir="${services}"/>
+    </target>
+
+    <target name="compile-all" depends="init">
+        <javac debug="on" destdir="${classes}">
+            <src path="${src}"/>
+            <classpath refid="axis2.class.path"/>
+        </javac>
+    </target>
+
+    <target name="build-service" depends="compile-all">
+        <property name="jaxws.dir" value="${temp.dir}/jaxws"/>
+        <mkdir dir="${jaxws.dir}"/>
+
+        <mkdir dir="${jaxws.dir}/META-INF"/>
+        <copy file="resources/META-INF/services.xml" tofile="${jaxws.dir}/META-INF/services.xml"/>
+        <copy file="resources/META-INF/CalculatorService.wsdl" tofile="${jaxws.dir}/META-INF/service.wsdl"/>
+        <copy toDir="${jaxws.dir}">
+            <fileset dir="${classes}">
+                <include name="**/*.class"/>
+            </fileset>
+        </copy>
+
+        <jar destfile="${services}/${aarName}">
+            <fileset dir="${jaxws.dir}"/>
+        </jar>
+
+        <jar destfile="${services}/${jarName}">
+             <fileset dir="${classes}">
+                <include name="**/*.class"/>
+            </fileset>
+        </jar>
+    </target>
+
+
+    <target name="build-all" depends="build-service">
+        <echo message="Copying the classes to lib directory"/>
+        <copy todir="${lib}">
+            <fileset dir="${services}">
+                <include name="**/*.jar"/>
+            </fileset>
+        </copy>
+        <echo message="Copying the created aar files in to the repository"/>
+        <copy toDir="${repo.location}/services">
+            <fileset dir="${services}">
+                <include name="**/*.aar"/>
+            </fileset>
+        </copy>
+
+    </target>
+</project>
\ No newline at end of file

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/pom.xml
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/pom.xml	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,46 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.wso2.wsas</groupId>
+        <artifactId>wso2wsas-samples</artifactId>
+        <version>2.1-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>wso2wsas-samples-jaxws</artifactId>
+    <packaging>jar</packaging>
+    <name>WSO2 Web Services Application Server - Sample/JAXWS</name>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <testSourceDirectory>test</testSourceDirectory>
+        <!--<resources>
+            <resource>
+                <directory>resources</directory>
+            </resource>
+        </resources>-->
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <!--<plugin>
+                <groupId>org.apache.axis2</groupId>
+                <artifactId>axis2-aar-maven-plugin</artifactId>
+                <version>1.3</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <servicesXmlFile>resources/META-INF/services.xml</servicesXmlFile>
+                    <wsdlFile>resources/META-INF/CalculatorService.wsdl</wsdlFile>
+                    <includeDependencies>false</includeDependencies>
+                </configuration>
+            </plugin>-->
+        </plugins>
+
+    </build>
+</project>

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/CalculatorService.wsdl
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/CalculatorService.wsdl	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you 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.
+  -->
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                  xmlns:tns="http://calculator.jaxws.wsas.wso2.org"
+                  targetNamespace="http://calculator.jaxws.wsas.wso2.org"
+                  name="Calculator">
+    <wsdl:types>
+        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                    xmlns="http://calculator.jaxws.wsas.wso2.org"
+                    targetNamespace="http://calculator.jaxws.wsas.wso2.org"
+                    attributeFormDefault="unqualified"
+                    elementFormDefault="qualified">
+            <xsd:element name="add">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="value1" type="xsd:int"/>
+                        <xsd:element name="value2" type="xsd:int"/>
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="addResponse">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="return" type="xsd:int"/>
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:schema>
+    </wsdl:types>
+    <wsdl:message name="add">
+        <wsdl:part name="add" element="tns:add"/>
+    </wsdl:message>
+    <wsdl:message name="addResponse">
+        <wsdl:part name="addResponse" element="tns:addResponse"/>
+    </wsdl:message>
+    <wsdl:portType name="Calculator">
+        <wsdl:operation name="add">
+            <wsdl:input name="add" message="tns:add"/>
+            <wsdl:output name="addResponse" message="tns:addResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="CalculatorSoapBinding" type="tns:Calculator">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="add">
+            <soap:operation soapAction="add" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CalculatorService">
+        <wsdl:port name="Calculator" binding="tns:CalculatorSoapBinding">
+            <soap:address location="http://localhost:8080/jaxws-calculator-1.0/calculator"/>
+            <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/08/addressing/wsdl"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/services.xml
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/resources/META-INF/services.xml	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,32 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you 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.
+  -->
+<serviceGroup>
+    <service name="CalculatorService">
+        <parameter name="useOriginalwsdl">true</parameter>
+        <messageReceivers>
+            <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                             class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
+        </messageReceivers>
+        <parameter name="ServiceClass">org.wso2.wsas.jaxws.calculator.CalculatorService</parameter>
+        <operation name="add" mep="http://www.w3.org/2004/08/wsdl/in-out">
+            <actionMapping/>
+        </operation>
+    </service>
+</serviceGroup>
+

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/Add.java
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/Add.java	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.wso2.wsas.jaxws.calculator;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for add element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="add">
+ *   &lt;complexType>
+ *     &lt;complexContent>
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *         &lt;sequence>
+ *           &lt;element name="value1" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *           &lt;element name="value2" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         &lt;/sequence>
+ *       &lt;/restriction>
+ *     &lt;/complexContent>
+ *   &lt;/complexType>
+ * &lt;/element>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+    "value1",
+    "value2"
+})
+ at XmlRootElement(name = "add")
+public class Add {
+
+    @XmlElement(namespace = "http://calculator.jaxws.wsas.wso2.org")
+    protected int value1;
+    @XmlElement(namespace = "http://calculator.jaxws.wsas.wso2.org")
+    protected int value2;
+
+    /**
+     * Gets the value of the value1 property.
+     * 
+     */
+    public int getValue1() {
+        return value1;
+    }
+
+    /**
+     * Sets the value of the value1 property.
+     * 
+     */
+    public void setValue1(int value) {
+        this.value1 = value;
+    }
+
+    /**
+     * Gets the value of the value2 property.
+     * 
+     */
+    public int getValue2() {
+        return value2;
+    }
+
+    /**
+     * Sets the value of the value2 property.
+     * 
+     */
+    public void setValue2(int value) {
+        this.value2 = value;
+    }
+
+}

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/AddResponse.java
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/AddResponse.java	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.wso2.wsas.jaxws.calculator;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for addResponse element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="addResponse">
+ *   &lt;complexType>
+ *     &lt;complexContent>
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *         &lt;sequence>
+ *           &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         &lt;/sequence>
+ *       &lt;/restriction>
+ *     &lt;/complexContent>
+ *   &lt;/complexType>
+ * &lt;/element>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+    "_return"
+})
+ at XmlRootElement(name = "addResponse")
+public class AddResponse {
+
+    @XmlElement(name = "return", namespace = "http://calculator.jaxws.wsas.wso2.org")
+    protected int _return;
+
+    /**
+     * Gets the value of the return property.
+     * 
+     */
+    public int getReturn() {
+        return _return;
+    }
+
+    /**
+     * Sets the value of the return property.
+     * 
+     */
+    public void setReturn(int value) {
+        this._return = value;
+    }
+
+}

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/Calculator.java
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/Calculator.java	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.wso2.wsas.jaxws.calculator;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b59-fcs
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "Calculator", targetNamespace = "http://calculator.jaxws.wsas.wso2.org")
+public interface Calculator {
+
+
+    /**
+     * 
+     * @param value1
+     * @param value2
+     * @return
+     *     returns int
+     */
+    @WebMethod(action = "add")
+    @WebResult(targetNamespace = "http://calculator.jaxws.wsas.wso2.org")
+    @RequestWrapper(localName = "add", targetNamespace = "http://calculator.jaxws.wsas.wso2.org", className = "org.wso2.wsas.jaxws.calculator.Add")
+    @ResponseWrapper(localName = "addResponse", targetNamespace = "http://calculator.jaxws.wsas.wso2.org", className = "org.wso2.wsas.jaxws.calculator.AddResponse")
+    public int add(
+        @WebParam(name = "value1", targetNamespace = "http://calculator.jaxws.wsas.wso2.org")
+        int value1,
+        @WebParam(name = "value2", targetNamespace = "http://calculator.jaxws.wsas.wso2.org")
+        int value2);
+
+}

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/CalculatorService.java
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/CalculatorService.java	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,52 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.wso2.wsas.jaxws.calculator;
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+ at WebService(serviceName = "Calculator",
+            endpointInterface = "org.wso2.wsas.jaxws.calculator.Calculator",
+            targetNamespace = "http://calculator.jaxws.wsas.wso2.org")
+public class CalculatorService implements Calculator {
+
+    @Resource
+    private WebServiceContext context;
+
+    /**
+     * @return
+     *     returns javax.xml.ws.WebServiceContext
+     */
+    public WebServiceContext getContext() {
+        return context;
+    }
+
+    /**
+     * @param value1
+     * @param value2
+     * @return
+     *     returns int
+     */
+    public int add(int value1, int value2) {
+        System.out.println("User Principal: " + context.getUserPrincipal());
+        System.out.println("value1: " + value1 + " value2: " + value2);
+        return value1 + value2;
+    }
+}
\ No newline at end of file

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/ObjectFactory.java
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/ObjectFactory.java	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.wso2.wsas.jaxws.calculator;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.apache.axis2.jaxws.calculator package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.axis2.jaxws.calculator
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link Add }
+     * 
+     */
+    public Add createAdd() {
+        return new Add();
+    }
+
+    /**
+     * Create an instance of {@link AddResponse }
+     * 
+     */
+    public AddResponse createAddResponse() {
+        return new AddResponse();
+    }
+
+}

Added: branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/package-info.java
==============================================================================
--- (empty file)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/JAXWS/src/org/wso2/wsas/jaxws/calculator/package-info.java	Thu Nov  1 06:40:58 2007
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://calculator.jaxws.wsas.wso2.org")
+package org.wso2.wsas.jaxws.calculator;

Modified: branches/wsas/java/2.1/wsas/java/modules/samples/pom.xml
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/samples/pom.xml	(original)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/pom.xml	Thu Nov  1 06:40:58 2007
@@ -78,5 +78,6 @@
         <module>Xfer</module>
         <module>sts-sample</module>
         <module>EJBService</module>
+        <module>JAXWS</module>
     </modules>
 </project>

Modified: branches/wsas/java/2.1/wsas/java/pom.xml
==============================================================================
--- branches/wsas/java/2.1/wsas/java/pom.xml	(original)
+++ branches/wsas/java/2.1/wsas/java/pom.xml	Thu Nov  1 06:40:58 2007
@@ -1666,6 +1666,144 @@
             <version>${wrapper.version}</version>
         </dependency>
 
+        <!--Jaxws related TODO -->
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws</artifactId>
+            <version>${axis2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-kernel</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-jaxws-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-saaj-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-adb</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-saaj</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-metadata</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xalan</groupId>
+                    <artifactId>xalan</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jaxws-api</artifactId>
+            <version>${axis2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-saaj-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>jaxen</groupId>
+                    <artifactId>jaxen</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-saaj-api</artifactId>
+            <version>${axis2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>xml-apis</groupId>
+                    <artifactId>xml-apis</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-activation_1.1_spec</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-saaj</artifactId>
+            <version>${axis2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-saaj-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-kernel</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-metadata</artifactId>
+            <version>${axis2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-kernel</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-jws-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-jaxws-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-saaj</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jws-api</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.ant</groupId>
+                    <artifactId>ant</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.ant</groupId>
+                    <artifactId>ant-launcher</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
     </dependencies>
 
     <profiles>




More information about the Wsas-java-dev mailing list