Ionic Soap Xml web services

Hi everybody,

does anyone of you succeed to setup a SOAP XML integration with other system using Ionic 2 and Angular 2?
Is it possible?

Kind regards,

Hello @feda889, I have same problem, Can u try this link =
if above link has given a module for it, If u successfully integrate with ionic v2 Please share the steps with me. Thank you !!

Hi guys, any update regarding this soap xml webservice & ionic2? im still looking for solution as well. I have gone through the github by autopulous but still having issues.

En el provider es una simple llamada http.get();
Este codigo esta funcionando perfectamente

------------- Provider -------------------
import { Injectable } from ‘@angular/core’;
import { Http } from ‘@angular/http’;

import ‘rxjs/add/operator/map’;

export class WebServiceProvider {

constructor(public http: Http) {
console.log(‘Hello WebServiceProvider Provider’);

return this.http.get(‘http://URL/file.asmx/getdata’)
.map( r => r.json());


-------------------------- Home.ts --------------------------------

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

import { WebServiceProvider } from ‘…/…/providers/web-service/web-service’;

selector: ‘page-home’,
templateUrl: ‘home.html’,
providers: [WebServiceProvider]
export class HomePage {

public getData:any;

public navCtrl: NavController,
public ws: WebServiceProvider
) {}

public getIdiomas(){
data =>{



_______________ WEB Service ASPX _________________

using System.Web.Services;
using System.Runtime.Serialization.Json;
using System.Web.Script.Serialization;
using System.Web.Script.Services;

    [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
    public void getdata()
        List<itemPais> lst = new List<itemPais>();
        lst = new PaicesNegocios().GetPaicesAll_ISO();


   private void GetSerializedJson(object obj)
        JavaScriptSerializer js = new JavaScriptSerializer();

The previous post contains a few things that should not be emulated:

  • putting providers in pages unless you are absolutely certain that you want per-page instances of them
  • having misleading and nondescriptive property names like getData
  • abusing any

Its Simple…,:grinning:
Below code for how to call Soap Web Service from IONIC 2/3


<?xml version="1.0" encoding="utf-8"?> \
    <soap:Envelope xmlns:xsi="" \
        xmlns:xsd="" \
        xmlns:soap=""> \
      <soap:Body> \
        <**WebMethodName** xmlns=""> \
          <_Param1_>test</_Param1_> \
          <_Param2_>test2</_Param2_> \
        </**WebMethodName** > \
      </soap:Body> \


this.headers = {
    responseType: "text",
    headers: new HttpHeaders()
      .set('Content-Type', 'text/xml; charset=utf-8')

Http Call:
use http client'http://localhost/yourwebservice.asmx', input, this.headers)
      .subscribe((response) => {
       let result = new DOMParser().parseFromString(res,"text/xml").getElementsByTagName("**WebMethodName**Result")[0].innerHTML;
 }, (error) => {
       \\Error Block

This works fine for me :sunglasses:


Hi, the input variable is what type, i try in ionic4 and in input send xml in string and get an error?

I am implementing the soap api in ionic and passing the parameter user name and password.
every time login we need to send the xml/txt file so how we can achieve it.