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