ngx-soap-next
v0.16.3
Published
SOAP service for Angular
Downloads
19
Maintainers
Readme
ngx-soap-next
Simple SOAP client for Angular based on amazing node-soap.
Project has been recreated from scratch with Angular CLI.
Please be aware, this package version number will be equal to the corresponding Angular version 0.10.x = v10, 0.11.x = v11, ... 0.16.x = v16
npm
install ngx-soap and dependencies
npm install --save ngx-soap-next
npm install --save buffer concat-stream core-js crypto-js events lodash sax stream uuid
Add NgxSoapModule to your app module
import { NgxSoapModule } from 'ngx-soap'; ... @NgModule({ imports: [ ..., NgxSoapModule, ... ] ...
Inject NgxSoapService in your component:
... 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 }; (<any>this.client).Add(body).subscribe((res: ISoapMethodResponse) => this.message = res.result.AddResult); } }
Build and publish the lib (for maintainers)
Switch branch to a branch named after Angular version, f.e. 0.16.0 for all v16 updates. If branch doesn't exist - create it. Apply code changes in that branch. Then do:
npm run test:lib
npm run build:lib
- Confirm
npm run publish:dry-run
- Publish
npm run publish
Do not forget to bump the package version before the release. F.e., if this is another v16 change, bump minor version to 0.16.(X+1).
Local example development
git clone -b angular-cli-ilb https://github.com/seyfer/ngx-soap.git
cd ngx-soap && npm install
ng build ngx-soap
ng test ngx-soap
ng serve --proxy-config proxy.conf.json
See example app under src/app