butek 02/04/04 06:35:35
Modified: java TODO.txt
java/src/javax/xml/rpc/server ServiceLifecycle.java
java/src/javax/xml/rpc/soap SOAPFault.java
SOAPHeaderFault.java
Added: java/src/javax/xml/rpc/server ServletEndpointContext.java
Log:
These are the last of the JAX-RPC INTERFACE compliance changes. Now
that all our interfaces are (mostly) up to JAX-RPC, we have to start tackling
the implementation of all of these interfaces. The TODO list lists what
needs to be done.
Revision Changes Path
1.35 +2 -0 xml-axis/java/TODO.txt
Index: TODO.txt
===================================================================
RCS file: /home/cvs/xml-axis/java/TODO.txt,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- TODO.txt 3 Apr 2002 16:14:11 -0000 1.34
+++ TODO.txt 4 Apr 2002 14:35:34 -0000 1.35
@@ -30,6 +30,8 @@
! <> Implement TypeMapping and TypeMappingRegistry ala JAX-RPC 0.8
! <> Implement Handler code ala JAX-RPC 0.8
! <> Once we get word that javax.xml.rpc.encoding.XMLType is a real class (it's in
the JAX-RPC javadocs but not in the spec) then replace all the constants in
org.apache.axis.encoding.XMLType with the JAX-RPC constants.
+! <> Implement javax.xml.rpc.server interfaces.
+! <> Change all the samples (and the tests?) to use the JAX-RPC interfaces rather
than the AXIS ones.
SOAP 1.2 SUPPORT
----------------
1.2 +9 -6 xml-axis/java/src/javax/xml/rpc/server/ServiceLifecycle.java
Index: ServiceLifecycle.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/server/ServiceLifecycle.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServiceLifecycle.java 28 Jan 2002 15:30:22 -0000 1.1
+++ ServiceLifecycle.java 4 Apr 2002 14:35:35 -0000 1.2
@@ -54,11 +54,14 @@
*/
package javax.xml.rpc.server;
-import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.ServiceException;
/**
- * The <code>javax.xml.rpc.server.ServiceLifecycle</code> defines
- * a lifecycle interface for servlet based JAX-RPC endpoint.
+ * The <code>javax.xml.rpc.server.ServiceLifecycle</code> defines a
+ * lifecycle interface for a JAX-RPC service endpoint. If the service
+ * endpoint class implements the <code>ServiceLifeycle</code> interface,
+ * the servlet container based JAX-RPC runtime system is required to
+ * manage the lifecycle of the corresponding service endpoint objects.
*/
public interface ServiceLifecycle {
@@ -71,11 +74,11 @@
* @param context Initialization context for a JAX-RPC service
endpoint; Carries javax.servlet.ServletContext
for the servlet based JAX-RPC endpoints
- * @throws JAXRPCException If any error in initialization of the
+ * @throws ServiceException If any error in initialization of the
service endpoint; or if any illegal context has
been provided in the init method
*/
- public abstract void init(Object context) throws JAXRPCException;
+ public abstract void init(Object context) throws ServiceException;
/**
* JAX-RPC runtime system ends the lifecycle of a service endpoint
@@ -84,4 +87,4 @@
* method.
*/
public abstract void destroy();
-}
\ No newline at end of file
+}
1.1
xml-axis/java/src/javax/xml/rpc/server/ServletEndpointContext.java
Index: ServletEndpointContext.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package javax.xml.rpc.server;
import java.security.Principal;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletContext;
import javax.xml.rpc.handler.MessageContext;
/**
* The ServletEndpointContext provides an endpoint context maintained by the
* underlying servlet container based JAX-RPC runtime system. For service
* endpoints deployed on a servlet container based JAX-RPC runtime system, the
* context parameter in the ServiceLifecycle.init method is required to be of
* the Java type <code>javax.xml.rpc.server.ServletEndpointContext</code>.
* <p>
* A servlet container based JAX-RPC runtime system implements the
* <code>ServletEndpointContext</code> interface. The JAX-RPC runtime system is
* required to provide appropriate session, message context, servlet context and
* user principal information per method invocation on the endpoint class.
*/
public interface ServletEndpointContext {
/**
* The method getMessageContext returns the MessageContext targeted for this
* endpoint object. This enables the endpoint object to acccess the
* MessageContext propagated by request HandlerChain (and its contained
* Handler instances) to the target endpoint object and to share any SOAP
* message processing related context. The endpoint object can access and
* manipulate the MessageContext and share the SOAP message processing
* related context with the response HandlerChain.
*
* @throws java.lang.IllegalStateException - if this method is invoked
* outside a remote method implementation by an endpoint object.
*/
public MessageContext getMessageContext();
/**
* Returns a <code>java.security.Principal</code> instance that contains the
* name of the authenticated user for the current method invocation on the
* endpoint object. This method returns null if there is no associated
* principal yet. The underlying JAX-RPC runtime system takes the
* responsibility of providing the appropriate authenticated principal for a
* remote method invocation on the service endpoint object.
*/
public Principal getUserPrincipal();
/**
* The getHttpSession method returns the current HTTP session (as a
* javax.servlet.http.HTTPSession). When invoked by the service endpoint
* within a remote method implementation, the getHttpSession returns the
* HTTP session associated currently with this method invocation. This
* method returns null if there is no HTTP session currently active and
* associated with this service endpoint. An endpoint class should not rely
* on an active HTTP session being always there; the underlying JAX-RPC
* runtime system is responsible for managing whether or not there is an
* active HTTP session.
*
* @throws JAXRPCException - If this method invoked by a non-HTTP bound
* endpoints.
*/
public HttpSession getHttpSession();
/**
* The method getServletContext returns the ServletContext associated with
* the web application that contain this endpoint. According to the Servlet
* specification. There is one context per web application (installed as a
* WAR) per JVM . A servlet based service endpoint is deployed as part of a
* web application.
*/
public ServletContext getServletContext();
}
1.7 +1 -26 xml-axis/java/src/javax/xml/rpc/soap/SOAPFault.java
Index: SOAPFault.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/soap/SOAPFault.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SOAPFault.java 28 Jan 2002 15:30:22 -0000 1.6
+++ SOAPFault.java 4 Apr 2002 14:35:35 -0000 1.7
@@ -65,7 +65,7 @@
* and is declared as a checked exception in the service
* definition interface.
*/
-public class SOAPFault extends Exception {
+public class SOAPFault extends RuntimeException {
/**
* Constructor for SOAPFault
@@ -85,15 +85,6 @@
}
/**
- * Sets the faultcode that provides an algorithmic mechanism
- * for the identification of a SOAP fault.
- * @param faultcode Qualified name of the faultcode
- */
- public void setFaultCode(QName faultcode) {
- this.faultcode = faultcode;
- }
-
- /**
* Gets the faultcode element.
* @return Qualified name of the faultcode element
*/
@@ -102,27 +93,11 @@
}
/**
- * Sets the faultstring element.
- * @param faultstring The faultstring element of the SOAP fault
- */
- public void setFaultString(String faultstring) {
- this.faultstring = faultstring;
- }
-
- /**
* Gets the faultstring element.
* @return faultstring element of the SOAP fault
*/
public String getFaultString() {
return faultstring;
- }
-
- /**
- * Sets the faultactor element.
- * @param faultactor element of the SOAP fault
- */
- public void setFaultActor(String faultactor) {
- this.faultactor = faultactor;
}
/**
1.2 +0 -25 xml-axis/java/src/javax/xml/rpc/soap/SOAPHeaderFault.java
Index: SOAPHeaderFault.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/soap/SOAPHeaderFault.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SOAPHeaderFault.java 28 Jan 2002 15:30:22 -0000 1.1
+++ SOAPHeaderFault.java 4 Apr 2002 14:35:35 -0000 1.2
@@ -78,15 +78,6 @@
}
/**
- * Sets the faultcode that provides an algorithmic mechanism
- * for the identification of a SOAP fault.
- * @param faultcode Qualified name of the faultcode
- */
- public void setFaultCode(QName faultcode) {
- this.faultcode = faultcode;
- }
-
- /**
* Gets the faultcode element.
* @return Qualified name of the faultcode element
*/
@@ -95,27 +86,11 @@
}
/**
- * Sets the faultstring element.
- * @param faultstring The faultstring element of the SOAP fault
- */
- public void setFaultString(String faultstring) {
- this.faultstring = faultstring;
- }
-
- /**
* Gets the faultstring element.
* @return faultstring element of the SOAP fault
*/
public String getFaultString() {
return faultstring;
- }
-
- /**
- * Sets the faultactor element.
- * @param faultactor element of the SOAP fault
- */
- public void setFaultActor(String faultactor) {
- this.faultactor = faultactor;
}
/**