You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Robert Dyas <rd...@adelphia.net> on 2001/01/05 03:01:49 UTC

https and soap

Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


RE: https and soap

Posted by Robert Dyas <rd...@adelphia.net>.
Never mind the question below - I know its because I need the SOAP source
from the CVS, not the 2.0 soap jar. Sorry for the noise...

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 9:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Robert Dyas <rd...@adelphia.net>.
Never mind the question below - I know its because I need the SOAP source
from the CVS, not the 2.0 soap jar. Sorry for the noise...

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 9:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: https and soap

Posted by George I Matkovits <ma...@uswest.net>.
Thank you for this posting. I done exactly this about 6 months ago and Apache
with mod_ssl + OpenSSL has been working for me just great on Linux. IMHO the
latest Linux version comes already with SSL enabled Apache. Tomcat runs 'behind'
Apache and does not need any SSL mods. I currently use Tomcat V3.2B1 with Soap
on both Win2k (no SSL because I never took the time to make Tomcat work with IIS
which IMHO is possible:-) and on Linux RH6.2 (with Apache SSL).
Regards - George

Robert Dyas wrote:

> I don't use the tomcat web server - I use Apache. So Apache is providing the
> SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
> post from earlier today:
>
> Basic overview of getting SOAP over SSL to work
>
> The following assumes you have Apache running with SSL and you can use your
> web browser from the client to surf that server with https://. I'm using
> RedHat 7, so any attached binaries I built were for that.
>
> What you need:
>
> - get the latest tomcat source and compile mod_jserv and install it under
> Apache. This allows you to use tomcat with Apache, so Apache does the SSL
> part. After you do this, you should be able to surf the tomcat examples from
> your web browser using https://
>
> - get the latest SOAP source from the CVS and compile it.
>
> - install the new soap.jar on both the client and the server.
>
> - mail.jar and activation.jar are also required on both the client and
> server side. You can get these jars here: JavaMail from
> http://java.sun.com/products/javamail/ and Java Activation Framework from
> http://java.sun.com/products/beans/glasgow/jaf.html
>
> - download and install Sun's JSSE package on the client. Download from
> http://java.sun.com/products/jsse/ -- be sure to follow the installation and
> setup directions carefully for this one. (make sure you can get the
> URLReader example included with JSSE working with your server before trying
> to get a SOAP example running, as SOAP does not pass https exceptions very
> clearly).
>
> - if your server is using a self signed cert, be sure to import your
> server's cert into jssecacerts (located in java_home\lib\security) or you
> will get strange errors. The cert on the server is located (on my machine)
> at /etc/httpd/conf/ssl.crt/server.crt
>
> -----Original Message-----
> From: Gus Delgado [mailto:gus.delgado@netquotient.com]
> Sent: Tuesday, January 09, 2001 2:24 PM
> To: soap-user@xml.apache.org
> Subject: RE: https and soap
>
> Robert,
> how do you make your tomcat server an SSL? what are the steps?
>
> thanks,
> gus
>
> -----Original Message-----
> From: Robert Dyas [mailto:rdyas@adelphia.net]
> Sent: Thursday, January 04, 2001 8:02 PM
> To: Soap-User@Xml. Apache. Org
> Subject: https and soap
>
> Help!
>
> I am trying to get SOAP working over SSL.
>
> The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
> fine in the web browser using https.
>
> The client source code is below, it uses JSSE.
>
> The problem appears to be that the client is not actually sending encrypted
> data. When you look at the data going to/from the server with TCP Tunnel
> monitor you can see that it is NOT encrypted. Here is the ouput from the
> server side of TCP Tunnel monitor:
>
> *********************************************
>
> HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
> Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
> OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
> charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>400 Bad Request</TITLE>
> </HEAD><BODY>
> <H1>Bad Request</H1>
> Your browser sent a request that this server could not understand.<P>
> Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
> Instead use the HTTPS scheme to access this URL, please.<BR>
> <BLOCKQUOTE>Hint: <A
> HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
> OTE><P>
> <HR>
> <ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
> </BODY></HTML>
>
> *******************************************
>
> The problem appears to be "Reason: You're speaking plain HTTP to an
> SSL-enabled server port."
>
> Does anyone have any idea what I am doing wrong?
>
> ************************ my java source ********************
> the source is just the GetQuote example with the following
> two lines added at the top
>
>     System.setProperty("java.protocol.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol");
>     Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
>
> *************************************************************
>
> import java.io.*;
> import java.net.*;
> import java.util.*;
> import org.apache.soap.util.xml.*;
> import org.apache.soap.*;
> import org.apache.soap.rpc.*;
>
> // for https
> import java.security.*;
> import System.*;
>
> public class GetQuote {
>
>   public static void main (String[] args) throws Exception {
>     if (args.length != 2) {
>       System.err.println ("Usage: java " + GetQuote.class.getName () + "
> SOAP-router-URL symbol");
>       System.exit (1);
>     }
>
>     // for https
>     System.setProperty("java.protocol.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol");
>     Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
>
>     // process the arguments
>     URL url = new URL(args[0]);
>     String stockTickerSymbol = args[1];
>
>     // setup theCall
>     Call theCall = new Call();
>     theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
>     theCall.setTargetObjectURI("urn:cool_quotes");
>     theCall.setMethodName("getQuote");
>
>     Vector aVector = new Vector();
>     aVector.addElement(new Parameter("symbol", String.class,
> stockTickerSymbol, null));
>     theCall.setParams(aVector);
>
>     // make the call (2nd parm is blank because XML-SOAP rpc router does not
> currently use this)
>     Response theResponse = theCall.invoke(url, "");
>
>     // process the response
>     if (theResponse.generatedFault()) {
>       Fault fault = theResponse.getFault();
>       System.out.println ("Ouch, the call failed: ");
>       System.out.println ("  Fault Code   = " + fault.getFaultCode());
>       System.out.println ("  Fault String = " + fault.getFaultString());
>     } else {
>       Parameter result = theResponse.getReturnValue();
>       System.out.println(result.getValue());
>     }
>
>   }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


Re: https and soap

Posted by George I Matkovits <ma...@uswest.net>.
Thank you for this posting. I done exactly this about 6 months ago and Apache
with mod_ssl + OpenSSL has been working for me just great on Linux. IMHO the
latest Linux version comes already with SSL enabled Apache. Tomcat runs 'behind'
Apache and does not need any SSL mods. I currently use Tomcat V3.2B1 with Soap
on both Win2k (no SSL because I never took the time to make Tomcat work with IIS
which IMHO is possible:-) and on Linux RH6.2 (with Apache SSL).
Regards - George

Robert Dyas wrote:

> I don't use the tomcat web server - I use Apache. So Apache is providing the
> SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
> post from earlier today:
>
> Basic overview of getting SOAP over SSL to work
>
> The following assumes you have Apache running with SSL and you can use your
> web browser from the client to surf that server with https://. I'm using
> RedHat 7, so any attached binaries I built were for that.
>
> What you need:
>
> - get the latest tomcat source and compile mod_jserv and install it under
> Apache. This allows you to use tomcat with Apache, so Apache does the SSL
> part. After you do this, you should be able to surf the tomcat examples from
> your web browser using https://
>
> - get the latest SOAP source from the CVS and compile it.
>
> - install the new soap.jar on both the client and the server.
>
> - mail.jar and activation.jar are also required on both the client and
> server side. You can get these jars here: JavaMail from
> http://java.sun.com/products/javamail/ and Java Activation Framework from
> http://java.sun.com/products/beans/glasgow/jaf.html
>
> - download and install Sun's JSSE package on the client. Download from
> http://java.sun.com/products/jsse/ -- be sure to follow the installation and
> setup directions carefully for this one. (make sure you can get the
> URLReader example included with JSSE working with your server before trying
> to get a SOAP example running, as SOAP does not pass https exceptions very
> clearly).
>
> - if your server is using a self signed cert, be sure to import your
> server's cert into jssecacerts (located in java_home\lib\security) or you
> will get strange errors. The cert on the server is located (on my machine)
> at /etc/httpd/conf/ssl.crt/server.crt
>
> -----Original Message-----
> From: Gus Delgado [mailto:gus.delgado@netquotient.com]
> Sent: Tuesday, January 09, 2001 2:24 PM
> To: soap-user@xml.apache.org
> Subject: RE: https and soap
>
> Robert,
> how do you make your tomcat server an SSL? what are the steps?
>
> thanks,
> gus
>
> -----Original Message-----
> From: Robert Dyas [mailto:rdyas@adelphia.net]
> Sent: Thursday, January 04, 2001 8:02 PM
> To: Soap-User@Xml. Apache. Org
> Subject: https and soap
>
> Help!
>
> I am trying to get SOAP working over SSL.
>
> The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
> fine in the web browser using https.
>
> The client source code is below, it uses JSSE.
>
> The problem appears to be that the client is not actually sending encrypted
> data. When you look at the data going to/from the server with TCP Tunnel
> monitor you can see that it is NOT encrypted. Here is the ouput from the
> server side of TCP Tunnel monitor:
>
> *********************************************
>
> HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
> Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
> OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
> charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>400 Bad Request</TITLE>
> </HEAD><BODY>
> <H1>Bad Request</H1>
> Your browser sent a request that this server could not understand.<P>
> Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
> Instead use the HTTPS scheme to access this URL, please.<BR>
> <BLOCKQUOTE>Hint: <A
> HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
> OTE><P>
> <HR>
> <ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
> </BODY></HTML>
>
> *******************************************
>
> The problem appears to be "Reason: You're speaking plain HTTP to an
> SSL-enabled server port."
>
> Does anyone have any idea what I am doing wrong?
>
> ************************ my java source ********************
> the source is just the GetQuote example with the following
> two lines added at the top
>
>     System.setProperty("java.protocol.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol");
>     Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
>
> *************************************************************
>
> import java.io.*;
> import java.net.*;
> import java.util.*;
> import org.apache.soap.util.xml.*;
> import org.apache.soap.*;
> import org.apache.soap.rpc.*;
>
> // for https
> import java.security.*;
> import System.*;
>
> public class GetQuote {
>
>   public static void main (String[] args) throws Exception {
>     if (args.length != 2) {
>       System.err.println ("Usage: java " + GetQuote.class.getName () + "
> SOAP-router-URL symbol");
>       System.exit (1);
>     }
>
>     // for https
>     System.setProperty("java.protocol.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol");
>     Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
>
>     // process the arguments
>     URL url = new URL(args[0]);
>     String stockTickerSymbol = args[1];
>
>     // setup theCall
>     Call theCall = new Call();
>     theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
>     theCall.setTargetObjectURI("urn:cool_quotes");
>     theCall.setMethodName("getQuote");
>
>     Vector aVector = new Vector();
>     aVector.addElement(new Parameter("symbol", String.class,
> stockTickerSymbol, null));
>     theCall.setParams(aVector);
>
>     // make the call (2nd parm is blank because XML-SOAP rpc router does not
> currently use this)
>     Response theResponse = theCall.invoke(url, "");
>
>     // process the response
>     if (theResponse.generatedFault()) {
>       Fault fault = theResponse.getFault();
>       System.out.println ("Ouch, the call failed: ");
>       System.out.println ("  Fault Code   = " + fault.getFaultCode());
>       System.out.println ("  Fault String = " + fault.getFaultString());
>     } else {
>       Parameter result = theResponse.getReturnValue();
>       System.out.println(result.getValue());
>     }
>
>   }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Robert Dyas <rd...@adelphia.net>.
Apache listens on port 80 not 8080 by default. So use:

https://localhost:80/soap/servlet/rpcrouter



-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Wednesday, January 10, 2001 4:11 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I'm really having problems with the setup... I have made the changes in
tomcat and in apache:
- I run tomcat and it runs fine
- then I run Apache and it run fine too
- but when I go the browser and try to go to
https://localhost:8080/soap/servlet/rpcrouter

I don't get anything?! #
Any help is much appreciated....

gus

-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Wednesday, January 10, 2001 1:46 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


how do i run apache with ssl?

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Tuesday, January 09, 2001 1:59 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Robert Dyas <rd...@adelphia.net>.
Apache listens on port 80 not 8080 by default. So use:

https://localhost:80/soap/servlet/rpcrouter



-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Wednesday, January 10, 2001 4:11 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I'm really having problems with the setup... I have made the changes in
tomcat and in apache:
- I run tomcat and it runs fine
- then I run Apache and it run fine too
- but when I go the browser and try to go to
https://localhost:8080/soap/servlet/rpcrouter

I don't get anything?! #
Any help is much appreciated....

gus

-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Wednesday, January 10, 2001 1:46 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


how do i run apache with ssl?

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Tuesday, January 09, 2001 1:59 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
I'm really having problems with the setup... I have made the changes in
tomcat and in apache:
- I run tomcat and it runs fine
- then I run Apache and it run fine too
- but when I go the browser and try to go to
https://localhost:8080/soap/servlet/rpcrouter

I don't get anything?! #
Any help is much appreciated....

gus

-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Wednesday, January 10, 2001 1:46 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


how do i run apache with ssl?

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Tuesday, January 09, 2001 1:59 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
I'm really having problems with the setup... I have made the changes in
tomcat and in apache:
- I run tomcat and it runs fine
- then I run Apache and it run fine too
- but when I go the browser and try to go to
https://localhost:8080/soap/servlet/rpcrouter

I don't get anything?! #
Any help is much appreciated....

gus

-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Wednesday, January 10, 2001 1:46 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


how do i run apache with ssl?

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Tuesday, January 09, 2001 1:59 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
how do i run apache with ssl?

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Tuesday, January 09, 2001 1:59 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
how do i run apache with ssl?

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Tuesday, January 09, 2001 1:59 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Robert Dyas <rd...@adelphia.net>.
I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
forget it! you already posted the steps, thanks

-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 1:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Robert Dyas <rd...@adelphia.net>.
I don't use the tomcat web server - I use Apache. So Apache is providing the
SSL stuff, and Tomcat is the the JSP/servlet engine. Here is a copy of my
post from earlier today:

Basic overview of getting SOAP over SSL to work

The following assumes you have Apache running with SSL and you can use your
web browser from the client to surf that server with https://. I'm using
RedHat 7, so any attached binaries I built were for that.

What you need:

- get the latest tomcat source and compile mod_jserv and install it under
Apache. This allows you to use tomcat with Apache, so Apache does the SSL
part. After you do this, you should be able to surf the tomcat examples from
your web browser using https://

- get the latest SOAP source from the CVS and compile it.

- install the new soap.jar on both the client and the server.

- mail.jar and activation.jar are also required on both the client and
server side. You can get these jars here: JavaMail from
http://java.sun.com/products/javamail/ and Java Activation Framework from
http://java.sun.com/products/beans/glasgow/jaf.html

- download and install Sun's JSSE package on the client. Download from
http://java.sun.com/products/jsse/ -- be sure to follow the installation and
setup directions carefully for this one. (make sure you can get the
URLReader example included with JSSE working with your server before trying
to get a SOAP example running, as SOAP does not pass https exceptions very
clearly).

- if your server is using a self signed cert, be sure to import your
server's cert into jssecacerts (located in java_home\lib\security) or you
will get strange errors. The cert on the server is located (on my machine)
at /etc/httpd/conf/ssl.crt/server.crt


-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 2:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
forget it! you already posted the steps, thanks

-----Original Message-----
From: Gus Delgado [mailto:gus.delgado@netquotient.com]
Sent: Tuesday, January 09, 2001 1:24 PM
To: soap-user@xml.apache.org
Subject: RE: https and soap


Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: https and soap

Posted by Gus Delgado <gu...@netquotient.com>.
Robert,
how do you make your tomcat server an SSL? what are the steps?

thanks,
gus

-----Original Message-----
From: Robert Dyas [mailto:rdyas@adelphia.net]
Sent: Thursday, January 04, 2001 8:02 PM
To: Soap-User@Xml. Apache. Org
Subject: https and soap


Help!

I am trying to get SOAP working over SSL.

The http server is apache soap w/SSL, tomcat, and soap 2.0. Everything works
fine in the web browser using https.

The client source code is below, it uses JSSE.

The problem appears to be that the client is not actually sending encrypted
data. When you look at the data going to/from the server with TCP Tunnel
monitor you can see that it is NOT encrypted. Here is the ouput from the
server side of TCP Tunnel monitor:

*********************************************

HTTP/1.1 400 Bad Request Date: Thu, 04 Jan 2001 23:41:15 GMT Server:
Apache/1.3.12 (Unix)  (Red Hat/Linux) tomcat/1.0 mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24 Connection: close Content-Type: text/html;
charset=iso-8859-1  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reason: You're speaking plain HTTP to an SSL-enabled server port.<BR>
Instead use the HTTPS scheme to access this URL, please.<BR>
<BLOCKQUOTE>Hint: <A
HREF="https://192.168.1.5:443/"><B>https://192.168.1.5:443/</B></A></BLOCKQU
OTE><P>
<HR>
<ADDRESS>Apache/1.3.12 Server at 192.168.1.5 Port 443</ADDRESS>
</BODY></HTML>

*******************************************

The problem appears to be "Reason: You're speaking plain HTTP to an
SSL-enabled server port."

Does anyone have any idea what I am doing wrong?



************************ my java source ********************
the source is just the GetQuote example with the following
two lines added at the top

    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


*************************************************************

import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

// for https
import java.security.*;
import System.*;

public class GetQuote {

  public static void main (String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println ("Usage: java " + GetQuote.class.getName () + "
SOAP-router-URL symbol");
      System.exit (1);
    }

    // for https
    System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    // process the arguments
    URL url = new URL(args[0]);
    String stockTickerSymbol = args[1];

    // setup theCall
    Call theCall = new Call();
    theCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    theCall.setTargetObjectURI("urn:cool_quotes");
    theCall.setMethodName("getQuote");

    Vector aVector = new Vector();
    aVector.addElement(new Parameter("symbol", String.class,
stockTickerSymbol, null));
    theCall.setParams(aVector);

    // make the call (2nd parm is blank because XML-SOAP rpc router does not
currently use this)
    Response theResponse = theCall.invoke(url, "");

    // process the response
    if (theResponse.generatedFault()) {
      Fault fault = theResponse.getFault();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    } else {
      Parameter result = theResponse.getReturnValue();
      System.out.println(result.getValue());
    }

  }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org