diff --git a/wsexample/client/src/main/java/com/google/gson/example/client/ExampleClient.java b/wsexample/client/src/main/java/com/google/gson/example/client/ExampleClient.java
index c1e34dd2..8c16a32f 100644
--- a/wsexample/client/src/main/java/com/google/gson/example/client/ExampleClient.java
+++ b/wsexample/client/src/main/java/com/google/gson/example/client/ExampleClient.java
@@ -21,13 +21,13 @@ import com.google.greaze.definition.webservice.RequestBody;
import com.google.greaze.definition.webservice.WebServiceCallSpec;
import com.google.greaze.definition.webservice.WebServiceRequest;
import com.google.greaze.definition.webservice.WebServiceResponse;
+import com.google.greaze.example.definition.model.Cart;
+import com.google.greaze.example.definition.model.LineItem;
+import com.google.greaze.example.definition.model.Order;
+import com.google.greaze.example.definition.model.TypedKeys;
+import com.google.greaze.example.definition.service.SampleJsonService;
import com.google.greaze.webservice.client.ServerConfig;
import com.google.greaze.webservice.client.WebServiceClient;
-import com.google.gson.example.model.Cart;
-import com.google.gson.example.model.LineItem;
-import com.google.gson.example.model.Order;
-import com.google.gson.example.model.TypedKeys;
-import com.google.gson.example.service.SampleJsonService;
import java.util.ArrayList;
import java.util.List;
diff --git a/wsexample/client/src/main/java/com/google/gson/example/rest/client/OrderClient.java b/wsexample/client/src/main/java/com/google/gson/example/rest/client/OrderClient.java
index ac02781d..50a7fd09 100644
--- a/wsexample/client/src/main/java/com/google/gson/example/rest/client/OrderClient.java
+++ b/wsexample/client/src/main/java/com/google/gson/example/rest/client/OrderClient.java
@@ -16,16 +16,16 @@
import com.google.greaze.definition.CallPath;
import com.google.greaze.definition.rest.ValueBasedId;
+import com.google.greaze.example.definition.model.Cart;
+import com.google.greaze.example.definition.model.LineItem;
+import com.google.greaze.example.definition.model.Order;
+import com.google.greaze.example.definition.model.QueryOrdersByItemName;
import com.google.greaze.rest.client.ResourceDepotClient;
import com.google.greaze.rest.client.RestClientStub;
import com.google.greaze.rest.query.client.ResourceQueryClient;
import com.google.greaze.webservice.client.ServerConfig;
import com.google.greaze.webservice.client.WebServiceClient;
import com.google.gson.Gson;
-import com.google.gson.example.model.Cart;
-import com.google.gson.example.model.LineItem;
-import com.google.gson.example.model.Order;
-import com.google.gson.example.model.QueryOrdersByItemName;
import java.util.ArrayList;
import java.util.List;
diff --git a/wsexample/definition/pom.xml b/wsexample/definition/pom.xml
deleted file mode 100644
index a77122f5..00000000
--- a/wsexample/definition/pom.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
- 4.0.0
- com.google.code.gson
- wsexampledef
- jar
- 0.1
- Gson Web Service Example
- An example for Writing Clients for JSON based Web-services
-
-
- local.repo
- file repository to svn
- file://${basedir}/../../../mavenrepo
-
-
-
-
- gson
- http://google-gson.googlecode.com/svn/mavenrepo
-
- true
-
-
- true
-
-
-
-
-
- The Apache Software License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
- scm:svn:http://google-gson.googlecode.com/svn/trunk/wsexample/definition
- scm:svn:https://google-gson.googlecode.com/svn/trunk/wsexample/definition
- http://google-gson.codegoogle.com/svn/trunk/wsexample/definition
-
-
- Google Code Issue Tracking
- http://code.google.com/p/google-gson/issues/list
-
-
-
-
-
-
- com.google.code.gson
- gson
- 1.5
- compile
-
-
- com.google.code.greaze
- greaze-definition
- 0.5
- compile
-
-
-
- junit
- junit
- 3.8.2
- test
-
-
-
-
- wsexampledef
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.6
- 1.6
-
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
-
- true
- true
- ../../eclipse-ws
- file:///${basedir}/../../lib/gson-formatting-styles.xml
- 1.5
-
-
-
- org.apache.maven.plugins
- maven-install-plugin
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
-
- 10
-
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
-
-
- attach-sources
- verify
-
- jar
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- src/main/resources/javadoc-descriptor.xml
-
- http://java.sun.com/j2se/1.5.0/docs/api/
-
- true
- true
- public
-
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
-
- 1.5
-
- /rulesets/basic.xml
- /rulesets/imports.xml
- /rulesets/unusedcode.xml
- /rulesets/finalizers.xml
-
-
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
-
- config/maven_checks.xml
-
-
-
- org.codehaus.mojo
- taglist-maven-plugin
-
-
- TODO
- @todo
- FIXME
- XXX
-
-
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
-
-
- clean
-
- clean
-
-
-
-
-
- org.apache.maven.plugins
- maven-release-plugin
-
- -DenableCiProfile=true
-
-
-
- maven-assembly-plugin
-
- src/main/resources/assembly-descriptor.xml
- wsexampledef-${version}
- target/dist
- target/assembly/work
-
-
-
-
-
-
- Inderjeet Singh
- Google Inc.
-
-
-
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/model/Cart.java b/wsexample/definition/src/main/java/com/google/gson/example/model/Cart.java
deleted file mode 100644
index 430cb072..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/model/Cart.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.model;
-
-import com.google.greaze.definition.rest.RestResource;
-import com.google.greaze.definition.rest.ValueBasedId;
-
-import java.util.List;
-
-/**
- * A cart that can be posted to the server
- *
- * @author inder
- */
-public class Cart implements RestResource, Cart> {
- private final List lineItems;
- private final String buyerName;
- private final String creditCard;
- private ValueBasedId id;
-
- public Cart(List lineItems, String buyerName, String creditCard) {
- this.lineItems = lineItems;
- this.buyerName = buyerName;
- this.creditCard = creditCard;
- }
-
- public List getLineItems() {
- return lineItems;
- }
-
- public String getBuyerName() {
- return buyerName;
- }
-
- public String getCreditCard() {
- return creditCard;
- }
-
- @Override
- public ValueBasedId getId() {
- return id;
- }
-
- @Override
- public void setId(ValueBasedId id) {
- this.id = id;
- }
-
- @Override
- public boolean hasId() {
- return ValueBasedId.isValid(id);
- }
-}
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/model/LineItem.java b/wsexample/definition/src/main/java/com/google/gson/example/model/LineItem.java
deleted file mode 100644
index 992ed9bb..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/model/LineItem.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.model;
-
-/**
- * A line item in a cart
- *
- * @author inder
- */
-public class LineItem {
- private final String name;
- private final int quantity;
- private final long priceInMicros;
- private final String currencyCode;
-
- public LineItem(String name, int quantity, long priceInMicros, String currencyCode) {
- this.name = name;
- this.quantity = quantity;
- this.priceInMicros = priceInMicros;
- this.currencyCode = currencyCode;
- }
-
- public String getName() {
- return name;
- }
-
- public int getQuantity() {
- return quantity;
- }
-
- public long getPriceInMicros() {
- return priceInMicros;
- }
-
- public String getCurrencyCode() {
- return currencyCode;
- }
-}
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/model/Order.java b/wsexample/definition/src/main/java/com/google/gson/example/model/Order.java
deleted file mode 100644
index 04d07f40..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/model/Order.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.model;
-
-import com.google.greaze.definition.rest.RestResource;
-import com.google.greaze.definition.rest.ValueBasedId;
-
-/**
- * An order
- *
- * @author inder
- */
-public class Order implements RestResource, Order> {
- public final Cart postedCart;
- public final String orderNumber;
- private ValueBasedId id;
-
- public Order(Cart postedCart, String orderNumber) {
- this.postedCart = postedCart;
- this.orderNumber = orderNumber;
- }
-
- public Cart getPostedCart() {
- return postedCart;
- }
-
- public String getOrderNumber() {
- return orderNumber;
- }
-
- @Override
- public ValueBasedId getId() {
- return id;
- }
-
- @Override
- public void setId(ValueBasedId id) {
- this.id = id;
- }
-
- @Override
- public boolean hasId() {
- return ValueBasedId.isValid(id);
- }
-}
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/model/QueryOrdersByItemName.java b/wsexample/definition/src/main/java/com/google/gson/example/model/QueryOrdersByItemName.java
deleted file mode 100644
index f9a0551c..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/model/QueryOrdersByItemName.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.model;
-
-/**
- * A query for orders by item name
- *
- * @author Inderjeet Singh
- */
-public class QueryOrdersByItemName {
- private final String itemName;
-
- public QueryOrdersByItemName() {
- this(null);
- }
-
- public QueryOrdersByItemName(String itemName) {
- this.itemName = itemName;
- }
-
- public String getItemName() {
- return itemName;
- }
-}
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/model/TypedKeys.java b/wsexample/definition/src/main/java/com/google/gson/example/model/TypedKeys.java
deleted file mode 100644
index 5345afa2..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/model/TypedKeys.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.model;
-
-import com.google.greaze.definition.TypedKey;
-
-/**
- * Definition of various constants to be used for parameter names of request and response headers,
- * and request and response body.
- *
- * @author inder
- */
-public final class TypedKeys {
- public static final class Request {
- public static final TypedKey AUTH_TOKEN =
- new TypedKey("authToken", String.class);
- }
-
- public static final class RequestBody {
- public static final TypedKey CART = new TypedKey("cart", Cart.class);
- }
-
- public static final class ResponseBody {
- public static final TypedKey ORDER = new TypedKey("order", Order.class);
- }
-}
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/service/SampleJsonService.java b/wsexample/definition/src/main/java/com/google/gson/example/service/SampleJsonService.java
deleted file mode 100644
index 45ab1838..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/service/SampleJsonService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.service;
-import com.google.greaze.definition.CallPath;
-import com.google.greaze.definition.HttpMethod;
-import com.google.greaze.definition.webservice.WebServiceCallSpec;
-import com.google.gson.example.model.TypedKeys;
-
-/**
- * An example of a web-service definition
- *
- * @author inder
- */
-public class SampleJsonService {
-
- public static final WebServiceCallSpec PLACE_ORDER = new WebServiceCallSpec.Builder(
- new CallPath("/placeOrder"))
- .supportsHttpMethod(HttpMethod.POST)
- .addRequestParam(TypedKeys.Request.AUTH_TOKEN)
- .addRequestBodyParam(TypedKeys.RequestBody.CART)
- .addResponseBodyParam(TypedKeys.ResponseBody.ORDER)
- .build();
-}
diff --git a/wsexample/definition/src/main/java/com/google/gson/example/service/ServicePaths.java b/wsexample/definition/src/main/java/com/google/gson/example/service/ServicePaths.java
deleted file mode 100644
index d09439b3..00000000
--- a/wsexample/definition/src/main/java/com/google/gson/example/service/ServicePaths.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed 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 com.google.gson.example.service;
-
-import com.google.greaze.definition.CallPath;
-
-/**
- * An enum describing all paths for this service
- *
- * @author Inderjeet Singh
- */
-public enum ServicePaths {
- NULL_REQUEST(null),
- CART("/rest/cart"),
- ORDER("/rest/order");
-
- private final CallPath path;
-
- private ServicePaths(String pathInfo) {
- this.path = new CallPath(pathInfo);
- }
-
- public CallPath getCallPath() {
- return path;
- }
-
- public static CallPath getCallPath(CallPath invokedPath) {
- for (ServicePaths path : values()) {
- CallPath callPath = path.path;
- String callPathInfo = callPath.get();
- // A rest path can end with a resource-id too.
- // For example, /rest/cart/1234 should match with /rest/cart
- if (callPathInfo != null && invokedPath.matches(callPath)) {
- return callPath;
- }
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/wsexample/server/src/main/java/com/google/gson/wsexample/server/ProcedureDispatcher.java b/wsexample/server/src/main/java/com/google/gson/wsexample/server/ProcedureDispatcher.java
index 432b1aca..01d25703 100644
--- a/wsexample/server/src/main/java/com/google/gson/wsexample/server/ProcedureDispatcher.java
+++ b/wsexample/server/src/main/java/com/google/gson/wsexample/server/ProcedureDispatcher.java
@@ -28,14 +28,14 @@ import com.google.greaze.definition.webservice.ResponseSpec;
import com.google.greaze.definition.webservice.WebServiceCallSpec;
import com.google.greaze.definition.webservice.WebServiceRequest;
import com.google.greaze.definition.webservice.WebServiceResponse;
+import com.google.greaze.example.definition.model.Cart;
+import com.google.greaze.example.definition.model.Order;
+import com.google.greaze.example.definition.model.TypedKeys;
+import com.google.greaze.example.definition.service.SampleJsonService;
import com.google.greaze.webservice.server.RequestReceiver;
import com.google.greaze.webservice.server.ResponseSender;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.example.model.Cart;
-import com.google.gson.example.model.Order;
-import com.google.gson.example.model.TypedKeys;
-import com.google.gson.example.service.SampleJsonService;
/**
* A dispatcher for all the procedural calls
diff --git a/wsexample/server/src/main/java/com/google/gson/wsexample/server/RestDispatcher.java b/wsexample/server/src/main/java/com/google/gson/wsexample/server/RestDispatcher.java
index e20566ca..2b426e99 100644
--- a/wsexample/server/src/main/java/com/google/gson/wsexample/server/RestDispatcher.java
+++ b/wsexample/server/src/main/java/com/google/gson/wsexample/server/RestDispatcher.java
@@ -26,6 +26,9 @@ import com.google.greaze.definition.rest.RestCallSpec;
import com.google.greaze.definition.rest.RestRequest;
import com.google.greaze.definition.rest.RestResponse;
import com.google.greaze.definition.rest.ValueBasedId;
+import com.google.greaze.example.definition.model.Cart;
+import com.google.greaze.example.definition.model.Order;
+import com.google.greaze.example.definition.service.ServicePaths;
import com.google.greaze.rest.server.Repository;
import com.google.greaze.rest.server.RepositoryInMemory;
import com.google.greaze.rest.server.ResponseBuilderMap;
@@ -34,9 +37,6 @@ import com.google.greaze.rest.server.RestResponseBuilder;
import com.google.greaze.rest.server.RestResponseSender;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.example.model.Cart;
-import com.google.gson.example.model.Order;
-import com.google.gson.example.service.ServicePaths;
/**
* A dispatcher for all the REST requests