Consume SOAP web service with Angular app
10,846
ngx-soap is a great library which I have used in our one of the client project.
Here are steps to use this library.
Step 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
Step 2:
import { NgxSoapModule } from 'ngx-soap';
...
@NgModule({
imports: [ ..., NgxSoapModule, ... ]
...
Step 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;
constructor(private soap: NgxSoapService) {
this.soap.createClient('http://123.618.196.10/WCFTicket/Service1.svc?wsdl').subscribe(client => this.client = client);
}
}
Hope this will help!
Author by
Sampath
Angular, Ionic, Firestore, Typescript, PrimeNG Connect with ME : Twitter
Updated on June 17, 2022Comments
-
Sampath almost 2 years
I know that We can consume
Restful services
within ourAngular
apps. But one of my client gave me aweb service
like sohttp://123.618.196.10/WCFTicket/Service1.svc?wsdl
. So my question is can I use this within anAngular
app? I have never used it. Any clue?