how to provide security using SSL for web services

Discussions

XML & Web services: how to provide security using SSL for web services

  1. Hi,
     I have created sample web service. I just want to implement security into web services using SSL. Does any one know about that ?

    -Malathi
  2. What platform are you using to host the web service?

    N.,
  3. hi,
      I am new to WebService. I have created web service using java & WebServiceToolKit. now my web service is running in TOMCAT. I have to provide security for this web service using SSL. please tell me how to do. You can send information to my mail id also. My mail id is malathi at siptech dot co dot in. Following are my web service & client programs.

    My sample web service :

    public class sample
    {
       public String display()
       {
    String msg = "Hi You have successfully created a Web Service";
    return msg;
       }
    }

    My client program :

    public class sample_client{
        public static void main(String args[])throws Exception
        {
    java.net.URL url = new java.net.URL("http://localhost:8080/soap/servlet/rpcrouter");
    sample_ServiceBinding obj = new sample_ServiceBinding(url);
    System.out.println("Message from Web Service :\n"+obj.display());
        }
    }

    thanks,
    malathi
  4. hi,
      I am new to WebService. I have created web service using java & WebServiceToolKit. now my web service is running in TOMCAT. I have to provide security for this web service using SSL. please tell me how to do. You can send information to my mail id also. My mail id is malathi at siptech dot co dot in. Following are my web service & client programs.

    My sample web service :

    public class sample
    {
       public String display()
       {
    String msg = "Hi You have successfully created a Web Service";
    return msg;
       }
    }

    My client program :

    public class sample_client{
        public static void main(String args[])throws Exception
        {
    java.net.URL url = new java.net.URL("http://localhost:8080/soap/servlet/rpcrouter");
    sample_ServiceBinding obj = new sample_ServiceBinding(url);
    System.out.println("Message from Web Service :\n"+obj.display());
        }
    }

    thanks,
    malathi
  5. I have never done this, but:

    SSL lies underneath the HTTP protocol, so you should not actually have to do anything other than specify the right URL to your SSL protected service:
     
      https://localhost:8080/soap/servlet/rpcrouter

    All the encryption should be handled by the underlying network and communication layers of your system, you just need to configure Tomcat to use this stuff correctyly, and there are tutorials in the Tomcat docs to do this.