Giter VIP home page Giter VIP logo

Comments (5)

doedje avatar doedje commented on May 28, 2024 1

Ah, those certificates.......

Now I realise what might have happened with your xml when you printed:

request : params1params2params3

It looks like you print to something that is interpreting html, dropping all the xml that is wrapping your params1,2 and 3.... like what would happen when you put xml into an html-element on a website....

Why the config.context is empty I don't really know. I'll look into that.

Good luck with your project and certificates!

from jquery.soap.

doedje avatar doedje commented on May 28, 2024

what does your args look like? the request should indeed be a complete XML with SOAP namespaces and everything.....

from jquery.soap.

AlexCln avatar AlexCln commented on May 28, 2024

Hi Doedje;

My args looks like :

args = {
   appId: "params1",
   username: "params2",
   password: "params3"
}

the request should indeed be a complete XML with SOAP namespaces and everything.....
==> Totally agree, but it doesn't... I don't understand why my request isn't encapsulated in a xml envelop.
$.soap is correctly imported, everythings looks good

Update 26 september at 2pm:
I've made an update on my $.soap implementation :

 $.soap({
        	url: "http://myserver.com/myApp/services/AuthenticationService.AuthenticationServiceHttpSoap12Endpoint",
         method: "verifyUser",
          appendMethodToURL: false,
          enableLogging: true,
          soap12: true,
          namespaceQualifier: 'off',
	  namespaceURL: 'http://my.server.com',
          data: args,
          context: document.body,
          beforeSend: function(req){
            MyApp.writeMessage(this);
          },
        	success: function (soapResponse) {
            MyApp.writeMessage("Res: "+ JSON.stringify(soapResponse));
        	},
        	error: function (SOAPResponse) {
        		// show error
            MyApp.writeMessage("SOAP error : " + SOAPResponse);
        	}
      });

When I put a breakpoint at jquery.soap.js:742 I got this output :

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <off:verifyUser xmlns:off="http://myServe.server.com"> <off:applicationId>params1</off:applicationId> <off:username>params2</off:username> <off:password>params3</off:password> </off:verifyUser> </soap:Body> </soap:Envelope>

During the return soapEnvelope.send() my config.context is empty, Is it normal or I just missed something in my implementation ?

Anyway, in my console I got this error :

Mixed Content: The page at 'https://localhost:8443/assets/html/dialogs/loginDialog.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://myserver.com/myApp/services/AuthenticationService.AuthenticationServiceHttpSoap12Endpoint'. This request has been blocked; the content must be served over HTTPS.

New update at 5pm :

I got a new error :
Error: Hostname/IP doesn't match certificate's altnames: "Host: localhost. is not in the cert's altnames: DNS:*.myserver.com, DNS:myserver.com"

Looks like my certificate isn't correctly formed.

Thanks
Alexis

from jquery.soap.

AlexCln avatar AlexCln commented on May 28, 2024

Thanks for your answers anyway !

It looks like you print to something that is interpreting html, dropping all the xml that is wrapping your params1,2 and 3.... like what would happen when you put xml into an html-element on a website....

==> Exactly this is what my MyApp.writeMessage looks like :

MyApp.writeMessage =  function writeMessage(text){
    $('.ms-MessageBar').hide();
    $('#messageBarError').show();
    $('#messageBarError .ms-MessageBar-text').append('<br/>'+text);
  }

If needed for people coming to my post this is how my $.soap looks like :

 $.soap({
        	url: "https://localhost:8444/myApp/services/AuthenticationService.AuthenticationServiceHttpSoap11Endpoint",
         method: methodName,
          appendMethodToURL: false,
          enableLogging: true,
          namespaceQualifier: 'off',
	  namespaceURL: 'http://myDistantServer.services.com',
          data: args,
          context: document.body,
          beforeSend: function(req){
            MyApp.writeMessage(this);
          },
        	success: function (soapResponse) {
            MyApp.writeMessage("Res: "+ JSON.stringify(soapResponse));
        	},
        	error: function (SOAPResponse) {
            MyApp.writeMessage("SOAP error : " + SOAPResponse);
        	}
      });

The url property is the url:port of my reverse proxy who redirect every request of this url:port to my Soap distant web server.

Hope it will help someone in the future.
Thanks again
Alex

from jquery.soap.

doedje avatar doedje commented on May 28, 2024

You're welcome!

from jquery.soap.

Related Issues (20)

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.