If tomcat is using SSL (as configured in server.xml), then all deployed
webapps can, too. Including soap and the rpcrouter servlet. What are the
details of the problem you are having?

Erich Izdepski
Senior Software Engineer
Cysive, Inc.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: RE: Using SSL and SOAP


Hello!

After some reconfiguring of keystore, Apache HTTP (1.3.20) and Tomcat
(4.0.1) I got it working. My requests are being encrypted.

Now there arose another problem, I can't deploy a webservice using the
default rpcrouter, because it doesn't understand https.

What do I do to deploy my WS using https? Or do I deploy it using the
default rpcrouter and make changes in server.xml/web.xml?

I'm using Apache SOAP 2.2 and JSSE 1.0.2 (for SSL).

Thanks!

-----Original Message-----
From: Kortmann, Carsten
Sent: Wednesday, May 29, 2002 8:18 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Using SSL and SOAP


Using the debugging option, I found out that I was using an invalid
keystore... Now I replaced the keystore, but Tomcat now won't even display
the splash page. This worked fine, when I was using invalid certs... Can you
assist me a little further!? Thanx


-----Original Message-----
From: Joe Pruitt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 5:06 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Using SSL and SOAP



This is most likely a un-trusted server certificate issue.  Try adding the
following to your runtime environment.

        -Djavax.net.debug=ssl

If you see that it's a server cert issue, then you'll need to install the
server cert into your local truststore.  See the keytool documentation for
this.

-Joe

-----Original Message-----
From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Wednesday, May 29, 2002 6:52 AM
To: [EMAIL PROTECTED]
Subject: Using SSL and SOAP
Importance: High


Hello,

can someone help me? I try to do SOAP-Calls over HTTPS and I always get the
following result:

[SOAP-Exception: faultCode=SOAP-ENV:Client; msg=Error opening socket: null;
targetException=java.lang.IllegalArgumentException: Error opening socket:
null]

The SOAP-Documentation says, that there's noone listening at the desired
address & port, but when I point my browser to the address I get the
response from the rpcrouter servlet...


My client-side code looks like this:

    ....
    try
    {
      SOAPHTTPConnection shc = new SOAPHTTPConnection();
      shc.setMaintainSession(false);

      Properties theProps = System.getProperties();

      switch(object.getProxyTyp())
      {
        case 1 :
        {
          if(object.sslEnabled())
          {
            theProps.put("https.proxySet", "true");
            theProps.put("https.proxyHost", pHost);
            theProps.put("https.proxyPort", pPort);
          }
          else
          {
            theProps.put("proxySet", "true");
            theProps.put("proxyHost", pHost);
            theProps.put("proxyPort", pPort);
          }
          break;
        }
        case 2 :
          if(object.sslEnabled())
          {
            theProps.put("https.socksProxySet", "true");
            theProps.put("https.socksProxyHost", pHost);
            theProps.put("https.socksProxyPort", pPort);
          }
          else
          {
            theProps.put("socksProxySet", "true");
            theProps.put("socksProxyHost", pHost);
            theProps.put("socksProxyPort", pPort);
          }
          break;
        default :
        {
          theProps.put("proxySet", "false");
          theProps.put("socksProxySet", "false");
          theProps.put("https.proxySet", "false");
          theProps.put("https.socksProxySet", "false");
        }
      }

      if(object.sslEnabled())
      {
        theProps.put("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

        if(m_strServerPort.equals("443"))
          m_strServerURL = " https:// <https://> " + m_strServerIP +
"/soap/servlet/rpcrouter";
        else
          m_strServerURL = "https" + m_strServerURL;
      }
      else
        m_strServerURL = "http" + m_strServerURL;

      System.setProperties(theProps);

      Vector params = new Vector ();

      params.addElement(new Parameter("arg1", String.class, m_strRequest,
null));

// making the SOAP-Call
      Call theCall = new Call();

      theCall.setSOAPTransport(shc);
      theCall.setTargetObjectURI(m_strTargetObjectURI);
      theCall.setMethodName(web_service);
      theCall.setEncodingStyleURI(m_strEncodingStyleURI);
      theCall.setParams(params);

      URL ServerUrl = new URL(m_strServerURL);

      Response inquiry_response = theCall.invoke(ServerUrl, null);

      Parameter result = inquiry_response.getReturnValue();

      if(inquiry_response.generatedFault())
      {
        Fault theFault = inquiry_response.getFault();
        inquiry_result_string = stringError("01", "Fehler beim Aufruf des
WebService\n" + theFault.getFaultCode() + "\n" + theFault.getFaultString());

      }
      else
        inquiry_result_string =
inquiry_response.getReturnValue().getValue().toString();
    ......


Can someone tell me where I'm going wrong and how I can correct the problem,
please. I don't (and cannot) use client authentication, so I left that out.
I'm working with Apache SOAP v.2.2 and JSSE 1.0.2, but it's no problem to
change versions if that solves the problem!



Thank you for your time!

Sincerely,
Carsten Kortmann

Reply via email to