001 /* 002 * Copyright 2001-2004 The Apache Software Foundation. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package javax.xml.rpc.handler.soap; 017 018 import javax.xml.rpc.handler.MessageContext; 019 import javax.xml.soap.SOAPMessage; 020 021 /** 022 * The interface <code>javax.xml.rpc.soap.SOAPMessageContext</code> 023 * provides access to the SOAP message for either RPC request or 024 * response. The <code>javax.xml.soap.SOAPMessage</code> specifies 025 * the standard Java API for the representation of a SOAP 1.1 message 026 * with attachments. 027 * 028 * @version 1.0 029 * @see javax.xml.soap.SOAPMessage 030 */ 031 public interface SOAPMessageContext extends MessageContext { 032 033 /** 034 * Gets the SOAPMessage from this message context. 035 * 036 * @return the <code>SOAPMessage</code>; <code>null</code> if no request 037 * <code>SOAPMessage</code> is present in this 038 * <code>SOAPMessageContext</code> 039 */ 040 public abstract SOAPMessage getMessage(); 041 042 /** 043 * Sets the <code>SOAPMessage</code> for this message context. 044 * 045 * @param message SOAP message 046 * @throws javax.xml.rpc.JAXRPCException if any error during the setting 047 * of the SOAPMessage in this message context 048 * @throws java.lang.UnsupportedOperationException if this 049 * operation is not supported 050 */ 051 public abstract void setMessage(SOAPMessage message); 052 053 /** 054 * Gets the SOAP actor roles associated with an execution 055 * of the HandlerChain and its contained Handler instances. 056 * Note that SOAP actor roles apply to the SOAP node and 057 * are managed using <code>HandlerChain.setRoles</code> and 058 * <code>HandlerChain.getRoles</code>. Handler instances in 059 * the HandlerChain use this information about the SOAP actor 060 * roles to process the SOAP header blocks. Note that the 061 * SOAP actor roles are invariant during the processing of 062 * SOAP message through the HandlerChain. 063 * 064 * @return Array of URIs for SOAP actor roles 065 * @see javax.xml.rpc.handler.HandlerChain#setRoles(java.lang.String[]) HandlerChain.setRoles(java.lang.String[]) 066 * @see javax.xml.rpc.handler.HandlerChain#getRoles() HandlerChain.getRoles() 067 */ 068 public abstract String[] getRoles(); 069 } 070