Menu

NuSOAP over HTTPS

Help
marco
2011-03-17
2013-06-06
  • marco

    marco - 2011-03-17

    Hi all,

    i created a webservice using NuSOAP. Actually it is working great using HTTP. Now I am at the point to change the transmition from HTTP to HTTPS. Therefore i already got the necessary (official) certificate for my Domain. My question is now, how to realize this.
    My first inspiration was, just to change the URL pointig to the WSDL from http://mydomain.com/ws/index.php?wsdl to https://mydomain.com/ws/index.php?wsdl. But as I see, just the namespaces for in- and output changed. The SoapAction and the Endpoint are still pointing to the HTTP-URL.

    Is there any tutorial, sample or document concerning the implemntation of HTTPS available? I am really a newby to NuSOAP, so any tips are welcome!

    Thanks a lot and best regards, Marco

     
  • Anonymous

    Anonymous - 2011-08-11

    Hi Marco,
    I saw your post and am at the exact same point as you were (or are).
    Have you been able to overcome this point and found a solution?
    While I was happy initially jumping on nusoap for the WSDL-creation feature
    I am getting more and more frustrated by it as I was not able to find any real documentation of ot.
    I had to make some hacks to realy enable UTF-8 support and more and have now strange
    reactions of it on the auto-documentation feature.

    Nevertheless, the service now works but how can I make it work over https with a c# client (Sharp-Develop).
    The c#-client works perfectly over HTTP.

    Any input highly appreciated.

    Best

    Andreas (Wuppi)

     
  • Anonymous

    Anonymous - 2011-08-11

    Hi Marco,

    I made some progress on it with VS2005, c#.

    First, I take for granted that you made the service available in your https-directory, on apache usually
    https. Check this by calling the service in a browser with https://<url>
    In case you are hit by security warnings due to unsifficient or missing certificate, just skip them.

    Initially the C#-client in VS brought back a runtime error, basically saysing that the connection would have been closed due
    to certificate issues.

    The solution to is the following "macic code" which I found googleing:

    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;

    // add this to your code before you make your web service call.
    System.Net.ServicePointManager.ServerCertificateValidationCallback +=
    delegate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslError)
    {
    bool validationResult = true;
    return validationResult;
    };

    That did it. The service was subsequently callable also on https.

    However, in Sharpdevelopment, I got stuck with it as the "add webservice" simplay hang up and I don't know how
    to overcome this.

    Best

    Andreas

     

Log in to post a comment.