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 di...@apache.org on 2008/03/27 20:12:28 UTC
svn commit: r641956 - in
/webservices/axis2/trunk/java/modules/samples/jaxws-calculator: ./
resources/META-INF/ src/org/apache/axis2/jaxws/calculator/
src/org/apache/axis2/jaxws/calculator/client/
Author: dims
Date: Thu Mar 27 12:12:24 2008
New Revision: 641956
URL: http://svn.apache.org/viewvc?rev=641956&view=rev
Log:
JAXWS Addressing based Calculator sample from Brian De Pradine
Added:
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService_schema1.xsd
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersException.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersExceptionBean.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicket.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicketResponse.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Add.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException_Exception.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddResponse.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddSEIClient.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Calculator.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/CalculatorService.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicket.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicketResponse.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/ObjectFactory.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/package-info.java
Modified:
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/README.txt
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/pom.xml
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService.wsdl
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Add.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddResponse.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Calculator.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/CalculatorService.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/ObjectFactory.java
webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/package-info.java
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/README.txt
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/README.txt?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/README.txt (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/README.txt Thu Mar 27 12:12:24 2008
@@ -21,8 +21,8 @@
The WSDL for this service should be viewable at:
-http://<yourhost>:<yourport>/axis2/services/CalculatorService.Calculator?wsdl
-(e.g. http://localhost:8080/axis2/services/CalculatorService.Calculator?wsdl)
+http://<yourhost>:<yourport>/axis2/services/CalculatorService.CalculatorServicePort?wsdl
+(http://localhost:8080/axis2/services/CalculatorService.CalculatorServicePort?wsdl)
Running the Client
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/pom.xml?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/pom.xml Thu Mar 27 12:12:24 2008
@@ -45,8 +45,24 @@
</build>
<dependencies>
<dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jsr173</artifactId>
+ <groupId>javax.xml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxws</artifactId>
+ <version>SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-jaxws-api</artifactId>
<version>SNAPSHOT</version>
</dependency>
</dependencies>
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService.wsdl?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService.wsdl (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService.wsdl Thu Mar 27 12:12:24 2008
@@ -1,82 +1,70 @@
-<?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.axis2.apache.org"
- targetNamespace="http://calculator.jaxws.axis2.apache.org"
- name="Calculator">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns="http://calculator.jaxws.axis2.org"
- targetNamespace="http://calculator.jaxws.axis2.apache.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>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://calculator.jaxws.axis2.apache.org" name="CalculatorService"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://calculator.jaxws.axis2.apache.org"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://calculator.jaxws.axis2.apache.org"
+ schemaLocation="CalculatorService_schema1.xsd"/>
</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>
+ </types>
+ <message name="getTicket">
+ <part name="parameters" element="tns:getTicket"/>
+ </message>
+ <message name="getTicketResponse">
+ <part name="parameters" element="tns:getTicketResponse"/>
+ </message>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <message name="AddNumbersException">
+ <part name="fault" element="tns:AddNumbersException"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="getTicket">
+ <input message="tns:getTicket"/>
+ <output message="tns:getTicketResponse"/>
+ </operation>
+ <operation name="add">
+ <input wsaw:Action="http://calculator.jaxws.axis2.apache.org/add" message="tns:add"/>
+ <output wsaw:Action="http://calculator.jaxws.axis2.apache.org/addResponse" message="tns:addResponse"/>
+ <fault message="tns:AddNumbersException" name="AddNumbersException"
+ wsaw:Action="http://calculator.jaxws.axis2.apache.org/addFault"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorServicePortBinding" type="tns:Calculator">
+ <wsaw:UsingAddressing/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="getTicket">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
<soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
+ </output>
+ </operation>
+ <operation name="add">
+ <soap:operation soapAction=""/>
+ <input>
<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>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="AddNumbersException">
+ <soap:fault name="AddNumbersException" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorServicePort" binding="tns:CalculatorServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>
+
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService_schema1.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService_schema1.xsd?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService_schema1.xsd (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/resources/META-INF/CalculatorService_schema1.xsd Thu Mar 27 12:12:24 2008
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://calculator.jaxws.axis2.apache.org"
+ xmlns:tns="http://calculator.jaxws.axis2.apache.org" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://www.w3.org/2005/08/addressing">
+
+ <xs:import namespace="http://www.w3.org/2005/08/addressing"
+ schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd"/>
+
+ <xs:element name="AddNumbersException" type="tns:AddNumbersException"/>
+
+ <xs:element name="add" type="tns:add"/>
+
+ <xs:element name="addResponse" type="tns:addResponse"/>
+
+ <xs:element name="getTicket" type="tns:getTicket"/>
+
+ <xs:element name="getTicketResponse" type="tns:getTicketResponse"/>
+
+ <xs:complexType name="getTicket">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="getTicketResponse">
+ <xs:sequence>
+ <xs:element name="return" type="ns1:EndpointReferenceType" form="qualified" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="value1" type="xs:int" form="qualified"/>
+ <xs:element name="value2" type="xs:int" form="qualified"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int" form="qualified"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="AddNumbersException">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Add.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Add.java?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Add.java (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Add.java Thu Mar 27 12:12:24 2008
@@ -1,22 +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.
- */
-
+* 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.apache.axis2.jaxws.calculator;
import javax.xml.bind.annotation.XmlAccessType;
@@ -25,72 +24,45 @@
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>
- * <element name="add">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="value1" type="{http://www.w3.org/2001/XMLSchema}int"/>
- * <element name="value2" type="{http://www.w3.org/2001/XMLSchema}int"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * </pre>
- *
- *
- */
+@XmlRootElement(name = "add", namespace = "http://calculator.jaxws.axis2.apache.org")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "value1",
- "value2"
-})
-@XmlRootElement(name = "add")
+@XmlType(name = "add", namespace = "http://calculator.jaxws.axis2.apache.org", propOrder = {
+ "value1",
+ "value2"
+ })
public class Add {
- @XmlElement(namespace = "http://calculator.jaxws.axis2.apache.org")
- protected int value1;
- @XmlElement(namespace = "http://calculator.jaxws.axis2.apache.org")
- protected int value2;
+ @XmlElement(name = "value1", namespace = "http://calculator.jaxws.axis2.apache.org")
+ private int value1;
+ @XmlElement(name = "value2", namespace = "http://calculator.jaxws.axis2.apache.org")
+ private int value2;
/**
- * Gets the value of the value1 property.
- *
+ * @return returns int
*/
public int getValue1() {
- return value1;
+ return this.value1;
}
/**
- * Sets the value of the value1 property.
- *
+ * @param value1 the value for the value1 property
*/
- public void setValue1(int value) {
- this.value1 = value;
+ public void setValue1(int value1) {
+ this.value1 = value1;
}
/**
- * Gets the value of the value2 property.
- *
+ * @return returns int
*/
public int getValue2() {
- return value2;
+ return this.value2;
}
/**
- * Sets the value of the value2 property.
- *
+ * @param value2 the value for the value2 property
*/
- public void setValue2(int value) {
- this.value2 = value;
+ public void setValue2(int value2) {
+ this.value2 = value2;
}
}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersException.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersException.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersException.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersException.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,50 @@
+/*
+* 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.apache.axis2.jaxws.calculator;
+
+import javax.xml.ws.WebFault;
+
+@WebFault(name = "AddNumbersException",
+ targetNamespace = "http://calculator.jaxws.axis2.apache.org",
+ faultBean = "org.apache.axis2.jaxws.calculator.AddNumbersExceptionBean")
+public class AddNumbersException extends Exception {
+
+ private static final long serialVersionUID = 6719645838690386947L;
+
+ public AddNumbersException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ public AddNumbersException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ public AddNumbersException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ public AddNumbersException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersExceptionBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersExceptionBean.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersExceptionBean.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddNumbersExceptionBean.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,48 @@
+/*
+* 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.apache.axis2.jaxws.calculator;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+@XmlRootElement(name = "AddNumbersException", namespace = "http://calculator.jaxws.axis2.apache.org")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AddNumbersException", namespace = "http://calculator.jaxws.axis2.apache.org")
+public class AddNumbersExceptionBean {
+
+ private String message;
+
+ /**
+ * @return returns String
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * @param message the value for the message property
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+}
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddResponse.java?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddResponse.java (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/AddResponse.java Thu Mar 27 12:12:24 2008
@@ -1,22 +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.
- */
-
+* 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.apache.axis2.jaxws.calculator;
import javax.xml.bind.annotation.XmlAccessType;
@@ -25,52 +24,26 @@
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>
- * <element name="addResponse">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * </pre>
- *
- *
- */
+@XmlRootElement(name = "addResponse", namespace = "http://calculator.jaxws.axis2.apache.org")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "_return"
-})
-@XmlRootElement(name = "addResponse")
+@XmlType(name = "addResponse", namespace = "http://calculator.jaxws.axis2.apache.org")
public class AddResponse {
@XmlElement(name = "return", namespace = "http://calculator.jaxws.axis2.apache.org")
- protected int _return;
+ private int _return;
/**
- * Gets the value of the return property.
- *
+ * @return returns int
*/
public int getReturn() {
- return _return;
+ return this._return;
}
/**
- * Sets the value of the return property.
- *
+ * @param _return the value for the _return property
*/
- public void setReturn(int value) {
- this._return = value;
+ public void setReturn(int _return) {
+ this._return = _return;
}
}
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Calculator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Calculator.java?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Calculator.java (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/Calculator.java Thu Mar 27 12:12:24 2008
@@ -1,57 +1,67 @@
/*
- * 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.
- */
-
+* 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.apache.axis2.jaxws.calculator;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Action;
+import javax.xml.ws.FaultAction;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0_01-b59-fcs
- * Generated source version: 2.0
- *
- */
@WebService(name = "Calculator", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+@XmlSeeAlso({
+ W3CEndpointReference.class
+ })
public interface Calculator {
/**
- *
+ * @return returns javax.xml.ws.wsaddressing.W3CEndpointReference
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ @RequestWrapper(localName = "getTicket", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.GetTicket")
+ @ResponseWrapper(localName = "getTicketResponse", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.GetTicketResponse")
+ public W3CEndpointReference getTicket();
+
+ /**
* @param value1
* @param value2
- * @return
- * returns int
+ * @return returns int
+ * @throws AddNumbersException
*/
- @WebMethod(action = "add")
+ @WebMethod
@WebResult(targetNamespace = "http://calculator.jaxws.axis2.apache.org")
@RequestWrapper(localName = "add", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.Add")
@ResponseWrapper(localName = "addResponse", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.AddResponse")
+ @Action(input = "http://calculator.jaxws.axis2.apache.org/add", output = "http://calculator.jaxws.axis2.apache.org/addResponse",
+ fault = {@FaultAction(className = AddNumbersException.class, value = "http://calculator.jaxws.axis2.apache.org/addFault")})
public int add(
- @WebParam(name = "value1", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
- int value1,
- @WebParam(name = "value2", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
- int value2);
+ @WebParam(name = "value1", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ int value1,
+ @WebParam(name = "value2", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ int value2)
+ throws AddNumbersException;
}
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/CalculatorService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/CalculatorService.java?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/CalculatorService.java (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/CalculatorService.java Thu Mar 27 12:12:24 2008
@@ -1,54 +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.
- */
-
+/*
+* 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.apache.axis2.jaxws.calculator;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
import javax.annotation.Resource;
import javax.jws.WebService;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.util.List;
-@WebService(serviceName = "CalculatorService",
- endpointInterface = "org.apache.axis2.jaxws.calculator.Calculator",
- portName = "Calculator",
- targetNamespace = "http://calculator.jaxws.axis2.apache.org",
- wsdlLocation="META-INF/CalculatorService.wsdl")
+@Addressing
+@WebService(endpointInterface = "org.apache.axis2.jaxws.calculator.Calculator",
+ serviceName = "CalculatorService",
+ portName = "CalculatorServicePort",
+ targetNamespace = "http://calculator.jaxws.axis2.apache.org",
+ wsdlLocation = "META-INF/CalculatorService.wsdl")
public class CalculatorService implements Calculator {
@Resource
private WebServiceContext context;
- /**
- * @return
- * returns javax.xml.ws.WebServiceContext
+ /*
+ * (non-Javadoc)
+ * @see org.apache.axis2.jaxws.calculator.Calculator#getTicket()
*/
- public WebServiceContext getContext() {
- return context;
+ public W3CEndpointReference getTicket() {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ Element element = null;
+
+ try {
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document document = builder.newDocument();
+
+ element =
+ document.createElementNS("http://calculator.jaxws.axis2.apache.org", "TicketId");
+ element.appendChild(document.createTextNode("123456789"));
+ } catch (ParserConfigurationException pce) {
+ // Parser with specified options can't be built
+ pce.printStackTrace();
+ throw new WebServiceException("Unable to create ticket.", pce);
+ }
+
+ return (W3CEndpointReference) getContext().getEndpointReference(element);
}
- /**
- * @param value1
- * @param value2
- * @return
- * returns int
+ /*
+ * (non-Javadoc)
+ * @see org.apache.axis2.jaxws.calculator.Calculator#add(int, int)
*/
- public int add(int value1, int value2) {
- System.out.println("User Principal: " + context.getUserPrincipal());
+ public int add(int value1, int value2) throws AddNumbersException {
+ List list = (List) getContext().getMessageContext().get(MessageContext.REFERENCE_PARAMETERS);
+
+ if (list.isEmpty())
+ throw new AddNumbersException("No ticket found.");
+
+ Element element = (Element) list.get(0);
+
+ if (!"123456789".equals(element.getTextContent())) {
+ throw new AddNumbersException("Invalid ticket: " + element.getTextContent());
+ }
+
System.out.println("value1: " + value1 + " value2: " + value2);
return value1 + value2;
+ }
+
+ //Return the WebServiceContext
+ private WebServiceContext getContext() {
+ return context;
}
}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicket.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicket.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicket.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicket.java Thu Mar 27 12:12:24 2008
@@ -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.
+*/
+package org.apache.axis2.jaxws.calculator;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "getTicket", namespace = "http://calculator.jaxws.axis2.apache.org")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getTicket", namespace = "http://calculator.jaxws.axis2.apache.org")
+public class GetTicket {
+
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicketResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicketResponse.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicketResponse.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/GetTicketResponse.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,50 @@
+/*
+* 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.apache.axis2.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;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+@XmlRootElement(name = "getTicketResponse", namespace = "http://calculator.jaxws.axis2.apache.org")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getTicketResponse", namespace = "http://calculator.jaxws.axis2.apache.org")
+public class GetTicketResponse {
+
+ @XmlElement(name = "return", namespace = "http://calculator.jaxws.axis2.apache.org")
+ private W3CEndpointReference _return;
+
+ /**
+ * @return returns W3CEndpointReference
+ */
+ public W3CEndpointReference getReturn() {
+ return this._return;
+ }
+
+ /**
+ * @param _return the value for the _return property
+ */
+ public void setReturn(W3CEndpointReference _return) {
+ this._return = _return;
+ }
+
+}
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/ObjectFactory.java?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/ObjectFactory.java (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/ObjectFactory.java Thu Mar 27 12:12:24 2008
@@ -1,40 +1,38 @@
/*
- * 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.
- */
-
+* 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.apache.axis2.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
+ * 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.
- *
*/
@XmlRegistry
public class ObjectFactory {
@@ -42,14 +40,12 @@
/**
* 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();
@@ -57,7 +53,6 @@
/**
* Create an instance of {@link AddResponse }
- *
*/
public AddResponse createAddResponse() {
return new AddResponse();
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Add.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Add.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Add.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Add.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,82 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for add complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType name="add">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="value1" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="value2" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "add", namespace = "http://calculator.jaxws.axis2.apache.org", propOrder = {
+ "value1",
+ "value2"
+ })
+public class Add {
+
+ protected int value1;
+ 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: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,73 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for AddNumbersException complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType name="AddNumbersException">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AddNumbersException", namespace = "http://calculator.jaxws.axis2.apache.org", propOrder = {
+ "message"
+ })
+public class AddNumbersException {
+
+ @XmlElement(namespace = "")
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value allowed object is
+ * {@link String }
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException_Exception.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException_Exception.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException_Exception.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddNumbersException_Exception.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,58 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.ws.WebFault;
+
+@WebFault(name = "AddNumbersException", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+public class AddNumbersException_Exception
+ extends Exception {
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ */
+ private AddNumbersException faultInfo;
+
+ /**
+ * @param faultInfo
+ * @param message
+ */
+ public AddNumbersException_Exception(String message, AddNumbersException faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ * @param faultInfo
+ * @param message
+ * @param cause
+ */
+ public AddNumbersException_Exception(String message, AddNumbersException faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ * @return returns fault bean: org.apache.axis2.jaxws.calculator.AddNumbersException
+ */
+ public AddNumbersException getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddResponse.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddResponse.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddResponse.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,67 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for addResponse complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType name="addResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addResponse", namespace = "http://calculator.jaxws.axis2.apache.org", propOrder = {
+ "_return"
+ })
+public class AddResponse {
+
+ @XmlElement(name = "return")
+ 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: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddSEIClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddSEIClient.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddSEIClient.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/AddSEIClient.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,59 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class AddSEIClient {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ long start = System.currentTimeMillis();
+
+ try {
+ //Validate input
+ if (args.length != 2)
+ throw new IllegalArgumentException("Usage: java AddClient <integer 1> <integer 2>");
+
+ int value0 = Integer.parseInt(args[0]);
+ int value1 = Integer.parseInt(args[1]);
+
+ //Retrieve ticket
+ CalculatorService service = new CalculatorService();
+ Calculator port1 = service.getCalculatorServicePort();
+ W3CEndpointReference epr = port1.getTicket();
+
+ //Add numbers
+ Calculator port2 = epr.getPort(Calculator.class, new AddressingFeature());
+ int answer = port2.add(value0, value1);
+ System.out.println("The answer is: " + answer);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ finally {
+ long end = System.currentTimeMillis();
+ long time = end - start;
+ System.out.println("Time: " + time + " ms.");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Calculator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Calculator.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Calculator.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/Calculator.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,61 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+@WebService(name = "Calculator", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+public interface Calculator {
+
+
+ /**
+ * @return returns javax.xml.ws.wsaddressing.W3CEndpointReference
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ @RequestWrapper(localName = "getTicket", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.GetTicket")
+ @ResponseWrapper(localName = "getTicketResponse", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.GetTicketResponse")
+ public W3CEndpointReference getTicket();
+
+ /**
+ * @param value1
+ * @param value2
+ * @return returns int
+ * @throws AddNumbersException_Exception
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ @RequestWrapper(localName = "add", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.Add")
+ @ResponseWrapper(localName = "addResponse", targetNamespace = "http://calculator.jaxws.axis2.apache.org", className = "org.apache.axis2.jaxws.calculator.AddResponse")
+ public int add(
+ @WebParam(name = "value1", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ int value1,
+ @WebParam(name = "value2", targetNamespace = "http://calculator.jaxws.axis2.apache.org")
+ int value2)
+ throws AddNumbersException_Exception
+ ;
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/CalculatorService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/CalculatorService.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/CalculatorService.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/CalculatorService.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,70 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+@WebServiceClient(name = "CalculatorService", targetNamespace = "http://calculator.jaxws.axis2.apache.org", wsdlLocation = "http://localhost:8080/axis2/services/CalculatorService.CalculatorServicePort?wsdl")
+public class CalculatorService
+ extends Service {
+
+ private final static URL CALCULATORSERVICE_WSDL_LOCATION;
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("http://localhost:8080/axis2/services/CalculatorService.CalculatorServicePort?wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ CALCULATORSERVICE_WSDL_LOCATION = url;
+ }
+
+ public CalculatorService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public CalculatorService() {
+ super(CALCULATORSERVICE_WSDL_LOCATION, new QName("http://calculator.jaxws.axis2.apache.org", "CalculatorService"));
+ }
+
+ /**
+ * @return returns Calculator
+ */
+ @WebEndpoint(name = "CalculatorServicePort")
+ public Calculator getCalculatorServicePort() {
+ return (Calculator) super.getPort(new QName("http://calculator.jaxws.axis2.apache.org", "CalculatorServicePort"), Calculator.class);
+ }
+
+ /**
+ * @param features A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return returns Calculator
+ */
+ @WebEndpoint(name = "CalculatorServicePort")
+ public Calculator getCalculatorServicePort(WebServiceFeature... features) {
+ return (Calculator) super.getPort(new QName("http://calculator.jaxws.axis2.apache.org", "CalculatorServicePort"), Calculator.class, features);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicket.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicket.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicket.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicket.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,47 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for getTicket complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType name="getTicket">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getTicket", namespace = "http://calculator.jaxws.axis2.apache.org")
+public class GetTicket {
+
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicketResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicketResponse.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicketResponse.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/GetTicketResponse.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,53 @@
+/*
+* 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.
+*/
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import javax.xml.bind.annotation.*;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getTicketResponse", namespace = "http://calculator.jaxws.axis2.apache.org", propOrder = {
+ "_return"
+ })
+public class GetTicketResponse {
+
+ @XmlElement(name = "return")
+ protected W3CEndpointReference _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return possible object is
+ * {@link W3CEndpointReference }
+ */
+ public W3CEndpointReference getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value allowed object is
+ * {@link W3CEndpointReference }
+ */
+ public void setReturn(W3CEndpointReference value) {
+ this._return = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/ObjectFactory.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/ObjectFactory.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/ObjectFactory.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,132 @@
+/*
+* 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.apache.axis2.jaxws.calculator.client;
+
+import org.apache.axis2.jaxws.calculator.GetTicketResponse;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * 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.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _AddNumbersException_QNAME = new QName("http://calculator.jaxws.axis2.apache.org", "AddNumbersException");
+ private final static QName _Add_QNAME = new QName("http://calculator.jaxws.axis2.apache.org", "add");
+ private final static QName _AddResponse_QNAME = new QName("http://calculator.jaxws.axis2.apache.org", "addResponse");
+ private final static QName _GetTicket_QNAME = new QName("http://calculator.jaxws.axis2.apache.org", "getTicket");
+ private final static QName _GetTicketResponse_QNAME = new QName("http://calculator.jaxws.axis2.apache.org", "getTicketResponse");
+
+ /**
+ * 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 GetTicketResponse }
+ */
+ public GetTicketResponse createGetTicketResponse() {
+ return new GetTicketResponse();
+ }
+
+ /**
+ * Create an instance of {@link AddResponse }
+ */
+ public AddResponse createAddResponse() {
+ return new AddResponse();
+ }
+
+ /**
+ * Create an instance of {@link GetTicket }
+ */
+ public GetTicket createGetTicket() {
+ return new GetTicket();
+ }
+
+ /**
+ * Create an instance of {@link AddNumbersException }
+ */
+ public AddNumbersException createAddNumbersException() {
+ return new AddNumbersException();
+ }
+
+ /**
+ * Create an instance of {@link Add }
+ */
+ public Add createAdd() {
+ return new Add();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddNumbersException }{@code >}}
+ */
+ @XmlElementDecl(namespace = "http://calculator.jaxws.axis2.apache.org", name = "AddNumbersException")
+ public JAXBElement<AddNumbersException> createAddNumbersException(AddNumbersException value) {
+ return new JAXBElement<AddNumbersException>(_AddNumbersException_QNAME, AddNumbersException.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Add }{@code >}}
+ */
+ @XmlElementDecl(namespace = "http://calculator.jaxws.axis2.apache.org", name = "add")
+ public JAXBElement<Add> createAdd(Add value) {
+ return new JAXBElement<Add>(_Add_QNAME, Add.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AddResponse }{@code >}}
+ */
+ @XmlElementDecl(namespace = "http://calculator.jaxws.axis2.apache.org", name = "addResponse")
+ public JAXBElement<AddResponse> createAddResponse(AddResponse value) {
+ return new JAXBElement<AddResponse>(_AddResponse_QNAME, AddResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link GetTicket }{@code >}}
+ */
+ @XmlElementDecl(namespace = "http://calculator.jaxws.axis2.apache.org", name = "getTicket")
+ public JAXBElement<GetTicket> createGetTicket(GetTicket value) {
+ return new JAXBElement<GetTicket>(_GetTicket_QNAME, GetTicket.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link GetTicketResponse }{@code >}}
+ */
+ @XmlElementDecl(namespace = "http://calculator.jaxws.axis2.apache.org", name = "getTicketResponse")
+ public JAXBElement<GetTicketResponse> createGetTicketResponse(GetTicketResponse value) {
+ return new JAXBElement<GetTicketResponse>(_GetTicketResponse_QNAME, GetTicketResponse.class, null, value);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/package-info.java?rev=641956&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/package-info.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/client/package-info.java Thu Mar 27 12:12:24 2008
@@ -0,0 +1,19 @@
+/*
+* 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.
+*/
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://calculator.jaxws.axis2.apache.org", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.axis2.jaxws.calculator.client;
Modified: webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/package-info.java?rev=641956&r1=641955&r2=641956&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/package-info.java (original)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-calculator/src/org/apache/axis2/jaxws/calculator/package-info.java Thu Mar 27 12:12:24 2008
@@ -1,21 +1,19 @@
/*
- * 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.
- */
-
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://calculator.jaxws.axis2.apache.org")
-package org.apache.axis2.jaxws.calculator;
+* 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.
+*/
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://calculator.jaxws.axis2.apache.org") package org.apache.axis2.jaxws.calculator;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org