KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > transport > axis > AxisHandler


1 /*
2  * Copyright 2001-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.juddi.transport.axis;
17
18 import org.apache.axis.Message;
19 import org.apache.axis.MessageContext;
20 import org.apache.axis.handlers.BasicHandler;
21 import org.apache.axis.message.SOAPEnvelope;
22
23 /**
24  * @author Steve Viens (sviens@apache.org)
25  */

26 public class AxisHandler extends BasicHandler
27 {
28   /**
29    * Init is called when the chain containing this
30    * Handler object is instantiated.
31    */

32   public void init()
33   {
34     super.init();
35   }
36
37   /**
38    * Cleanup is called when the chain containing this
39    * Handler object is done processing the chain.
40    */

41   public void cleanup()
42   {
43     super.cleanup();
44   }
45
46   /**
47    * Invoke is called to do the actual work of the
48    * Handler object. If there is a fault during the
49    * processing of this method it is invoke's job to
50    * catch the exception and undo any partial work that
51    * has been completed. Once we leave 'invoke' if a
52    * fault is thrown, this classes 'onFault' method
53    * will be called. Invoke should rethrow any
54    * exceptions it catches, wrapped in an AxisFault.
55    */

56   public void invoke(MessageContext context)
57   {
58     Message response = new Message(new SOAPEnvelope());
59     /*Message request = context.getRequestMessage();
60
61     // Determine if this message came from through
62     // the Publish, Inquiry or Admin API and handle
63     // it appropriately.
64
65     Object servlet = context.getProperty("transport.http.servlet");*/

66
67     new AxisProcessor(response,context);
68
69     context.setResponseMessage(response);
70   }
71 }
Popular Tags