ngx-soap is an impressive library that I recently utilized in a client project.
Below are the steps to effectively implement this library:
Step 1: Install ngx-soap and its dependencies
npm install --save ngx-soap
npm install --save buffer concat-stream core-js crypto-js events lodash sax stream uuid
Step 2:
import { NgxSoapModule } from 'ngx-soap';
...
@NgModule({
imports: [ ..., NgxSoapModule, ... ]
...
Step 3: Begin by injecting NgxSoapService into 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;
constructor(private soap: NgxSoapService) {
this.soap.createClient('http://123.618.196.10/WCFTicket/Service1.svc?wsdl').subscribe(client => this.client = client);
}
}
I hope you find these instructions helpful!