001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)SOAPMessageContext.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.internal.security.test.binding1.rt;
030:
031: import javax.xml.soap.SOAPMessage;
032: import com.sun.jbi.binding.security.MessageContext;
033:
034: /**
035: * Implementation of the MessageContext interface ( mostly domain of SOAP binding ).
036: * This is the runtime context passed to the interceptor at execution time and may vary
037: * depending on how generic we want to make it.
038: *
039: * @author Sun Microsystems, Inc.
040: */
041: public class SOAPMessageContext extends ContextImpl implements
042: MessageContext {
043: /** The SOAP Message */
044: private SOAPMessage mSoapMessage;
045:
046: /** The SOAP Error Message ( mostly a FAULT ) */
047: private SOAPMessage mRespSoapMessage;
048:
049: /**
050: * Creates a new instance of SampleSoapMessageContext.
051: *
052: * @param msg is the SOAPMessage
053: */
054: public SOAPMessageContext(SOAPMessage msg) {
055: mSoapMessage = msg;
056: mRespSoapMessage = null;
057: }
058:
059: /* ------------------------------------------------------------------------------- *\
060: * Message Ctx *
061: \* ------------------------------------------------------------------------------- */
062:
063: /**
064: * Get the SOAP Message associated with this Context.
065: *
066: * @return the SOAP Message in the Context
067: */
068: public Object getMessage() {
069: return mSoapMessage;
070: };
071:
072: /**
073: * Set the SOAP Message associated with this Context.
074: *
075: * @param msg is the SOAP Message in the Context
076: */
077: public void setMessage(Object msg) {
078: mSoapMessage = (SOAPMessage) msg;
079: };
080:
081: /**
082: * Get the ResponseMessage, a response message is present in the Context only when
083: * validation of an incoming request message, results in a response message to
084: * be sent to the sender of the request
085: *
086: * @return the Response Message in the Context
087: */
088: public Object getResponseMessage() {
089: return mRespSoapMessage;
090: }
091:
092: /**
093: * Set the ResponseMessage, a response message is present in the Context only when
094: * validation of an incoming request message, results in a respponse message to
095: * be sent to the sender of the request
096: *
097: * @param respMsg is the Error Message in the Context
098: */
099: public void setResponseMessage(Object respMsg) {
100: mRespSoapMessage = (SOAPMessage) respMsg;
101: }
102:
103: }
|