KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > remote > soap > SOAPService


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.remote.soap;
10
11 import mx4j.tools.remote.http.HTTPService;
12 import org.apache.axis.MessageContext;
13
14 /**
15  * The server-side service (the WebService actually) where remote calls end up
16  * after being parsed by Axis.
17  * This is, in Axis jargon, the 'pivot' of the invocation chain.
18  * It is used in the Axis deployment descriptor, and as such must be a public class.
19  *
20  * @version $Revision: 1.3 $
21  */

22 public class SOAPService extends HTTPService
23 {
24    protected String JavaDoc findRequestURL()
25    {
26       MessageContext context = MessageContext.getCurrentContext();
27       return (String JavaDoc)context.getProperty(MessageContext.TRANS_URL);
28    }
29
30    protected String JavaDoc getProtocol()
31    {
32       return "soap";
33    }
34
35    protected String JavaDoc findConnectionId()
36    {
37       MessageContext context = MessageContext.getCurrentContext();
38       return (String JavaDoc)context.getProperty(SOAPConstants.CONNECTION_ID_HEADER_NAME);
39    }
40 }
41
Popular Tags