cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r601694 - in /incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools: fortest/AddNumbersException.java fortest/AddNumbersImpl.java java2wsdl/processor/expected/add_numbers_expected.wsdl
Date Thu, 06 Dec 2007 10:55:06 GMT
Author: mmao
Date: Thu Dec  6 02:55:03 2007
New Revision: 601694

URL: http://svn.apache.org/viewvc?rev=601694&view=rev
Log:
CXF-1190 
  Add missing files in the last commit


Added:
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersException.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersImpl.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl

Added: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersException.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersException.java?rev=601694&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersException.java
(added)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersException.java
Thu Dec  6 02:55:03 2007
@@ -0,0 +1,33 @@
+/**
+ * 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.cxf.tools.fortest;
+
+public class AddNumbersException extends Exception {
+    String detail;
+
+    public AddNumbersException(String message, String detail) {
+        super(message);
+        this.detail = detail;
+    }
+
+    public String getDetail() {
+        return detail;
+    }
+}

Added: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersImpl.java?rev=601694&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersImpl.java
(added)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/AddNumbersImpl.java
Thu Dec  6 02:55:03 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.apache.cxf.tools.fortest;
+
+import javax.jws.WebService;
+import javax.xml.ws.Action;
+import javax.xml.ws.FaultAction;
+import javax.xml.ws.soap.Addressing;
+
+// Jax-WS 2.1 WS-Addressing FromJava
+
+@Addressing
+@WebService
+public class AddNumbersImpl {
+    @Action(
+            input = "http://cxf.apache.org/input",
+            output = "http://cxf.apache.org/output")
+    public int addNumbers(int number1, int number2) throws AddNumbersException {
+        return execute(number1, number2);
+    }
+
+    public int addNumbers2(int number1, int number2) {
+        return number1 + number2;
+    }
+
+    @Action(input = "http://cxf.apache.org/input3", output = "http://cxf.apache.org/output3",
+            fault = {@FaultAction(className = AddNumbersException.class, 
+                                  value = "http://cxf.apache.org/fault3") })
+    public int addNumbers3(int number1, int number2) throws AddNumbersException {
+        return execute(number1, number2);
+    }
+
+    int execute(int number1, int number2) throws AddNumbersException {
+        if (number1 < 0 || number2 < 0) {
+            throw new AddNumbersException("Negative numbers can't be added!",
+                                          "Numbers: " + number1 + ", " + number2);
+        }
+        return number1 + number2;
+    }
+}

Added: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl?rev=601694&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl
(added)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl
Thu Dec  6 02:55:03 2007
@@ -0,0 +1,162 @@
+<?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 name="AddNumbersImplService" targetNamespace="http://fortest.tools.cxf.apache.org/"
xmlns:tns="http://fortest.tools.cxf.apache.org/" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://fortest.tools.cxf.apache.org/"
attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://fortest.tools.cxf.apache.org/">
+    <xsd:element name="AddNumbersException" type="tns:AddNumbersException"/>
+    <xsd:complexType name="AddNumbersException">
+        <xsd:sequence/>
+    </xsd:complexType>
+    <xsd:element name="addNumbers2" type="tns:addNumbers2"/>
+    <xsd:complexType name="addNumbers2">
+        <xsd:sequence>
+            <xsd:element name="arg0" type="xsd:int"/>
+            <xsd:element name="arg1" type="xsd:int"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:element name="addNumbers2Response" type="tns:addNumbers2Response"/>
+    <xsd:complexType name="addNumbers2Response">
+        <xsd:sequence>
+            <xsd:element name="return" type="xsd:int"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:element name="addNumbers3" type="tns:addNumbers3"/>
+    <xsd:complexType name="addNumbers3">
+        <xsd:sequence>
+            <xsd:element name="arg0" type="xsd:int"/>
+            <xsd:element name="arg1" type="xsd:int"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:element name="addNumbers3Response" type="tns:addNumbers3Response"/>
+    <xsd:complexType name="addNumbers3Response">
+        <xsd:sequence>
+            <xsd:element name="return" type="xsd:int"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:element name="addNumbers" type="tns:addNumbers"/>
+    <xsd:complexType name="addNumbers">
+        <xsd:sequence>
+            <xsd:element name="arg0" type="xsd:int"/>
+            <xsd:element name="arg1" type="xsd:int"/>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:element name="addNumbersResponse" type="tns:addNumbersResponse"/>
+    <xsd:complexType name="addNumbersResponse">
+        <xsd:sequence>
+            <xsd:element name="return" type="xsd:int"/>
+        </xsd:sequence>
+    </xsd:complexType>
+</xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="addNumbers2">
+    <wsdl:part name="parameters" element="tns:addNumbers2">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="addNumbers">
+    <wsdl:part name="parameters" element="tns:addNumbers">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="addNumbers3">
+    <wsdl:part name="parameters" element="tns:addNumbers3">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="addNumbers3Response">
+    <wsdl:part name="parameters" element="tns:addNumbers3Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="AddNumbersException">
+    <wsdl:part name="AddNumbersException" element="tns:AddNumbersException">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="addNumbersResponse">
+    <wsdl:part name="parameters" element="tns:addNumbersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="addNumbers2Response">
+    <wsdl:part name="parameters" element="tns:addNumbers2Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="AddNumbersImpl">
+    <wsdl:operation name="addNumbers2">
+      <wsdl:input name="addNumbers2" message="tns:addNumbers2">
+    </wsdl:input>
+      <wsdl:output name="addNumbers2Response" message="tns:addNumbers2Response">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="addNumbers3">
+      <wsdl:input name="addNumbers3" message="tns:addNumbers3" ns1:Action="tns:http://cxf.apache.org/input3">
+    </wsdl:input>
+      <wsdl:output name="addNumbers3Response" message="tns:addNumbers3Response" ns1:Action="tns:http://cxf.apache.org/output3">
+    </wsdl:output>
+      <wsdl:fault name="AddNumbersException" message="tns:AddNumbersException" ns1:Action="tns:http://cxf.apache.org/fault3">
+    </wsdl:fault>
+    </wsdl:operation>
+    <wsdl:operation name="addNumbers">
+      <wsdl:input name="addNumbers" message="tns:addNumbers" ns1:Action="tns:http://cxf.apache.org/input">
+    </wsdl:input>
+      <wsdl:output name="addNumbersResponse" message="tns:addNumbersResponse" ns1:Action="tns:http://cxf.apache.org/output">
+    </wsdl:output>
+      <wsdl:fault name="AddNumbersException" message="tns:AddNumbersException">
+    </wsdl:fault>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="AddNumbersImplServiceSoapBinding" type="tns:AddNumbersImpl">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <ns1:UsingAddressing />
+    <wsdl:operation name="addNumbers2">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="addNumbers2">
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="addNumbers2Response">
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="addNumbers3">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="addNumbers3">
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="addNumbers3Response">
+        <soap:body use="literal"/>
+      </wsdl:output>
+      <wsdl:fault name="AddNumbersException">
+        <soap:fault name="AddNumbersException" use="literal"/>
+      </wsdl:fault>
+    </wsdl:operation>
+    <wsdl:operation name="addNumbers">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="addNumbers">
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="addNumbersResponse">
+        <soap:body use="literal"/>
+      </wsdl:output>
+      <wsdl:fault name="AddNumbersException">
+        <soap:fault name="AddNumbersException" use="literal"/>
+      </wsdl:fault>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="AddNumbersImplService">
+    <wsdl:port name="AddNumbersImplPort" binding="tns:AddNumbersImplServiceSoapBinding">
+      <soap:address location="http://localhost:9090/AddNumbersImplPort"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message