You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/02/12 10:10:03 UTC
svn commit: r1567572 -
/incubator/olingo/site/trunk/content/doc/tutorials/OlingoV2BasicClientSample.mdtext
Author: mibo
Date: Wed Feb 12 09:10:03 2014
New Revision: 1567572
URL: http://svn.apache.org/r1567572
Log:
CMS commit to olingo by mibo
Modified:
incubator/olingo/site/trunk/content/doc/tutorials/OlingoV2BasicClientSample.mdtext
Modified: incubator/olingo/site/trunk/content/doc/tutorials/OlingoV2BasicClientSample.mdtext
URL: http://svn.apache.org/viewvc/incubator/olingo/site/trunk/content/doc/tutorials/OlingoV2BasicClientSample.mdtext?rev=1567572&r1=1567571&r2=1567572&view=diff
==============================================================================
--- incubator/olingo/site/trunk/content/doc/tutorials/OlingoV2BasicClientSample.mdtext (original)
+++ incubator/olingo/site/trunk/content/doc/tutorials/OlingoV2BasicClientSample.mdtext Wed Feb 12 09:10:03 2014
@@ -23,11 +23,11 @@ Therefore it contains the main sections:
* [Client Quickstart Guide](#quickstart): Get a running sample client and server within a few minutes (Requirements at least *Java 7 Runtime* and *Maven 3*)
* [Explaining the Client](#start): The actual *How To* with explanation and sample code for following use cases:
- * [Read the Metadata](#readmetadata), [Read the Data](#readdata), [Create more Data](#createdata), [Update the Data](#updatedata) and [Delete the Data](#deletedata)
+ * [Read the Metadata](#readmetadata), [Read the Data](#readdata), [Create more Data](#createdata), [Update the Data](#updatedata) and [Delete the Data](#deletedata)
* [Run the Client](#run): After the *How To* the sample code from all samples can be put together and be executed against a Sample Service.
- * [Put the parts together](#together): A explanation and sample how before build client can be used
- * [Run Sample Client](#runsample): Show how to run the Sample Client against a Sample Service (Requirements at least *Java 7 Runtime* and *Maven 3*)
- * [Copy and Paste](#copypaste): Contains the complete sample code as *copy/paste* template (to build a Maven Project)
+ * [Put the parts together](#together): A explanation and sample how before build client can be used
+ * [Run Sample Client](#runsample): Show how to run the Sample Client against a Sample Service (Requirements at least *Java 7 Runtime* and *Maven 3*)
+ * [Copy and Paste](#copypaste): Contains the complete sample code as *copy/paste* template (to build a Maven Project)
<a name="quickstart"></a>
### Client Quickstart Guide
@@ -36,12 +36,12 @@ Therefore it just requires an installed
1. Start in some folder (e.g. `Quickstart`) which is called our `$ROOT` in the steps below.
1. Create sample Client project ([more details](#projectstructure))
- 2. Create project folder `ClientSample` (in `$ROOT`) and within create following folder structure: `./src/main/java/org/apache/olingo/sample/client` (e.g. `mkdir -p src/main/java/org/apache/olingo/sample/client/`).
- 3. In project folder (`ClientSample`) create file `pom.xml` and copy [this sample pom into](#pom).
- 4. In folder `./src/main/java/org/apache/olingo/sample/client` create file `OlingoSampleApp.java` and copy [the whole sample client into](#sampleclient).
- 5. In project folder `ClientSample` run `mvn` to build the project.
+ 2. Create project folder `ClientSample` (in `$ROOT`) and within create following folder structure: `./src/main/java/org/apache/olingo/sample/client` (e.g. `mkdir -p src/main/java/org/apache/olingo/sample/client/`).
+ 3. In project folder (`ClientSample`) create file `pom.xml` and copy [this sample pom into](#pom).
+ 4. In folder `./src/main/java/org/apache/olingo/sample/client` create file `OlingoSampleApp.java` and copy [the whole sample client into](#sampleclient).
+ 5. In project folder `ClientSample` run `mvn` to build the project.
1. Create and start sample Service ([more details](#sampleservice))
- 1. Go to `$ROOT` and create service project from archetype via
+ 1. Go to `$ROOT` and create service project from archetype via
`mvn archetype:generate \
-DinteractiveMode=false \
-Dversion=1.0.0-SNAPSHOT \
@@ -50,11 +50,10 @@ Therefore it just requires an installed
-DarchetypeGroupId=org.apache.olingo \
-DarchetypeArtifactId=olingo-odata2-sample-cars-annotation-archetype-incubating \
-DarchetypeVersion=1.1.0`
-
- 3. Go into from archetype created folder `my-car-service` and just run `mvn` to start server.
+ 3. Go into from archetype created folder `my-car-service` and just run `mvn` to start server.
4. Run `OlingoSampleApp` against sample Service ([more details](#runsample))
- 1. Go into sample project folder (`ClientSample`) and execute sample client via `java -cp target/OlingoSampleClient.jar org.apache.olingo.sample.client.OlingoSampleApp`. This starts a *Jetty Web Server* at [http://localhost:8080](http://localhost:8080).
- 2. Now the result of the *read metadata*, *read/create/update/delete data* calls is printed as well as the corresponding *JSON* requests and response body. Within the following section [Explaining the Client](#start) the therefore implemented client methods are shown and explained.
+ 1. Go into sample project folder (`ClientSample`) and execute sample client via `java -cp target/OlingoSampleClient.jar org.apache.olingo.sample.client.OlingoSampleApp`. This starts a *Jetty Web Server* at [http://localhost:8080](http://localhost:8080).
+ 2. Now the result of the *read metadata*, *read/create/update/delete data* calls is printed as well as the corresponding *JSON* requests and response body. Within the following section [Explaining the Client](#start) the therefore implemented client methods are shown and explained.
**Optional**
With running `mvn eclipse:eclipse` within the created sample client and sample server projects the necessary Eclipse project files will be generated so that both projects can easily imported into Eclipse (Eclipse -> *File* -> *Import...* *Import existing projects into workspace*).