KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > axis > SoapServer


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.components.axis;
17
18 import javax.servlet.http.HttpServletRequest JavaDoc;
19 import javax.servlet.http.HttpServletResponse JavaDoc;
20 import javax.servlet.ServletContext JavaDoc;
21
22 import org.apache.avalon.framework.activity.Startable;
23 import org.apache.avalon.framework.component.Component;
24
25 import org.apache.axis.MessageContext;
26
27 /**
28  * <code>SoapServer</code> interface.
29  *
30  * <p>
31  * This interface describes the operations provided by any Axis
32  * Soap Server implementations.
33  * </p>
34  *
35  * <p>
36  * Example use:
37  *
38  * <pre>
39  * SoapServer server = (SoapServer) manager.lookup(SoapServer.ROLE);
40  * MessageContext message = server.createMessageContext(req, res, con);
41  * server.invoke(message);
42  * manager.release(server);
43  * // message sent back to sender
44  * </pre>
45  * </p>
46  *
47  * @author <a HREF="mailto:crafterm@apache.org">Marcus Crafter</a>
48  * @version CVS $Id: SoapServer.java 149132 2005-01-30 18:24:33Z cziegeler $
49  */

50 public interface SoapServer extends Component, Startable {
51
52     /**
53      * Component's ROLE definition
54      */

55     String JavaDoc ROLE = SoapServer.class.getName();
56
57     /**
58      * Constant used to key message context entries for an avalon logger
59      */

60     String JavaDoc LOGGER = "axis-message-context-logger";
61
62     /**
63      * Invoke a particular message context on this server. This method
64      * takes the given message, invokes it on the server and sets
65      * the response inside it for the caller to retrieve.
66      *
67      * @param message a <code>MessageContext</code> instance
68      * @exception Exception if an error occurs
69      */

70     void invoke(MessageContext message)
71         throws Exception JavaDoc;
72
73     /**
74      * Method to create a new message context, based on this Axis
75      * server instance, and the caller's request, response, and
76      * context objects.
77      *
78      * @param req a <code>HttpServletRequest</code> instance
79      * @param res a <code>HttpServletResponse</code> instance
80      * @param con a <code>ServletContext</code> instance
81      * @return a <code>MessageContext</code> instance
82      */

83     MessageContext createMessageContext(
84         HttpServletRequest JavaDoc req,
85         HttpServletResponse JavaDoc res,
86         ServletContext JavaDoc con
87     );
88 }
89
Popular Tags