Author: rfeng
Date: Thu May 29 10:36:12 2008
New Revision: 661416
URL: http://svn.apache.org/viewvc?rev=661416&view=rev
Log:
Bring up the List support for doc-lit-wrapped Web Service
Added:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java
(with props)
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java
(with props)
Modified:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
Modified: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml?rev=661416&r1=661415&r2=661416&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml
(original)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml Thu
May 29 10:36:12 2008
@@ -144,4 +144,103 @@
</dependency>
<!-- End of addition -->
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Djava.endorsed.dirs=target/endorsed</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ </artifactItems>
+
<outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>add-test-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>target/jaxws-source</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jaxws-maven-plugin</artifactId>
+ <version>1.9</version>
+ <executions>
+
+ <execution>
+ <id>wsgen</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>wsgen-test</goal>
+ </goals>
+ <configuration>
+
<sei>org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleImpl</sei>
+ <genWsdl>true</genWsdl>
+ <keep>true</keep>
+
<resourceDestDir>${project.build.directory}/jaxws-source</resourceDestDir>
+
<sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ </configuration>
+ </execution>
+
+ </executions>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.sun</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.5.0</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ </plugin>
+ -->
+ </plugins>
+ </build>
</project>
Modified:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java?rev=661416&r1=661415&r2=661416&view=diff
==============================================================================
---
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
(original)
+++
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
Thu May 29 10:36:12 2008
@@ -19,10 +19,13 @@
package org.apache.tuscany.sca.itest.databindings.jaxb;
import java.util.ArrayList;
-import java.util.List;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
import org.osoa.sca.annotations.Remotable;
/**
@@ -32,8 +35,18 @@
public interface HelloServiceSimple {
String getGreetings(String name);
String[] getGreetingsArray(String[] names);
+ /**
+ * Add the RequestWrapper/ResponseWrapper annotations to support
Collections
+ * @param names
+ * @return
+ */
+
@RequestWrapper(className="org.apache.tuscany.sca.itest.databindings.jaxb.impl.jaxws.GetGreetingsList")
+
@ResponseWrapper(className="org.apache.tuscany.sca.itest.databindings.jaxb.impl.jaxws.GetGreetingsListResponse")
List<String> getGreetingsList(List<String> names);
+
ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+
Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+
HashMap<String, String> getGreetingsHashMap(HashMap<String, String>
namesMap);
}
Modified:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java?rev=661416&r1=661415&r2=661416&view=diff
==============================================================================
---
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
(original)
+++
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
Thu May 29 10:36:12 2008
@@ -24,6 +24,11 @@
import java.util.List;
import java.util.Map;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
import org.osoa.sca.annotations.Service;
@@ -31,43 +36,63 @@
* An implementation of HelloServiceSimple.
*/
@Service(HelloServiceSimple.class)
[EMAIL PROTECTED](targetNamespace =
"http://jaxb.databindings.itest.sca.tuscany.apache.org/")
public class HelloServiceSimpleImpl implements HelloServiceSimple {
- public String getGreetings(String name) {
- return "Hello "+name;
+ @WebMethod
+ @WebResult(name = "return", targetNamespace = "")
+ public String getGreetings(@WebParam(name = "arg0", targetNamespace = "")
+ String name) {
+ return "Hello " + name;
}
- public String[] getGreetingsArray(String[] names) {
- for(int i = 0; i < names.length; ++i) {
- names[i] = "Hello "+names[i];
+ @WebMethod
+ @WebResult(name = "return", targetNamespace = "")
+ public String[] getGreetingsArray(@WebParam(name = "arg0", targetNamespace
= "")
+ String[] names) {
+ for (int i = 0; i < names.length; ++i) {
+ names[i] = "Hello " + names[i];
}
return names;
}
- public List<String> getGreetingsList(List<String> names) {
- for(int i = 0; i < names.size(); ++i) {
- names.set(i, "Hello "+names.get(i));
+ @WebMethod
+ @WebResult(name = "return", targetNamespace = "")
+ public List<String> getGreetingsList(@WebParam(name = "arg0",
targetNamespace = "")
+ List<String> names) {
+ for (int i = 0; i < names.size(); ++i) {
+ names.set(i, "Hello " + names.get(i));
}
return names;
}
- public ArrayList<String> getGreetingsArrayList(ArrayList<String> names) {
- for(int i = 0; i < names.size(); ++i) {
- names.set(i, "Hello "+names.get(i));
+ @WebMethod
+ @WebResult(name = "return", targetNamespace = "")
+ public ArrayList<String> getGreetingsArrayList(@WebParam(name = "arg0",
targetNamespace = "")
+ ArrayList<String> names) {
+ for (int i = 0; i < names.size(); ++i) {
+ names.set(i, "Hello " + names.get(i));
}
return names;
}
- public Map<String, String> getGreetingsMap(Map<String, String> namesMap) {
- for(Map.Entry<String, String> entry: namesMap.entrySet()) {
- entry.setValue("Hello "+entry.getKey());
+ // @WebMethod
+ // @WebResult(name = "return", targetNamespace = "")
+ public Map<String, String> getGreetingsMap(
+ // @WebParam(name = "arg0", targetNamespace = "")
+ Map<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
}
return namesMap;
}
- public HashMap<String, String> getGreetingsHashMap(HashMap<String, String>
namesMap) {
- for(Map.Entry<String, String> entry: namesMap.entrySet()) {
- entry.setValue("Hello "+entry.getKey());
+ @WebMethod
+ @WebResult(name = "return", targetNamespace = "")
+ public HashMap<String, String> getGreetingsHashMap(@WebParam(name =
"arg0", targetNamespace = "")
+ HashMap<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
}
return namesMap;
}
Added:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java?rev=661416&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java
(added)
+++
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java
Thu May 29 10:36:12 2008
@@ -0,0 +1,60 @@
+/*
+ * 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.tuscany.sca.itest.databindings.jaxb.impl.jaxws;
+
+import java.util.List;
+
+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;
+
+/**
+ * This wrapper class was initially generated by wsgen.
+ *
+ * @version $Rev$ $Date$
+ */
[EMAIL PROTECTED](name = "getGreetingsList", namespace =
"http://jaxb.databindings.itest.sca.tuscany.apache.org/")
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "getGreetingsList", namespace =
"http://jaxb.databindings.itest.sca.tuscany.apache.org/")
+public class GetGreetingsList {
+
+ @XmlElement(name = "arg0", namespace = "")
+ private List<String> arg0;
+
+ /**
+ *
+ * @return
+ * returns List<String>
+ */
+ public List<String> getArg0() {
+ return this.arg0;
+ }
+
+ /**
+ *
+ * @param arg0
+ * the value for the arg0 property
+ */
+ public void setArg0(List<String> arg0) {
+ this.arg0 = arg0;
+ }
+
+}
Propchange:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsList.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java?rev=661416&view=auto
==============================================================================
---
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java
(added)
+++
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java
Thu May 29 10:36:12 2008
@@ -0,0 +1,60 @@
+/*
+ * 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.tuscany.sca.itest.databindings.jaxb.impl.jaxws;
+
+import java.util.List;
+
+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;
+
+/**
+ * This wrapper class was initially generated by wsgen.
+ *
+ * @version $Rev$ $Date$
+ */
[EMAIL PROTECTED](name = "getGreetingsListResponse", namespace =
"http://jaxb.databindings.itest.sca.tuscany.apache.org/")
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "getGreetingsListResponse", namespace =
"http://jaxb.databindings.itest.sca.tuscany.apache.org/")
+public class GetGreetingsListResponse {
+
+ @XmlElement(name = "return", namespace = "")
+ private List<String> _return;
+
+ /**
+ *
+ * @return
+ * returns List<String>
+ */
+ public List<String> getReturn() {
+ return this._return;
+ }
+
+ /**
+ *
+ * @param _return
+ * the value for the _return property
+ */
+ public void setReturn(List<String> _return) {
+ this._return = _return;
+ }
+
+}
Propchange:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/jaxws/GetGreetingsListResponse.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java?rev=661416&r1=661415&r2=661416&view=diff
==============================================================================
---
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
(original)
+++
incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
Thu May 29 10:36:12 2008
@@ -144,7 +144,6 @@
* Service method invoked is getGreetingsList.
*/
@Test
- @Ignore
public void testWSList() throws Exception {
HelloServiceSimpleClient helloServiceSimpleClient =
domain.getService(HelloServiceSimpleClient.class,
"HelloServiceSimpleClientWSComponent");
performTestList(helloServiceSimpleClient);