diff --git a/CHANGELOG.md b/CHANGELOG.md index 43f4811..4953412 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,33 @@ -# 0.3.0-beta1 +# CHANGELOG + +## 0.5.0-beta.5 + +Raise error in case of calling a non existing method ([commit 77cf177](https://github.com/lula/ngx-soap/commit/77cf1772c4d042872b3326b28993bcbb0a5182c4)) + +## 0.5.0-beta.4 + +Use Angular HttpClient. +Observables used wherever possible. + +this.soap.createClient('assets/calculator.wsdl').subscribe(client => this.client = client); + +(this.client).Add(body).subscribe((res: ISoapMethodResponse) => this.message = res.result.AddResult); + +this.client.call('Add', body).subscribe((res: ISoapMethodResponse) => this.message = res.result.AddResult); + +## 0.3.0-beta1 + Project recreated with Angualr 6 CLI. ... -# 0.2.2-beta6 +## 0.2.2-beta6 Call operation with client method. -# 0.2.2-beta3 +## 0.2.2-beta3 + ### Breaking Changes + Web Service operations have no callback anymore. Callback has been replaced by a Promise. Before: @@ -20,8 +40,10 @@ After: // or (client as any).Add(body).then((operation: Operation) => ... ) -# 0.2.1 +## 0.2.1 + AOT compilation fixes (issue #1) -# 0.1.4 +## 0.1.4 + Initial version diff --git a/projects/ngx-soap/README.md b/projects/ngx-soap/README.md index 5ba4d13..9b3aeb9 100644 --- a/projects/ngx-soap/README.md +++ b/projects/ngx-soap/README.md @@ -8,21 +8,47 @@ Project has been recreated from scratch with Angualr 6 CLI. 1. install ngx-soap and dependencies - `npm install --save ngx-soap buffer concat-stream core-js crypto-browserify events lodash sax stream uuid` -2. Add NgxSoapModule to your app module like: + `npm install --save ngx-soap` + + `npm install --save buffer concat-stream core-js crypto-js events lodash sax stream uuid` + +2. Add NgxSoapModule to your app module + ``` import { NgxSoapModule } from 'ngx-soap'; ... @NgModule({ - imports: [ NgxSoapModule, ... ] + imports: [ ..., NgxSoapModule, ... ] ... ``` + +3. Inject NgxSoapService in your component: -## Local tests - -1. `git clone -b angular6-cli-ilb https://github.com/lula/ngx-soap.git` -2. `cd ngx-soap && npm install` -3. `ng build ngx-soap` -4. `ng serve` - -See example app under `src/app` \ No newline at end of file + ``` + ... + import { NgxSoapService, Client, ISoapMethodResponse } from 'ngx-soap'; + ... + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + client: Client; + intA = 2; + intB = 3; + + constructor(private soap: NgxSoapService) { + this.soap.createClient('assets/calculator.wsdl').subscribe(client => this.client = client); + } + + sum() { + const body = { + intA: this.intA, + intB: this.intB + }; + (this.client).Add(body).subscribe((res: ISoapMethodResponse) => this.message = res.result.AddResult); + } + } + ``` diff --git a/projects/ngx-soap/package.json b/projects/ngx-soap/package.json index a8d0d11..e1701ee 100644 --- a/projects/ngx-soap/package.json +++ b/projects/ngx-soap/package.json @@ -1,6 +1,6 @@ { "name": "ngx-soap", - "version": "0.5.0-beta.4", + "version": "0.5.0-beta.5", "peerDependencies": { "@angular/common": "^6.0.0-rc.0 || ^6.0.0", "@angular/core": "^6.0.0-rc.0 || ^6.0.0",