KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > wsmgmt > SOAPMessageContext_1_0


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.admin.wsmgmt;
24
25 import javax.xml.soap.SOAPMessage JavaDoc;
26 import java.util.Iterator JavaDoc;
27
28 /**
29  * SOAP Message Context. This encapsulates the required data for web services
30  * management either from JAXWS 1.0 or 2.0 MessageContext.
31  */

32 public class SOAPMessageContext_1_0 implements SOAPMessageContext {
33
34     /**
35      * Constructed from JAXWS 1.0 MessageContext
36      *
37      * @param cause the cause of this error
38      */

39     public SOAPMessageContext_1_0(
40         com.sun.xml.rpc.spi.runtime.SOAPMessageContext smc) {
41         if ( smc == null) {
42             throw new IllegalArgumentException JavaDoc();
43         }
44         _smc = smc;
45     }
46
47     /**
48      * Gets the SOAPMessage for this web service invocation.
49      *
50      * @return SOAPMessage for this web service invocation
51      */

52     public SOAPMessage JavaDoc getMessage() {
53         return _smc.getMessage();
54     }
55
56     /**
57      * Gets the PropertyNames for this web service invocation.
58      *
59      * @return PropertyNames for this web service invocation
60      */

61     public Iterator JavaDoc getPropertyNames() {
62         return _smc.getPropertyNames();
63     }
64
65     /**
66      * Gets the PropertyNames for this web service invocation.
67      *
68      * @return PropertyNames for this web service invocation
69      */

70     public Object JavaDoc getProperty(String JavaDoc name) {
71         return _smc.getProperty(name);
72     }
73
74     /**
75      * Sets the SOAPMessage in the message context.
76      *
77      * @param msg the SOAPMessage to be set in the message context
78      */

79     public void setMessage(SOAPMessage JavaDoc msg) {
80         _smc.setMessage(msg);
81     }
82
83     /**
84      * Sets the message context.
85      *
86      * @param smc the new message context
87      */

88     public void setMessageContext(com.sun.xml.rpc.spi.runtime.SOAPMessageContext
89     smc) {
90         if ( smc == null) {
91             throw new IllegalArgumentException JavaDoc();
92         }
93         _smc = smc;
94     }
95
96     /**
97      * Gets the HTTP Request headers in the message.
98      *
99      * @return the HTTP Request headers in the message.
100      */

101     public String JavaDoc getHTTPRequestHeaders() {
102         return null;
103     }
104
105     /**
106      * Gets the HTTP Response headers in the message.
107      *
108      * @return the HTTP Response headers in the message.
109      */

110     public String JavaDoc getHTTPResponseHeaders() {
111         return null;
112     }
113
114     // Private variables
115
private com.sun.xml.rpc.spi.runtime.SOAPMessageContext _smc = null;
116
117 }
118
Popular Tags