cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1167324 - in /cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools: fortest/cxf1450/ fortest/cxf1450/Address.java fortest/cxf1450/Employee.java fortest/cxf1450/Name.java fortest/cxf1450/WebParamService.java java2ws/JavaToWSTest.java
Date Fri, 09 Sep 2011 18:23:35 GMT
Author: dkulp
Date: Fri Sep  9 18:23:34 2011
New Revision: 1167324

URL: http://svn.apache.org/viewvc?rev=1167324&view=rev
Log:
[CXF-1450] Add test case to show this now works

Added:
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java
  (with props)
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java
  (with props)
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java
  (with props)
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java
  (with props)
Modified:
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java

Added: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java?rev=1167324&view=auto
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java
(added)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java
Fri Sep  9 18:23:34 2011
@@ -0,0 +1,80 @@
+/**
+ * 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.cxf1450;
+
+public class Address {
+    private String street = "";
+    private String city = "";
+    private String state = "";
+    private String zipcode = "";
+    private String country = "";
+
+    public Address(String street, String city, String state, String zipcode, String country)
{
+
+        this.street = street;
+        this.city = city;
+        this.state = state;
+        this.zipcode = zipcode;
+        this.country = country;
+    }
+
+    public Address() {
+    }
+
+    public String getStreet() {
+        return street;
+    }
+
+    public void setStreet(String street) {
+        this.street = street;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getZipcode() {
+        return zipcode;
+    }
+
+    public void setZipcode(String zipcode) {
+        this.zipcode = zipcode;
+    }
+
+    public String getCountry() {
+        return country;
+    }
+
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+}

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Address.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java?rev=1167324&view=auto
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java
(added)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java
Fri Sep  9 18:23:34 2011
@@ -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.cxf.tools.fortest.cxf1450;
+
+public class Employee {
+
+    private Name name;
+    private Address address;
+
+    Employee() {
+        name = new Name();
+        address = new Address();
+    }
+
+    public Name getName() {
+        return name;
+    }
+
+    public void setName(Name name) {
+        this.name = name;
+    }
+
+    public Address getAddress() {
+        return address;
+    }
+
+    public void setAddress(Address address) {
+        this.address = address;
+    }
+
+}

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Employee.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java?rev=1167324&view=auto
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java
(added)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java
Fri Sep  9 18:23:34 2011
@@ -0,0 +1,45 @@
+/**
+ * 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.cxf1450;
+
+public class Name {
+
+    private String firstName = "";
+    private String lastName = "";
+
+
+    Name() {
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+}

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/Name.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java?rev=1167324&view=auto
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java
(added)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java
Fri Sep  9 18:23:34 2011
@@ -0,0 +1,34 @@
+/**
+ * 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.cxf1450;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.xml.ws.Holder;
+
+public class WebParamService {
+    @WebMethod(operationName = "helloString", action = "urn:HelloString")
+    public String hello(
+                        @WebParam(name = "Name", targetNamespace = "helloString/Name", 
+                                  mode = WebParam.Mode.INOUT) Holder<Name> name,
+                        @WebParam(name = "Employee", mode = WebParam.Mode.OUT) Holder<Employee>
employee) {
+        return "Hello " + name;
+    }
+
+}

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/cxf1450/WebParamService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java?rev=1167324&r1=1167323&r2=1167324&view=diff
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
(original)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
Fri Sep  9 18:23:34 2011
@@ -112,7 +112,20 @@ public class JavaToWSTest extends ToolTe
         assertTrue("namespace value in annoataion @XmlElement is not correct: " + str,
                    str.indexOf("helloString/Name") > -1);
     }
-
+    @Test
+    public void testCXF1450() throws Exception {
+        String[] args = new String[] {
+            "-wsdl", "-wrapperbean",
+            "-s", output.getPath(), 
+            "-o", output.getPath() + "/tmp.wsdl", 
+            "org.apache.cxf.tools.fortest.cxf1450.WebParamService"
+        };
+        JavaToWS.main(args);
+        File wrapper = outputFile("org/apache/cxf/tools/fortest/cxf1450/jaxws/HelloStringResponse.java");
+        String str = FileUtils.getStringFromFile(wrapper);
+        assertTrue("namespace value in annoataion @XmlElement is not correct: " + str,
+                   str.indexOf("helloString/Name") > -1);
+    }
     private void checkStdErr() {
         String err = getStdErr();
         if (err != null) {



Mime
View raw message