You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Glen Daniels <gd...@macromedia.com> on 2001/10/18 16:41:07 UTC
RE: cvs commit: xml-axis/java/test/functional FunctionalTests.jav
a
SimpleAxisServer *did* support sessions - it doesn't now?
Shall I look into this?
> -----Original Message-----
> From: dug@apache.org [mailto:dug@apache.org]
> Sent: Thursday, October 18, 2001 10:27 AM
> To: xml-axis-cvs@apache.org
> Subject: cvs commit: xml-axis/java/test/functional
> FunctionalTests.java
>
>
> dug 01/10/18 07:26:39
>
> Modified: java/samples/addr
> AddressBookSOAPBindingImpl.java Main.java
> java/src/org/apache/axis MessageContext.java
> java/src/org/apache/axis/client Call.java
> java/src/org/apache/axis/providers/java
> JavaProvider.java
> java/src/org/apache/axis/transport/http HTTPSender.java
> java/test/functional FunctionalTests.java
> Log:
> Fix session support - we were erasing the cookies when we
> shouldn't be.
>
> NOTE: Add sample will now work but not in the functional
> tests because
> it tests sessions which SimpleAxisServer does not support.
>
> Revision Changes Path
> 1.7 +1 -1
> xml-axis/java/samples/addr/AddressBookSOAPBindingImpl.java
>
> Index: AddressBookSOAPBindingImpl.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/samples/addr/AddressBookSOAPBindingImpl.java,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -r1.6 -r1.7
> --- AddressBookSOAPBindingImpl.java 2001/10/18 13:28:36 1.6
> +++ AddressBookSOAPBindingImpl.java 2001/10/18 14:26:39 1.7
> @@ -10,7 +10,7 @@
> import java.util.Map;
>
> public class AddressBookSOAPBindingImpl implements AddressBook {
> - static private Map addresses = new HashMap();
> + private Map addresses = new HashMap();
>
> public void addEntry(java.lang.String name, Address
> address) throws java.rmi.RemoteException {
> this.addresses.put(name, address);
>
>
>
> 1.9 +0 -2 xml-axis/java/samples/addr/Main.java
>
> Index: Main.java
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/samples/addr/Main.java,v
> retrieving revision 1.8
> retrieving revision 1.9
> diff -u -r1.8 -r1.9
> --- Main.java 2001/10/18 13:42:08 1.8
> +++ Main.java 2001/10/18 14:26:39 1.9
> @@ -124,11 +124,9 @@
> ab1 = abs.getAddressBook(serviceURL);
> }
> Object ret = doit (ab1);
> - /*
> if (ret != null) {
> throw new Exception("non-session test expected
> null response, got "+ret);
> }
> - */
>
> System.err.println ("\n\nUsing proxy with session
> maintenance.");
> AddressBook ab2 = null;
>
>
>
> 1.57 +0 -1
> xml-axis/java/src/org/apache/axis/MessageContext.java
>
> Index: MessageContext.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
> retrieving revision 1.56
> retrieving revision 1.57
> diff -u -r1.56 -r1.57
> --- MessageContext.java 2001/10/16 13:25:52 1.56
> +++ MessageContext.java 2001/10/18 14:26:39 1.57
> @@ -509,5 +509,4 @@
> serviceHandler = null;
> havePassedPivot = false;
> }
> -
> };
>
>
>
> 1.17 +2 -1
> xml-axis/java/src/org/apache/axis/client/Call.java
>
> Index: Call.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
> retrieving revision 1.16
> retrieving revision 1.17
> diff -u -r1.16 -r1.17
> --- Call.java 2001/10/18 14:24:25 1.16
> +++ Call.java 2001/10/18 14:26:39 1.17
> @@ -959,7 +959,8 @@
> public void invoke() throws AxisFault {
> category.debug("Enter: Call::invoke()" );
>
> - msgContext.reset();
> + // Don't want to reset - this will erase the cookies!
> + // msgContext.reset();
>
> if (myProperties != null) {
> Enumeration enum = myProperties.keys();
>
>
>
> 1.22 +3 -3
> xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
>
> Index: JavaProvider.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/Jav
> aProvider.java,v
> retrieving revision 1.21
> retrieving revision 1.22
> diff -u -r1.21 -r1.22
> --- JavaProvider.java 2001/10/18 14:10:29 1.21
> +++ JavaProvider.java 2001/10/18 14:26:39 1.22
> @@ -110,12 +110,12 @@
> scope = "Request";
> }
>
> - if (scope.equals("Request")) {
> + if (scope.equalsIgnoreCase("Request")) {
>
> // make a one-off
> return getNewServiceObject(msgContext, clsName);
>
> - } else if (scope.equals("Session")) {
> + } else if (scope.equalsIgnoreCase("Session")) {
>
> // look in incoming session
> if (msgContext.getSession() != null) {
> @@ -131,7 +131,7 @@
> return getNewServiceObject(msgContext, clsName);
> }
>
> - } else if (scope.equals("Application")) {
> + } else if (scope.equalsIgnoreCase("Application")) {
>
> // MUST be AxisEngine here!
> AxisEngine engine = msgContext.getAxisEngine();
>
>
>
> 1.25 +7 -1
> xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
>
> Index: HTTPSender.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTT
> PSender.java,v
> retrieving revision 1.24
> retrieving revision 1.25
> diff -u -r1.24 -r1.25
> --- HTTPSender.java 2001/10/16 13:25:52 1.24
> +++ HTTPSender.java 2001/10/18 14:26:39 1.25
> @@ -94,6 +94,11 @@
> String reqEnv = null ;
>
> targetURL = msgContext.getStrProp(
> MessageContext.TRANS_URL);
> +
> + // Clear any values from the previous run
> +
> msgContext.clearProperty(HTTPConstants.MC_HTTP_STATUS_CODE);
> +
> msgContext.clearProperty(HTTPConstants.MC_HTTP_STATUS_MESSAGE);
> +
> try {
> String host ;
> int port = 80 ;
> @@ -353,7 +358,8 @@
> statusMessage,
> null,
> null);
> - fault.setFaultDetailsString(new
> String(buf, 0, len));
> + fault.setFaultDetailsString("rc:" +
> returnCode + "\n" +
> + new
> String(buf, 0, len));
> throw fault;
> }
>
>
>
>
> 1.9 +2 -0
> xml-axis/java/test/functional/FunctionalTests.java
>
> Index: FunctionalTests.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/test/functional/FunctionalTests.java,v
> retrieving revision 1.8
> retrieving revision 1.9
> diff -u -r1.8 -r1.9
> --- FunctionalTests.java 2001/10/18 13:28:38 1.8
> +++ FunctionalTests.java 2001/10/18 14:26:39 1.9
> @@ -37,8 +37,10 @@
> // bid-buy test
> suite.addTestSuite(TestBidBuySample.class);
>
> + /* Removed since it tests Sessions which
> SimpleAxisServer doesn't do
> // address book test
> suite.addTestSuite(TestAddressBookSample.class);
> + */
>
> // "Raw" echo service test.
> suite.addTestSuite(TestMiscSample.class);
>
>
>
>