Hello. I am trying to implement de the angular 2 soap in my ionic project. Unfortunality the compiler throws an error: Supplied parameters do not match any signature of call target.
In the tmp files the output is: get _SoapService_0_5():import4.SoapService {
if ((this.__SoapService_0_5 == (null as any))) { (this.__SoapService_0_5 = new import4.SoapService()); }
return this.__SoapService_0_5;
}
this is my whole home.ts file:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {SoapService} from "autopulous-angular2-soap/soap.service";
@component({
selector: 'page-home',
templateUrl: 'home.html',
providers: [SoapService]
})
export class Home {
private servicePort:string = 'http://172.16.62.111:8091';
private servicePath:string = '/your-application-ws/ws/';
private targetNamespace:string = '';
private responseJso:{} = null;
private soapService:SoapService;
constructor(public navCtrl: NavController) {
this.soapService = new SoapService(this.servicePort, this.servicePath, this.targetNamespace);
this.soapService.envelopeBuilder = this.envelopeBuilder;
this.soapService.jsoResponseHandler = (response:{}) => {this.responseJso = response};
this.soapService.localNameMode = true;
}
private username:string = '';
private password:string = '';
public login(username:string, password:string) {
var method:string = 'Login';
var parameters:{}[] = [];
this.username = username;
this.password = password;
parameters['LoginRequest xmlns="urn:application:security:messages:1:0"'] = Home.userLogin(username, password);
this.soapService.post(method, parameters);
}
private static userLogin(username, password):{}[] {
var parameters:{}[] = [];
parameters["UserName"] = username;
parameters['Password'] = password;
return parameters;
}
private envelopeBuilder(requestBody:string):string {
return "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<SOAP-ENV:Header>" +
"<wsse:Security SOAP-ENV:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" soapenv =\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<wsse:UsernameToken wsu:ld=\"UsernameToken-104\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" >" +
"<wsse:Username>" + this.username + "</wsse:Username>" +
"<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">" + this.password + "</wsse:Password>" +
"</wsse:UsernameToken>" +
"</wsse:Security>" +
"</SOAP-ENV:Header>" +
"<SOAP-ENV:Body>" +
requestBody +
"</SOAP-ENV:Body>" +
"</SOAP-ENV:Envelope>";
}
}
Do you know how this error is caused?
Thank you in advance!
Jelle
Hello. I am trying to implement de the angular 2 soap in my ionic project. Unfortunality the compiler throws an error: Supplied parameters do not match any signature of call target.
In the tmp files the output is: get _SoapService_0_5():import4.SoapService {
if ((this.__SoapService_0_5 == (null as any))) { (this.__SoapService_0_5 = new import4.SoapService()); }
return this.__SoapService_0_5;
}
this is my whole home.ts file:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {SoapService} from "autopulous-angular2-soap/soap.service";
@component({
selector: 'page-home',
templateUrl: 'home.html',
providers: [SoapService]
})
export class Home {
private servicePort:string = 'http://172.16.62.111:8091';
private servicePath:string = '/your-application-ws/ws/';
private targetNamespace:string = '';
constructor(public navCtrl: NavController) {
}
private username:string = '';
private password:string = '';
}
Do you know how this error is caused?
Thank you in advance!
Jelle