https://github.com/lula/ngx-soap
Simple SOAP client for Angular
https://github.com/lula/ngx-soap
Last synced: 5 months ago
JSON representation
Simple SOAP client for Angular
- Host: GitHub
- URL: https://github.com/lula/ngx-soap
- Owner: lula
- License: mit
- Created: 2017-07-03T21:19:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:34:51.000Z (over 3 years ago)
- Last Synced: 2025-09-20T02:24:10.282Z (9 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.81 MB
- Stars: 66
- Watchers: 8
- Forks: 59
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ngx-soap
Simple SOAP client for Angular 6/10 based on amazing [node-soap](https://github.com/vpulim/node-soap).
Project has been recreated from scratch with Angualr 6 CLI.
## npm
1. install ngx-soap and dependencies
`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, ... ]
...
```
3. 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
};
(this.client).Add(body).subscribe((res: ISoapMethodResponse) => this.message = res.result.AddResult);
}
}
```
## Local development
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 test ngx-soap`
5. `ng serve --proxy-config proxy.conf.json`
See example app under `src/app`
## Contributors
[Andrei Bespamiatnov](https://github.com/AndreyBespamyatnov)