mssql-ssrs icon indicating copy to clipboard operation
mssql-ssrs copied to clipboard

Cors issue and invalid WSDL URL

Open JosephLeon13 opened this issue 4 years ago • 1 comments

Well, I'm hoping you can help out figuring out the issue here. So, we are trying to integrate rendering out a ssrs document with Vuejs using the package. However, when I configure it based off of the documentation I keep getting that it's blocked by CORS

    const config: any = {
        username: '***',
        password: '*******',
        domain: 'https://www.qscorpio.com:1443'
    }
    var url = 'https://www.qscorpio.com:1443/ReportServer'; 
    var reportPath = '/Cassy/Hello_World';
    var fileType = 'pdf';
    var params = { DTS: '12345', useRs2012: 'asmx.rs2012'};
    var wsdl_headers = {
        mode: 'no-cors',
        'Access-Control-Allow-Origin': '*',
        "Content-Type": "application/x-www-form-urlencoded"
    }
    var security = new ssrs.soap.security.BasicAuthSecurity(config.username, config.password);

    security.addHeaders(wsdl_headers);

    await ssrs.start(url, { wsdl_headers: wsdl_headers }, params, security);

JosephLeon13 avatar Mar 02 '20 22:03 JosephLeon13

Your example is good with a small addition here: var params = { DTS: '12345', useRs2012: 'asmx.rs2012'}; useRs2012 is a boolean and I dont know what DTS is

I am not that knowledgeable with CORS (I use this package in the backed with a package for CORS), but I have checked and headers are properly attached to the request ( also basic security uses npm request package ).

Maybe there are some other headers needed for CORS?

vision10 avatar Oct 28 '20 11:10 vision10