Created new projects:
1. wsdef: contains classes that are used to define a Gson based JSON web service 2. wsclient: contains classes that are used to write a Gson based web-service client wsf is now only a server-side framework. Moved classes relevant for wsdef and wsclient from it to the individual projects.
This commit is contained in:
parent
15fa10943c
commit
45bf2db854
238
wsclient/pom.xml
Normal file
238
wsclient/pom.xml
Normal file
@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>wsclient</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.1</version>
|
||||
<name>Gson Web Service Client Framework</name>
|
||||
<description>A Framework for Writing Clients for JSON based Web-services</description>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>local.repo</id>
|
||||
<name>file repository to svn</name>
|
||||
<url>file://${basedir}/../../mavenrepo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>gson</id>
|
||||
<url>http://google-gson.googlecode.com/svn/mavenrepo</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<connection>scm:svn:http://google-gson.googlecode.com/svn/trunk/wsf</connection>
|
||||
<developerConnection>scm:svn:https://google-gson.googlecode.com/svn/trunk/wsf</developerConnection>
|
||||
<url>http://google-gson.codegoogle.com/svn/trunk/wsf</url>
|
||||
</scm>
|
||||
<issueManagement>
|
||||
<system>Google Code Issue Tracking</system>
|
||||
<url>http://code.google.com/p/google-gson/issues/list</url>
|
||||
</issueManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Google collections -->
|
||||
<dependency>
|
||||
<groupId>com.google.collections</groupId>
|
||||
<artifactId>google-collections</artifactId>
|
||||
<version>1.0-rc5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Gson: Java to Json conversion -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>1.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>wsdef</artifactId>
|
||||
<version>0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Guice: Dependency injection -->
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
<version>2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>wsclient</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.0.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>true</downloadJavadocs>
|
||||
<workspace>../eclipse-ws</workspace>
|
||||
<workspaceCodeStylesURL>file:///${basedir}/../lib/gson-formatting-styles.xml</workspaceCodeStylesURL>
|
||||
<wtpversion>1.5</wtpversion>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<!-- configuration>
|
||||
<updateReleaseInfo>true</updateReleaseInfo>
|
||||
<createChecksum>true</createChecksum>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<classifier>sources</classifier>
|
||||
<file>target/wsf-sources.jar</file>
|
||||
</configuration -->
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- TODO(inder): add manifest entry for maven group, artifact, and classifier ids -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- TODO(inder): add manifest entry for maven group, artifact, and classifier ids -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>src/main/resources/javadoc-descriptor.xml</archive>
|
||||
<links>
|
||||
<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
|
||||
</links>
|
||||
<version>true</version>
|
||||
<useDefaultManifestFile>true</useDefaultManifestFile>
|
||||
<show>public</show>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<configuration>
|
||||
<targetJdk>1.5</targetJdk>
|
||||
<rulesets>
|
||||
<ruleset>/rulesets/basic.xml</ruleset>
|
||||
<ruleset>/rulesets/imports.xml</ruleset>
|
||||
<ruleset>/rulesets/unusedcode.xml</ruleset>
|
||||
<ruleset>/rulesets/finalizers.xml</ruleset>
|
||||
</rulesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- configLocation>config/sun_checks.xml</configLocation -->
|
||||
<configLocation>config/maven_checks.xml</configLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>taglist-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<tags>
|
||||
<tag>TODO</tag>
|
||||
<tag>@todo</tag>
|
||||
<tag>FIXME</tag>
|
||||
<tag>XXX</tag>
|
||||
</tags>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean</id>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<configuration>
|
||||
<arguments>-DenableCiProfile=true</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2-beta-2</version>
|
||||
<configuration>
|
||||
<descriptor>src/main/resources/assembly-descriptor.xml</descriptor>
|
||||
<finalName>wsf-${version}</finalName>
|
||||
<outputDirectory>target/dist</outputDirectory>
|
||||
<workDirectory>target/assembly/work</workDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Inderjeet Singh</name>
|
||||
<organization>Google Inc.</organization>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf.client;
|
||||
package com.google.gson.webservice.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
@ -23,10 +23,10 @@ import java.net.HttpURLConnection;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.wsf.HeaderMap;
|
||||
import com.google.gson.wsf.HeaderMapSpec;
|
||||
import com.google.gson.wsf.RequestBody;
|
||||
import com.google.gson.wsf.WebServiceRequest;
|
||||
import com.google.gson.webservice.definition.HeaderMap;
|
||||
import com.google.gson.webservice.definition.HeaderMapSpec;
|
||||
import com.google.gson.webservice.definition.RequestBody;
|
||||
import com.google.gson.webservice.definition.WebServiceRequest;
|
||||
|
||||
/**
|
||||
* Class to send Web service requests on a {@link HttpURLConnection}.
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf.client;
|
||||
package com.google.gson.webservice.client;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@ -25,12 +25,12 @@ import java.util.Map;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.wsf.HeaderMap;
|
||||
import com.google.gson.wsf.HeaderMapSpec;
|
||||
import com.google.gson.wsf.ResponseBody;
|
||||
import com.google.gson.wsf.ResponseBodySpec;
|
||||
import com.google.gson.wsf.ResponseSpec;
|
||||
import com.google.gson.wsf.WebServiceResponse;
|
||||
import com.google.gson.webservice.definition.HeaderMap;
|
||||
import com.google.gson.webservice.definition.HeaderMapSpec;
|
||||
import com.google.gson.webservice.definition.ResponseBody;
|
||||
import com.google.gson.webservice.definition.ResponseBodySpec;
|
||||
import com.google.gson.webservice.definition.ResponseSpec;
|
||||
import com.google.gson.webservice.definition.WebServiceResponse;
|
||||
|
||||
/**
|
||||
* Receives a response coming on an {@link HttpURLConnection}.
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf.client;
|
||||
package com.google.gson.webservice.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
@ -21,9 +21,9 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.wsf.WebServiceCallSpec;
|
||||
import com.google.gson.wsf.WebServiceRequest;
|
||||
import com.google.gson.wsf.WebServiceResponse;
|
||||
import com.google.gson.webservice.definition.WebServiceCallSpec;
|
||||
import com.google.gson.webservice.definition.WebServiceRequest;
|
||||
import com.google.gson.webservice.definition.WebServiceResponse;
|
||||
|
||||
/**
|
||||
* Main class used by clients to access a Gson Web service.
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf.client;
|
||||
package com.google.gson.webservice.client;
|
||||
|
||||
/**
|
||||
* Configuration needed to access a Gson web service.
|
232
wsdef/pom.xml
Normal file
232
wsdef/pom.xml
Normal file
@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>wsdef</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.1</version>
|
||||
<name>Gson Web Service Definition Framework</name>
|
||||
<description>A Framework for Defining JSON based Web-services</description>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>local.repo</id>
|
||||
<name>file repository to svn</name>
|
||||
<url>file://${basedir}/../../mavenrepo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>gson</id>
|
||||
<url>http://google-gson.googlecode.com/svn/mavenrepo</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<connection>scm:svn:http://google-gson.googlecode.com/svn/trunk/wsf</connection>
|
||||
<developerConnection>scm:svn:https://google-gson.googlecode.com/svn/trunk/wsf</developerConnection>
|
||||
<url>http://google-gson.codegoogle.com/svn/trunk/wsf</url>
|
||||
</scm>
|
||||
<issueManagement>
|
||||
<system>Google Code Issue Tracking</system>
|
||||
<url>http://code.google.com/p/google-gson/issues/list</url>
|
||||
</issueManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Google collections -->
|
||||
<dependency>
|
||||
<groupId>com.google.collections</groupId>
|
||||
<artifactId>google-collections</artifactId>
|
||||
<version>1.0-rc5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Gson: Java to Json conversion -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>1.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Guice: Dependency injection -->
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
<version>2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>wsdef</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.0.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>true</downloadJavadocs>
|
||||
<workspace>../eclipse-ws</workspace>
|
||||
<workspaceCodeStylesURL>file:///${basedir}/../lib/gson-formatting-styles.xml</workspaceCodeStylesURL>
|
||||
<wtpversion>1.5</wtpversion>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<!-- configuration>
|
||||
<updateReleaseInfo>true</updateReleaseInfo>
|
||||
<createChecksum>true</createChecksum>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<classifier>sources</classifier>
|
||||
<file>target/wsf-sources.jar</file>
|
||||
</configuration -->
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- TODO(inder): add manifest entry for maven group, artifact, and classifier ids -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- TODO(inder): add manifest entry for maven group, artifact, and classifier ids -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>src/main/resources/javadoc-descriptor.xml</archive>
|
||||
<links>
|
||||
<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
|
||||
</links>
|
||||
<version>true</version>
|
||||
<useDefaultManifestFile>true</useDefaultManifestFile>
|
||||
<show>public</show>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<configuration>
|
||||
<targetJdk>1.5</targetJdk>
|
||||
<rulesets>
|
||||
<ruleset>/rulesets/basic.xml</ruleset>
|
||||
<ruleset>/rulesets/imports.xml</ruleset>
|
||||
<ruleset>/rulesets/unusedcode.xml</ruleset>
|
||||
<ruleset>/rulesets/finalizers.xml</ruleset>
|
||||
</rulesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- configLocation>config/sun_checks.xml</configLocation -->
|
||||
<configLocation>config/maven_checks.xml</configLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>taglist-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<tags>
|
||||
<tag>TODO</tag>
|
||||
<tag>@todo</tag>
|
||||
<tag>FIXME</tag>
|
||||
<tag>XXX</tag>
|
||||
</tags>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean</id>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<configuration>
|
||||
<arguments>-DenableCiProfile=true</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2-beta-2</version>
|
||||
<configuration>
|
||||
<descriptor>src/main/resources/assembly-descriptor.xml</descriptor>
|
||||
<finalName>wsf-${version}</finalName>
|
||||
<outputDirectory>target/dist</outputDirectory>
|
||||
<workDirectory>target/assembly/work</workDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Inderjeet Singh</name>
|
||||
<organization>Google Inc.</organization>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* Encapsulation of a Web service path that is sent by the client.
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Collections;
|
2
wsf/src/main/java/com/google/gson/wsf/HeaderMap.java → wsdef/src/main/java/com/google/gson/webservice/definition/HeaderMap.java
Executable file → Normal file
2
wsf/src/main/java/com/google/gson/wsf/HeaderMap.java → wsdef/src/main/java/com/google/gson/webservice/definition/HeaderMap.java
Executable file → Normal file
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* An enum of Http methods to provide strongly-typed versions instead of strings.
|
@ -1,4 +1,4 @@
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
// Copied from com.google.gson.TypeUtils
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.GenericArrayType;
|
||||
@ -40,6 +40,7 @@ final class TypeUtils {
|
||||
* </pre>
|
||||
* <code>TypeUtils.getActualTypeForFirstTypeVariable(fooType)</code> will return Integer.class.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static Type getActualTypeForFirstTypeVariable(Type type) {
|
||||
if (type instanceof Class) {
|
||||
return Object.class;
|
||||
@ -53,6 +54,7 @@ final class TypeUtils {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static boolean isArray(Type type) {
|
||||
if (type instanceof Class) {
|
||||
return ((Class<?>)type).isArray();
|
||||
@ -66,6 +68,7 @@ final class TypeUtils {
|
||||
/**
|
||||
* This method returns the actual raw class associated with the specified type.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static Class<?> toRawClass(Type type) {
|
||||
if (type instanceof Class) {
|
||||
return (Class<?>) type;
|
2
wsf/src/main/java/com/google/gson/wsf/Util.java → wsdef/src/main/java/com/google/gson/webservice/definition/Util.java
Executable file → Normal file
2
wsf/src/main/java/com/google/gson/wsf/Util.java → wsdef/src/main/java/com/google/gson/webservice/definition/Util.java
Executable file → Normal file
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* Base class for exceptions thrown to indicate a Web service external or application error
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* The data associated with a Web service call. This includes http request header parameters (form
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Arrays;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* The data associated with a Web service request. This includes HTTP request header parameters
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* Specification of the Web service. This contains a specification of all the
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf;
|
||||
package com.google.gson.webservice.definition;
|
||||
|
||||
/**
|
||||
* Base class for all exceptions thrown by the Web service to indicate a system error condition.
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf.typeadapters;
|
||||
package com.google.gson.webservice.typeadapters;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
||||
@ -26,8 +26,8 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonSerializationContext;
|
||||
import com.google.gson.JsonSerializer;
|
||||
import com.google.gson.wsf.RequestBody;
|
||||
import com.google.gson.wsf.RequestBodySpec;
|
||||
import com.google.gson.webservice.definition.RequestBody;
|
||||
import com.google.gson.webservice.definition.RequestBodySpec;
|
||||
|
||||
/**
|
||||
* Gson type adapter for {@link RequestBody}.
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.gson.wsf.typeadapters;
|
||||
package com.google.gson.webservice.typeadapters;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
||||
@ -26,8 +26,8 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonSerializationContext;
|
||||
import com.google.gson.JsonSerializer;
|
||||
import com.google.gson.wsf.ResponseBody;
|
||||
import com.google.gson.wsf.ResponseBodySpec;
|
||||
import com.google.gson.webservice.definition.ResponseBody;
|
||||
import com.google.gson.webservice.definition.ResponseBodySpec;
|
||||
|
||||
/**
|
||||
* Gson type adapter for {@link ResponseBody}.
|
24
wsf/pom.xml
24
wsf/pom.xml
@ -50,9 +50,9 @@
|
||||
|
||||
<!-- Google collections -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.google-collections</groupId>
|
||||
<artifactId>google-collect</artifactId>
|
||||
<version>snapshot-20080530</version>
|
||||
<groupId>com.google.collections</groupId>
|
||||
<artifactId>google-collections</artifactId>
|
||||
<version>1.0-rc5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
@ -60,15 +60,27 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>1.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>wsdef</artifactId>
|
||||
<version>0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>wsclient</artifactId>
|
||||
<version>0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Guice: Dependency injection -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.guice</groupId>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -17,7 +17,7 @@ package com.google.gson.wsf.inject;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.google.gson.wsf.CallPath;
|
||||
import com.google.gson.webservice.definition.CallPath;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
package com.google.gson.wsf.inject;
|
||||
|
||||
import com.google.gson.wsf.RequestBodySpec;
|
||||
import com.google.gson.wsf.RequestSpec;
|
||||
import com.google.gson.webservice.definition.RequestBodySpec;
|
||||
import com.google.gson.webservice.definition.RequestSpec;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
package com.google.gson.wsf.inject;
|
||||
|
||||
import com.google.gson.wsf.RequestSpec;
|
||||
import com.google.gson.wsf.WebServiceCallSpec;
|
||||
import com.google.gson.webservice.definition.RequestSpec;
|
||||
import com.google.gson.webservice.definition.WebServiceCallSpec;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.google.gson.wsf.inject;
|
||||
|
||||
import com.google.gson.wsf.CallPath;
|
||||
import com.google.gson.wsf.WebServiceCallSpec;
|
||||
import com.google.gson.wsf.WebServiceSpec;
|
||||
import com.google.gson.webservice.definition.CallPath;
|
||||
import com.google.gson.webservice.definition.WebServiceCallSpec;
|
||||
import com.google.gson.webservice.definition.WebServiceSpec;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
|
@ -18,10 +18,10 @@ package com.google.gson.wsf.inject.server;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.wsf.WebServiceCall;
|
||||
import com.google.gson.wsf.WebServiceCallSpec;
|
||||
import com.google.gson.wsf.WebServiceRequest;
|
||||
import com.google.gson.wsf.WebServiceResponse;
|
||||
import com.google.gson.webservice.definition.WebServiceCall;
|
||||
import com.google.gson.webservice.definition.WebServiceCallSpec;
|
||||
import com.google.gson.webservice.definition.WebServiceRequest;
|
||||
import com.google.gson.webservice.definition.WebServiceResponse;
|
||||
import com.google.gson.wsf.server.RequestReceiver;
|
||||
import com.google.gson.wsf.server.WebServiceCallServerBuilder;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -26,14 +26,14 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.wsf.HeaderMap;
|
||||
import com.google.gson.wsf.HeaderMapSpec;
|
||||
import com.google.gson.wsf.HttpMethod;
|
||||
import com.google.gson.wsf.RequestBody;
|
||||
import com.google.gson.wsf.RequestBodySpec;
|
||||
import com.google.gson.wsf.RequestSpec;
|
||||
import com.google.gson.wsf.WebServiceRequest;
|
||||
import com.google.gson.wsf.WebServiceSystemException;
|
||||
import com.google.gson.webservice.definition.HeaderMap;
|
||||
import com.google.gson.webservice.definition.HeaderMapSpec;
|
||||
import com.google.gson.webservice.definition.HttpMethod;
|
||||
import com.google.gson.webservice.definition.RequestBody;
|
||||
import com.google.gson.webservice.definition.RequestBodySpec;
|
||||
import com.google.gson.webservice.definition.RequestSpec;
|
||||
import com.google.gson.webservice.definition.WebServiceRequest;
|
||||
import com.google.gson.webservice.definition.WebServiceSystemException;
|
||||
|
||||
/**
|
||||
* Receives and parses a request at the server side on a {@link HttpServletRequest}.
|
||||
|
@ -23,10 +23,10 @@ import java.util.logging.Logger;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.wsf.HeaderMap;
|
||||
import com.google.gson.wsf.HeaderMapSpec;
|
||||
import com.google.gson.wsf.ResponseBody;
|
||||
import com.google.gson.wsf.WebServiceResponse;
|
||||
import com.google.gson.webservice.definition.HeaderMap;
|
||||
import com.google.gson.webservice.definition.HeaderMapSpec;
|
||||
import com.google.gson.webservice.definition.ResponseBody;
|
||||
import com.google.gson.webservice.definition.WebServiceResponse;
|
||||
|
||||
/**
|
||||
* Sends a JSON web service response on {@link HttpServletResponse}.
|
||||
|
Loading…
Reference in New Issue
Block a user