Coder Social home page Coder Social logo

angular2-soap's People

Contributors

neoheurist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-soap's Issues

unable to use SoapService as provider

As in example, found that providers: [SoapService] used in user.authenticator.ts
So I did same in my demo application, but getting error like
"Uncaught TypeError: (void 0) is not a function", source: file:///android_asset/www/build/main.js (101810)" in android emulator
& while checked on chrome console I found below error
Failed to load resource: the server responded with a status of 404 (Not Found) xdom.js
Failed to load resource: the server responded with a status of 404 (Not Found) xdom2jso.js

Please help me out for this problem.

Cannot find name / namespace 'xdom2jso'

Hi @autopulous @Neoheurist ,

I installed npm package 'autopulous-xdom2jso', and imported service as well. But building my app throws me errors below. Please help in resolving this:

ERROR in [at-loader] src/app/services/soap.service.ts:6:18 
    TS2304: Cannot find name 'xdom2jso'.

ERROR in [at-loader] src/app/services/soap.service.ts:6:18 
    TS2503: Cannot find namespace 'xdom2jso'.

Supplied parameters do not match any signature of call target.

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

Fix for webpack

Creation of a fix for the new version of angular 2 with webpack

The module doesn't work anymore on this new version.

EXCEPTION: responseNodeList is null when preflight OPTIONS sent with CORS enabled.

I'm using Angular 2 and my code is almost exactly like the example. The SOAP request is to a web service on a server other than what Node is running on. So this is a cross origin request.

Firefox tells me: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.208.19:1069/. This can be fixed by moving the resource to the same domain or enabling CORS.

I can see the preflight OPTIONS request. Returns with 200 OK. But in the console I see: TypeError: responseNodeList is null. Should handling be added for when user chosen options are not correct?

Please add error handling

It is a nice start but it needs some error handling for when SOAP requests fail on the server. Currently adding my own.

Referencing xdom2jso in index.html doesnt seem to work. Browser can't find the file

Hi

I've seen some of the other comments on integrating this module with ionic 2 which is AWESOME! but when trying to reference xdom2jso in index.html the file can't be found by the browser. I would really appreciate if you could have a look to see if there are any missing steps from your readme file as I have even run the watch-dev gulp task etc and still the problem is there. I could be missing something simple I will keep having a look but I would appreciate some feeback on your totally awesome module. Thanks again

Rocco

missing script start

Attempting to get this to run on Windows 10 using Visual Studio Code and built in Terminal- I confess extreme ignorance - but I followed your "Usage" directions 2 times - and always got the same errors in the log file.
Please advise - thanks!
npm-debug - Copy.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.