diff --git a/guest/webservices/rest-client/WebContent/META-INF/MANIFEST.MF b/guest/webservices/rest-client/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..254272e1c0
--- /dev/null
+++ b/guest/webservices/rest-client/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/guest/webservices/rest-client/pom.xml b/guest/webservices/rest-client/pom.xml
new file mode 100644
index 0000000000..af03ac1948
--- /dev/null
+++ b/guest/webservices/rest-client/pom.xml
@@ -0,0 +1,27 @@
+
+ 4.0.0
+ com.stackify
+ rest-client
+ 0.0.1-SNAPSHOT
+ war
+
+
+
+ maven-compiler-plugin
+ 3.5
+
+ 1.8
+ 1.8
+
+
+
+ maven-war-plugin
+ 2.6
+
+ WebContent
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/guest/webservices/rest-client/rest-client/.angular-cli.json b/guest/webservices/rest-client/rest-client/.angular-cli.json
new file mode 100644
index 0000000000..5d1839d374
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/.angular-cli.json
@@ -0,0 +1,57 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "project": {
+ "name": "rest-client"
+ },
+ "apps": [
+ {
+ "root": "src",
+ "outDir": "dist",
+ "assets": [
+ "assets",
+ "favicon.ico"
+ ],
+ "index": "index.html",
+ "main": "main.ts",
+ "polyfills": "polyfills.ts",
+ "test": "test.ts",
+ "tsconfig": "tsconfig.app.json",
+ "testTsconfig": "tsconfig.spec.json",
+ "prefix": "app",
+ "styles": [
+ "styles.css"
+ ],
+ "scripts": [],
+ "environmentSource": "environments/environment.ts",
+ "environments": {
+ "dev": "environments/environment.ts",
+ "prod": "environments/environment.prod.ts"
+ }
+ }
+ ],
+ "e2e": {
+ "protractor": {
+ "config": "./protractor.conf.js"
+ }
+ },
+ "lint": [
+ {
+ "project": "src/tsconfig.app.json"
+ },
+ {
+ "project": "src/tsconfig.spec.json"
+ },
+ {
+ "project": "e2e/tsconfig.e2e.json"
+ }
+ ],
+ "test": {
+ "karma": {
+ "config": "./karma.conf.js"
+ }
+ },
+ "defaults": {
+ "styleExt": "css",
+ "component": {}
+ }
+}
diff --git a/guest/webservices/rest-client/rest-client/.editorconfig b/guest/webservices/rest-client/rest-client/.editorconfig
new file mode 100644
index 0000000000..6e87a003da
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/.editorconfig
@@ -0,0 +1,13 @@
+# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/guest/webservices/rest-client/rest-client/.gitignore b/guest/webservices/rest-client/rest-client/.gitignore
new file mode 100644
index 0000000000..54bfd2001e
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/.gitignore
@@ -0,0 +1,42 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+testem.log
+/typings
+
+# e2e
+/e2e/*.js
+/e2e/*.map
+
+# System Files
+.DS_Store
+Thumbs.db
diff --git a/guest/webservices/rest-client/rest-client/README.md b/guest/webservices/rest-client/rest-client/README.md
new file mode 100644
index 0000000000..b33d171f3c
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/README.md
@@ -0,0 +1,28 @@
+# RestClient
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.1.3.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
+Before running the tests make sure you are serving the app via `ng serve`.
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
diff --git a/guest/webservices/rest-client/rest-client/e2e/app.e2e-spec.ts b/guest/webservices/rest-client/rest-client/e2e/app.e2e-spec.ts
new file mode 100644
index 0000000000..2eb6dade08
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/e2e/app.e2e-spec.ts
@@ -0,0 +1,14 @@
+import { RestClientPage } from './app.po';
+
+describe('rest-client App', () => {
+ let page: RestClientPage;
+
+ beforeEach(() => {
+ page = new RestClientPage();
+ });
+
+ it('should display welcome message', () => {
+ page.navigateTo();
+ expect(page.getParagraphText()).toEqual('Welcome to app!!');
+ });
+});
diff --git a/guest/webservices/rest-client/rest-client/e2e/app.po.ts b/guest/webservices/rest-client/rest-client/e2e/app.po.ts
new file mode 100644
index 0000000000..1e111a7ff6
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/e2e/app.po.ts
@@ -0,0 +1,11 @@
+import { browser, by, element } from 'protractor';
+
+export class RestClientPage {
+ navigateTo() {
+ return browser.get('/');
+ }
+
+ getParagraphText() {
+ return element(by.css('app-root h1')).getText();
+ }
+}
diff --git a/guest/webservices/rest-client/rest-client/e2e/tsconfig.e2e.json b/guest/webservices/rest-client/rest-client/e2e/tsconfig.e2e.json
new file mode 100644
index 0000000000..e2a9a2fc77
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/e2e/tsconfig.e2e.json
@@ -0,0 +1,12 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/e2e",
+ "module": "commonjs",
+ "target": "es5",
+ "types": [
+ "jasmine",
+ "node"
+ ]
+ }
+}
diff --git a/guest/webservices/rest-client/rest-client/karma.conf.js b/guest/webservices/rest-client/rest-client/karma.conf.js
new file mode 100644
index 0000000000..4d9ab9d948
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/karma.conf.js
@@ -0,0 +1,33 @@
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/0.13/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['jasmine', '@angular/cli'],
+ plugins: [
+ require('karma-jasmine'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('karma-coverage-istanbul-reporter'),
+ require('@angular/cli/plugins/karma')
+ ],
+ client:{
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
+ },
+ coverageIstanbulReporter: {
+ reports: [ 'html', 'lcovonly' ],
+ fixWebpackSourcePaths: true
+ },
+ angularCli: {
+ environment: 'dev'
+ },
+ reporters: ['progress', 'kjhtml'],
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false
+ });
+};
diff --git a/guest/webservices/rest-client/rest-client/package.json b/guest/webservices/rest-client/rest-client/package.json
new file mode 100644
index 0000000000..b10090830c
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "rest-client",
+ "version": "0.0.0",
+ "license": "MIT",
+ "scripts": {
+ "ng": "ng",
+ "start": "ng serve",
+ "build": "ng build",
+ "test": "ng test",
+ "lint": "ng lint",
+ "e2e": "ng e2e"
+ },
+ "private": true,
+ "dependencies": {
+ "@angular/animations": "^4.0.0",
+ "@angular/common": "^4.0.0",
+ "@angular/compiler": "^4.0.0",
+ "@angular/core": "^4.0.0",
+ "@angular/forms": "^4.0.0",
+ "@angular/http": "^4.0.0",
+ "@angular/platform-browser": "^4.0.0",
+ "@angular/platform-browser-dynamic": "^4.0.0",
+ "@angular/router": "^4.0.0",
+ "core-js": "^2.4.1",
+ "rxjs": "^5.1.0",
+ "zone.js": "^0.8.4"
+ },
+ "devDependencies": {
+ "@angular/cli": "1.1.3",
+ "@angular/compiler-cli": "^4.0.0",
+ "@angular/language-service": "^4.0.0",
+ "@types/jasmine": "2.5.45",
+ "@types/node": "~6.0.60",
+ "codelyzer": "~3.0.1",
+ "jasmine-core": "~2.6.2",
+ "jasmine-spec-reporter": "~4.1.0",
+ "karma": "~1.7.0",
+ "karma-chrome-launcher": "~2.1.1",
+ "karma-cli": "~1.0.1",
+ "karma-coverage-istanbul-reporter": "^1.2.1",
+ "karma-jasmine": "~1.1.0",
+ "karma-jasmine-html-reporter": "^0.2.2",
+ "protractor": "~5.1.2",
+ "ts-node": "~3.0.4",
+ "tslint": "~5.3.2",
+ "typescript": "~2.3.3"
+ }
+}
diff --git a/guest/webservices/rest-client/rest-client/protractor.conf.js b/guest/webservices/rest-client/rest-client/protractor.conf.js
new file mode 100644
index 0000000000..7ee3b5ee86
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/protractor.conf.js
@@ -0,0 +1,28 @@
+// Protractor configuration file, see link for more information
+// https://github.com/angular/protractor/blob/master/lib/config.ts
+
+const { SpecReporter } = require('jasmine-spec-reporter');
+
+exports.config = {
+ allScriptsTimeout: 11000,
+ specs: [
+ './e2e/**/*.e2e-spec.ts'
+ ],
+ capabilities: {
+ 'browserName': 'chrome'
+ },
+ directConnect: true,
+ baseUrl: 'http://localhost:4200/',
+ framework: 'jasmine',
+ jasmineNodeOpts: {
+ showColors: true,
+ defaultTimeoutInterval: 30000,
+ print: function() {}
+ },
+ onPrepare() {
+ require('ts-node').register({
+ project: 'e2e/tsconfig.e2e.json'
+ });
+ jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ }
+};
diff --git a/guest/webservices/rest-client/rest-client/src/app/app.component.css b/guest/webservices/rest-client/rest-client/src/app/app.component.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/guest/webservices/rest-client/rest-client/src/app/app.component.html b/guest/webservices/rest-client/rest-client/src/app/app.component.html
new file mode 100644
index 0000000000..94dc25088b
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/app.component.html
@@ -0,0 +1,13 @@
+
+
+
+ Angular QuickStart
+
+
+
+
+
+
+ loading users component
+
+
\ No newline at end of file
diff --git a/guest/webservices/rest-client/rest-client/src/app/app.component.spec.ts b/guest/webservices/rest-client/rest-client/src/app/app.component.spec.ts
new file mode 100644
index 0000000000..7d2799ceb6
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/app.component.spec.ts
@@ -0,0 +1,32 @@
+import { TestBed, async } from '@angular/core/testing';
+
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [
+ AppComponent
+ ],
+ }).compileComponents();
+ }));
+
+ it('should create the app', async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app).toBeTruthy();
+ }));
+
+ it(`should have as title 'app'`, async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app.title).toEqual('app');
+ }));
+
+ it('should render title in a h1 tag', async(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.debugElement.nativeElement;
+ expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!!');
+ }));
+});
diff --git a/guest/webservices/rest-client/rest-client/src/app/app.component.ts b/guest/webservices/rest-client/rest-client/src/app/app.component.ts
new file mode 100644
index 0000000000..7b0f672831
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/app.component.ts
@@ -0,0 +1,10 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css']
+})
+export class AppComponent {
+ title = 'app';
+}
diff --git a/guest/webservices/rest-client/rest-client/src/app/app.module.ts b/guest/webservices/rest-client/rest-client/src/app/app.module.ts
new file mode 100644
index 0000000000..fe90536b1e
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/app.module.ts
@@ -0,0 +1,25 @@
+import { BrowserModule } from '@angular/platform-browser';
+import { NgModule } from '@angular/core';
+import { HttpModule } from '@angular/http';
+import { FormsModule } from '@angular/forms';
+
+import { AppComponent } from './app.component';
+import { UsersComponent } from './users.component';
+import { RouterModule } from '@angular/router';
+
+@NgModule({
+ declarations: [
+ AppComponent,
+ UsersComponent
+ ],
+ imports: [
+ BrowserModule,
+ HttpModule,
+ FormsModule,
+ RouterModule.forRoot([
+ { path: '', component: AppComponent },
+ { path: 'users', component: UsersComponent }])],
+ providers: [],
+ bootstrap: [AppComponent]
+})
+export class AppModule { }
diff --git a/guest/webservices/rest-client/rest-client/src/app/app.service.ts b/guest/webservices/rest-client/rest-client/src/app/app.service.ts
new file mode 100644
index 0000000000..cf57aecbc9
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/app.service.ts
@@ -0,0 +1,36 @@
+import {Injectable} from '@angular/core';
+import { Http, Response, Headers, RequestOptions } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+export class User {
+ constructor(
+ public email: string,
+ public name: string) { }
+}
+
+@Injectable()
+export class UserService {
+ constructor(
+ private _http: Http){}
+
+ url = 'http://localhost:8080/rest-server/users';
+
+ addUser(user){
+ let headers = new Headers({'Content-Type': 'application/json'});
+ let options = new RequestOptions({ headers: headers});
+
+ return this._http.post(this.url, JSON.stringify(user), options)
+ .map(
+ (_response: Response) => {
+ return _response;
+ },
+ err => alert('Error adding user'));
+ }
+
+ getUsers() {
+ return this._http.get(this.url)
+ .map((_response: Response) => {
+ return _response.json();
+ });
+ }
+}
\ No newline at end of file
diff --git a/guest/webservices/rest-client/rest-client/src/app/users.component.html b/guest/webservices/rest-client/rest-client/src/app/users.component.html
new file mode 100644
index 0000000000..bbf9289080
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/users.component.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
{{user.email}}
+
+
{{user.name}}
+
+
+
diff --git a/guest/webservices/rest-client/rest-client/src/app/users.component.ts b/guest/webservices/rest-client/rest-client/src/app/users.component.ts
new file mode 100644
index 0000000000..6c5a383848
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/app/users.component.ts
@@ -0,0 +1,39 @@
+import { Component } from '@angular/core';
+import {UserService, User} from './app.service';
+
+@Component({
+ selector: 'users-page',
+ providers: [UserService],
+ templateUrl: './users.component.html',
+ styleUrls: ['./app.component.css']
+})
+export class UsersComponent {
+ title = 'Users';
+
+ constructor(
+ private _service:UserService){}
+
+ public user = {email: "", name: ""};
+ public res=[];
+
+ addUser() {
+ this._service.addUser(this.user)
+ .subscribe( () => this.getUsers());
+ }
+
+ getUsers() {
+ this._service.getUsers()
+ .subscribe(
+ users => {
+ this.res=[];
+ users.forEach(usr => {
+ this.res.push(
+ new User(
+ usr.email,
+ usr.name
+ )
+ )
+ });
+ });
+ }
+}
diff --git a/guest/webservices/rest-client/rest-client/src/assets/.gitkeep b/guest/webservices/rest-client/rest-client/src/assets/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/guest/webservices/rest-client/rest-client/src/environments/environment.prod.ts b/guest/webservices/rest-client/rest-client/src/environments/environment.prod.ts
new file mode 100644
index 0000000000..3612073bc3
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/environments/environment.prod.ts
@@ -0,0 +1,3 @@
+export const environment = {
+ production: true
+};
diff --git a/guest/webservices/rest-client/rest-client/src/environments/environment.ts b/guest/webservices/rest-client/rest-client/src/environments/environment.ts
new file mode 100644
index 0000000000..b7f639aeca
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/environments/environment.ts
@@ -0,0 +1,8 @@
+// The file contents for the current environment will overwrite these during build.
+// The build system defaults to the dev environment which uses `environment.ts`, but if you do
+// `ng build --env=prod` then `environment.prod.ts` will be used instead.
+// The list of which env maps to which file can be found in `.angular-cli.json`.
+
+export const environment = {
+ production: false
+};
diff --git a/guest/webservices/rest-client/rest-client/src/favicon.ico b/guest/webservices/rest-client/rest-client/src/favicon.ico
new file mode 100644
index 0000000000..8081c7ceaf
Binary files /dev/null and b/guest/webservices/rest-client/rest-client/src/favicon.ico differ
diff --git a/guest/webservices/rest-client/rest-client/src/index.html b/guest/webservices/rest-client/rest-client/src/index.html
new file mode 100644
index 0000000000..5714e185ca
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+ RestClient
+
+
+
+
+
+
+
+
+
diff --git a/guest/webservices/rest-client/rest-client/src/main.ts b/guest/webservices/rest-client/rest-client/src/main.ts
new file mode 100644
index 0000000000..a9ca1caf8c
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/main.ts
@@ -0,0 +1,11 @@
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+ enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule);
diff --git a/guest/webservices/rest-client/rest-client/src/polyfills.ts b/guest/webservices/rest-client/rest-client/src/polyfills.ts
new file mode 100644
index 0000000000..fd01cc9f1d
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/polyfills.ts
@@ -0,0 +1,73 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/** IE9, IE10 and IE11 requires all of the following polyfills. **/
+// import 'core-js/es6/symbol';
+// import 'core-js/es6/object';
+// import 'core-js/es6/function';
+// import 'core-js/es6/parse-int';
+// import 'core-js/es6/parse-float';
+// import 'core-js/es6/number';
+// import 'core-js/es6/math';
+// import 'core-js/es6/string';
+// import 'core-js/es6/date';
+// import 'core-js/es6/array';
+// import 'core-js/es6/regexp';
+// import 'core-js/es6/map';
+// import 'core-js/es6/weak-map';
+// import 'core-js/es6/set';
+
+/** IE10 and IE11 requires the following for NgClass support on SVG elements */
+// import 'classlist.js'; // Run `npm install --save classlist.js`.
+
+/** IE10 and IE11 requires the following to support `@angular/animation`. */
+// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
+
+
+/** Evergreen browsers require these. **/
+import 'core-js/es6/reflect';
+import 'core-js/es7/reflect';
+
+
+/** ALL Firefox browsers require the following to support `@angular/animation`. **/
+// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
+
+
+
+/***************************************************************************************************
+ * Zone JS is required by Angular itself.
+ */
+import 'zone.js/dist/zone'; // Included with Angular CLI.
+
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
+
+/**
+ * Date, currency, decimal and percent pipes.
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
+ */
+// import 'intl'; // Run `npm install --save intl`.
+/**
+ * Need to import at least one locale-data with intl.
+ */
+// import 'intl/locale-data/jsonp/en';
diff --git a/guest/webservices/rest-client/rest-client/src/styles.css b/guest/webservices/rest-client/rest-client/src/styles.css
new file mode 100644
index 0000000000..90d4ee0072
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/styles.css
@@ -0,0 +1 @@
+/* You can add global styles to this file, and also import other style files */
diff --git a/guest/webservices/rest-client/rest-client/src/test.ts b/guest/webservices/rest-client/rest-client/src/test.ts
new file mode 100644
index 0000000000..cd612eeb0e
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/test.ts
@@ -0,0 +1,32 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/dist/long-stack-trace-zone';
+import 'zone.js/dist/proxy.js';
+import 'zone.js/dist/sync-test';
+import 'zone.js/dist/jasmine-patch';
+import 'zone.js/dist/async-test';
+import 'zone.js/dist/fake-async-test';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
+declare const __karma__: any;
+declare const require: any;
+
+// Prevent Karma from running prematurely.
+__karma__.loaded = function () {};
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting()
+);
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
+// Finally, start Karma to run the tests.
+__karma__.start();
diff --git a/guest/webservices/rest-client/rest-client/src/tsconfig.app.json b/guest/webservices/rest-client/rest-client/src/tsconfig.app.json
new file mode 100644
index 0000000000..5e2507db58
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/tsconfig.app.json
@@ -0,0 +1,13 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/app",
+ "module": "es2015",
+ "baseUrl": "",
+ "types": []
+ },
+ "exclude": [
+ "test.ts",
+ "**/*.spec.ts"
+ ]
+}
diff --git a/guest/webservices/rest-client/rest-client/src/tsconfig.spec.json b/guest/webservices/rest-client/rest-client/src/tsconfig.spec.json
new file mode 100644
index 0000000000..510e3f1fda
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/tsconfig.spec.json
@@ -0,0 +1,20 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/spec",
+ "module": "commonjs",
+ "target": "es5",
+ "baseUrl": "",
+ "types": [
+ "jasmine",
+ "node"
+ ]
+ },
+ "files": [
+ "test.ts"
+ ],
+ "include": [
+ "**/*.spec.ts",
+ "**/*.d.ts"
+ ]
+}
diff --git a/guest/webservices/rest-client/rest-client/src/typings.d.ts b/guest/webservices/rest-client/rest-client/src/typings.d.ts
new file mode 100644
index 0000000000..ef5c7bd620
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/src/typings.d.ts
@@ -0,0 +1,5 @@
+/* SystemJS module definition */
+declare var module: NodeModule;
+interface NodeModule {
+ id: string;
+}
diff --git a/guest/webservices/rest-client/rest-client/tsconfig.json b/guest/webservices/rest-client/rest-client/tsconfig.json
new file mode 100644
index 0000000000..a35a8ee3a4
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compileOnSave": false,
+ "compilerOptions": {
+ "outDir": "./dist/out-tsc",
+ "baseUrl": "src",
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "target": "es5",
+ "typeRoots": [
+ "node_modules/@types"
+ ],
+ "lib": [
+ "es2016",
+ "dom"
+ ]
+ }
+}
diff --git a/guest/webservices/rest-client/rest-client/tslint.json b/guest/webservices/rest-client/rest-client/tslint.json
new file mode 100644
index 0000000000..dd117b3871
--- /dev/null
+++ b/guest/webservices/rest-client/rest-client/tslint.json
@@ -0,0 +1,135 @@
+{
+ "rulesDirectory": [
+ "node_modules/codelyzer"
+ ],
+ "rules": {
+ "arrow-return-shorthand": true,
+ "callable-types": true,
+ "class-name": true,
+ "comment-format": [
+ true,
+ "check-space"
+ ],
+ "curly": true,
+ "eofline": true,
+ "forin": true,
+ "import-blacklist": [
+ true,
+ "rxjs"
+ ],
+ "import-spacing": true,
+ "indent": [
+ true,
+ "spaces"
+ ],
+ "interface-over-type-literal": true,
+ "label-position": true,
+ "max-line-length": [
+ true,
+ 140
+ ],
+ "member-access": false,
+ "member-ordering": [
+ true,
+ "static-before-instance",
+ "variables-before-functions"
+ ],
+ "no-arg": true,
+ "no-bitwise": true,
+ "no-console": [
+ true,
+ "debug",
+ "info",
+ "time",
+ "timeEnd",
+ "trace"
+ ],
+ "no-construct": true,
+ "no-debugger": true,
+ "no-duplicate-super": true,
+ "no-empty": false,
+ "no-empty-interface": true,
+ "no-eval": true,
+ "no-inferrable-types": [
+ true,
+ "ignore-params"
+ ],
+ "no-misused-new": true,
+ "no-non-null-assertion": true,
+ "no-shadowed-variable": true,
+ "no-string-literal": false,
+ "no-string-throw": true,
+ "no-switch-case-fall-through": true,
+ "no-trailing-whitespace": true,
+ "no-unnecessary-initializer": true,
+ "no-unused-expression": true,
+ "no-use-before-declare": true,
+ "no-var-keyword": true,
+ "object-literal-sort-keys": false,
+ "one-line": [
+ true,
+ "check-open-brace",
+ "check-catch",
+ "check-else",
+ "check-whitespace"
+ ],
+ "prefer-const": true,
+ "quotemark": [
+ true,
+ "single"
+ ],
+ "radix": true,
+ "semicolon": [
+ "always"
+ ],
+ "triple-equals": [
+ true,
+ "allow-null-check"
+ ],
+ "typedef-whitespace": [
+ true,
+ {
+ "call-signature": "nospace",
+ "index-signature": "nospace",
+ "parameter": "nospace",
+ "property-declaration": "nospace",
+ "variable-declaration": "nospace"
+ }
+ ],
+ "typeof-compare": true,
+ "unified-signatures": true,
+ "variable-name": false,
+ "whitespace": [
+ true,
+ "check-branch",
+ "check-decl",
+ "check-operator",
+ "check-separator",
+ "check-type"
+ ],
+ "directive-selector": [
+ true,
+ "attribute",
+ "app",
+ "camelCase"
+ ],
+ "component-selector": [
+ true,
+ "element",
+ "app",
+ "kebab-case"
+ ],
+ "use-input-property-decorator": true,
+ "use-output-property-decorator": true,
+ "use-host-property-decorator": true,
+ "no-input-rename": true,
+ "no-output-rename": true,
+ "use-life-cycle-interface": true,
+ "use-pipe-transform-interface": true,
+ "component-class-suffix": true,
+ "directive-class-suffix": true,
+ "no-access-missing-member": true,
+ "templates-use-public": true,
+ "invoke-injectable": true
+ }
+}
diff --git a/guest/webservices/rest-server/WebContent/META-INF/MANIFEST.MF b/guest/webservices/rest-server/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..254272e1c0
--- /dev/null
+++ b/guest/webservices/rest-server/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/guest/webservices/rest-server/WebContent/WEB-INF/web.xml b/guest/webservices/rest-server/WebContent/WEB-INF/web.xml
new file mode 100644
index 0000000000..46b173c59a
--- /dev/null
+++ b/guest/webservices/rest-server/WebContent/WEB-INF/web.xml
@@ -0,0 +1,20 @@
+
+
+ rest-server
+
+ rest-server
+ org.glassfish.jersey.servlet.ServletContainer
+
+ javax.ws.rs.Application
+ com.stackify.ApplicationInitializer
+
+ 1
+
+
+ rest-server
+ /*
+
+
\ No newline at end of file
diff --git a/guest/webservices/rest-server/pom.xml b/guest/webservices/rest-server/pom.xml
new file mode 100644
index 0000000000..350e7eb9c9
--- /dev/null
+++ b/guest/webservices/rest-server/pom.xml
@@ -0,0 +1,51 @@
+
+ 4.0.0
+ com.stackify
+ rest-server
+ 0.0.1-SNAPSHOT
+ war
+
+
+
+ org.glassfish.jersey.containers
+ jersey-container-servlet
+ 2.25.1
+
+
+ org.glassfish.jersey.media
+ jersey-media-moxy
+ 2.25.1
+
+
+ io.rest-assured
+ rest-assured
+ 3.0.3
+
+
+ junit
+ junit
+ 4.12
+
+
+
+
+
+
+ maven-compiler-plugin
+ 3.5.1
+
+ 1.8
+ 1.8
+
+
+
+ maven-war-plugin
+ 3.0.0
+
+ WebContent
+
+
+
+
+
\ No newline at end of file
diff --git a/guest/webservices/rest-server/src/main/java/com/stackify/ApplicationInitializer.java b/guest/webservices/rest-server/src/main/java/com/stackify/ApplicationInitializer.java
new file mode 100644
index 0000000000..6d864e859e
--- /dev/null
+++ b/guest/webservices/rest-server/src/main/java/com/stackify/ApplicationInitializer.java
@@ -0,0 +1,9 @@
+package com.stackify;
+
+import org.glassfish.jersey.server.ResourceConfig;
+
+public class ApplicationInitializer extends ResourceConfig {
+ public ApplicationInitializer() {
+ packages("com.stackify.services");
+ }
+}
diff --git a/guest/webservices/rest-server/src/main/java/com/stackify/models/User.java b/guest/webservices/rest-server/src/main/java/com/stackify/models/User.java
new file mode 100644
index 0000000000..8c8073357d
--- /dev/null
+++ b/guest/webservices/rest-server/src/main/java/com/stackify/models/User.java
@@ -0,0 +1,43 @@
+package com.stackify.models;
+
+import javax.ws.rs.core.Link;
+
+public class User {
+ private String email;
+ private String name;
+ private Link link;
+
+ public User() {
+ }
+
+ public User(String email, String name) {
+ super();
+ this.email = email;
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Link getLink() {
+ return link;
+ }
+
+ public void setLink(Link link) {
+ this.link = link;
+ }
+
+}
diff --git a/guest/webservices/rest-server/src/main/java/com/stackify/services/CorsFilter.java b/guest/webservices/rest-server/src/main/java/com/stackify/services/CorsFilter.java
new file mode 100644
index 0000000000..267aa6fd61
--- /dev/null
+++ b/guest/webservices/rest-server/src/main/java/com/stackify/services/CorsFilter.java
@@ -0,0 +1,19 @@
+package com.stackify.services;
+
+import java.io.IOException;
+
+import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.container.ContainerResponseContext;
+import javax.ws.rs.container.ContainerResponseFilter;
+import javax.ws.rs.ext.Provider;
+
+@Provider
+public class CorsFilter implements ContainerResponseFilter {
+
+ @Override
+ public void filter(final ContainerRequestContext requestContext,
+ final ContainerResponseContext response) throws IOException {
+ response.getHeaders().add("Access-Control-Allow-Origin", "*");
+ response.getHeaders().add("Access-Control-Allow-Headers", "origin, content-type, accept");
+ }
+}
diff --git a/guest/webservices/rest-server/src/main/java/com/stackify/services/UserService.java b/guest/webservices/rest-server/src/main/java/com/stackify/services/UserService.java
new file mode 100644
index 0000000000..e78ed4627a
--- /dev/null
+++ b/guest/webservices/rest-server/src/main/java/com/stackify/services/UserService.java
@@ -0,0 +1,33 @@
+package com.stackify.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import com.stackify.models.User;
+
+@Path("/users")
+public class UserService {
+ private static List users = new ArrayList<>();
+
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Response addUser(User user) {
+ users.add(user);
+ return Response.ok()
+ .build();
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public List getUsers() {
+ return users;
+ }
+}
diff --git a/guest/webservices/rest-server/src/test/java/com/stackify/services/UserServiceTest.java b/guest/webservices/rest-server/src/test/java/com/stackify/services/UserServiceTest.java
new file mode 100644
index 0000000000..064951fbbe
--- /dev/null
+++ b/guest/webservices/rest-server/src/test/java/com/stackify/services/UserServiceTest.java
@@ -0,0 +1,34 @@
+package com.stackify.services;
+
+import org.junit.Test;
+
+import io.restassured.RestAssured;
+import static io.restassured.RestAssured.*;
+import static org.hamcrest.CoreMatchers.*;
+
+public class UserServiceTest {
+ @Test
+ public void whenAddUser_thenGetUserOk() {
+ RestAssured.baseURI = "http://localhost:8080/rest-server";
+
+ //@formatter:off
+
+ String json = "{\"email\":\"john@gmail.com\",\"name\":\"John\"}";
+ given()
+ .contentType("application/json")
+ .body(json)
+ .when()
+ .post("/users")
+ .then()
+ .statusCode(200);
+
+ when()
+ .get("/users")
+ .then()
+ .contentType("application/json")
+ .body("name", hasItem("John"))
+ .body("email", hasItem("john@gmail.com"));
+
+ //@formatter:on
+ }
+}
diff --git a/guest/webservices/soap_client/src/main/java/com/stackify/JAXWSClient.java b/guest/webservices/soap_client/src/main/java/com/stackify/JAXWSClient.java
new file mode 100644
index 0000000000..5542fbde20
--- /dev/null
+++ b/guest/webservices/soap_client/src/main/java/com/stackify/JAXWSClient.java
@@ -0,0 +1,19 @@
+package com.stackify;
+
+import com.stackify.services.DefaultUserImplService;
+import com.stackify.services.User;
+import com.stackify.services.UserService;
+import com.stackify.services.Users;
+
+public class JAXWSClient {
+ public static void main(String[] args) {
+ DefaultUserImplService service = new DefaultUserImplService();
+ User user = new User();
+ user.setEmail("john@gmail.com");
+ user.setName("John");
+ UserService port = service.getDefaultUserImplPort();
+ port.addUser(user);
+ Users users = port.getUsers();
+ System.out.println(users.getUsers().iterator().next().getName());
+ }
+}
diff --git a/guest/webservices/soap_client/src/main/java/com/stackify/services/DefaultUserImplService.java b/guest/webservices/soap_client/src/main/java/com/stackify/services/DefaultUserImplService.java
new file mode 100644
index 0000000000..821b969166
--- /dev/null
+++ b/guest/webservices/soap_client/src/main/java/com/stackify/services/DefaultUserImplService.java
@@ -0,0 +1,94 @@
+
+package com.stackify.services;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ *
+ */
+@WebServiceClient(name = "DefaultUserImplService", targetNamespace = "http://services.stackify.com/", wsdlLocation = "http://localhost:8080/users?wsdl")
+public class DefaultUserImplService
+ extends Service
+{
+
+ private final static URL DEFAULTUSERIMPLSERVICE_WSDL_LOCATION;
+ private final static WebServiceException DEFAULTUSERIMPLSERVICE_EXCEPTION;
+ private final static QName DEFAULTUSERIMPLSERVICE_QNAME = new QName("http://services.stackify.com/", "DefaultUserImplService");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new URL("http://localhost:8080/users?wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ DEFAULTUSERIMPLSERVICE_WSDL_LOCATION = url;
+ DEFAULTUSERIMPLSERVICE_EXCEPTION = e;
+ }
+
+ public DefaultUserImplService() {
+ super(__getWsdlLocation(), DEFAULTUSERIMPLSERVICE_QNAME);
+ }
+
+ public DefaultUserImplService(WebServiceFeature... features) {
+ super(__getWsdlLocation(), DEFAULTUSERIMPLSERVICE_QNAME, features);
+ }
+
+ public DefaultUserImplService(URL wsdlLocation) {
+ super(wsdlLocation, DEFAULTUSERIMPLSERVICE_QNAME);
+ }
+
+ public DefaultUserImplService(URL wsdlLocation, WebServiceFeature... features) {
+ super(wsdlLocation, DEFAULTUSERIMPLSERVICE_QNAME, features);
+ }
+
+ public DefaultUserImplService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public DefaultUserImplService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns UserService
+ */
+ @WebEndpoint(name = "DefaultUserImplPort")
+ public UserService getDefaultUserImplPort() {
+ return super.getPort(new QName("http://services.stackify.com/", "DefaultUserImplPort"), UserService.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values.
+ * @return
+ * returns UserService
+ */
+ @WebEndpoint(name = "DefaultUserImplPort")
+ public UserService getDefaultUserImplPort(WebServiceFeature... features) {
+ return super.getPort(new QName("http://services.stackify.com/", "DefaultUserImplPort"), UserService.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (DEFAULTUSERIMPLSERVICE_EXCEPTION!= null) {
+ throw DEFAULTUSERIMPLSERVICE_EXCEPTION;
+ }
+ return DEFAULTUSERIMPLSERVICE_WSDL_LOCATION;
+ }
+
+}
diff --git a/guest/webservices/soap_client/src/main/java/com/stackify/services/ObjectFactory.java b/guest/webservices/soap_client/src/main/java/com/stackify/services/ObjectFactory.java
new file mode 100644
index 0000000000..d992521d9f
--- /dev/null
+++ b/guest/webservices/soap_client/src/main/java/com/stackify/services/ObjectFactory.java
@@ -0,0 +1,48 @@
+
+package com.stackify.services;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.stackify.services package.
+ *
An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.stackify.services
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link User }
+ *
+ */
+ public User createUser() {
+ return new User();
+ }
+
+ /**
+ * Create an instance of {@link Users }
+ *
+ */
+ public Users createUsers() {
+ return new Users();
+ }
+
+}
diff --git a/guest/webservices/soap_client/src/main/java/com/stackify/services/User.java b/guest/webservices/soap_client/src/main/java/com/stackify/services/User.java
new file mode 100644
index 0000000000..d9d517f83d
--- /dev/null
+++ b/guest/webservices/soap_client/src/main/java/com/stackify/services/User.java
@@ -0,0 +1,87 @@
+
+package com.stackify.services;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for user complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "users", propOrder = {
+ "users"
+})
+public class Users {
+
+ @XmlElement(nillable = true)
+ protected List users;
+
+ /**
+ * Gets the value of the users property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the users property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *