View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package javax.xml.rpc.handler.soap;
17  
18  import javax.xml.rpc.handler.MessageContext;
19  import javax.xml.soap.SOAPMessage;
20  
21  /**
22   * The interface <code>javax.xml.rpc.soap.SOAPMessageContext</code>
23   * provides access to the SOAP message for either RPC request or
24   * response. The <code>javax.xml.soap.SOAPMessage</code> specifies
25   * the standard Java API for the representation of a SOAP 1.1 message
26   * with attachments.
27   *
28   * @version 1.0
29   * @see javax.xml.soap.SOAPMessage
30   */
31  public interface SOAPMessageContext extends MessageContext {
32  
33      /**
34       *  Gets the SOAPMessage from this message context.
35       *
36       *  @return the <code>SOAPMessage</code>; <code>null</code> if no request
37       *          <code>SOAPMessage</code> is present in this
38       *          <code>SOAPMessageContext</code>
39       */
40      public abstract SOAPMessage getMessage();
41  
42      /**
43       *  Sets the <code>SOAPMessage</code> for this message context.
44       *
45       *  @param   message  SOAP message
46       *  @throws  javax.xml.rpc.JAXRPCException  if any error during the setting
47       *     of the SOAPMessage in this message context
48       *  @throws java.lang.UnsupportedOperationException if this
49       *     operation is not supported
50       */
51      public abstract void setMessage(SOAPMessage message);
52  
53      /**
54       * Gets the SOAP actor roles associated with an execution
55       * of the HandlerChain and its contained Handler instances.
56       * Note that SOAP actor roles apply to the SOAP node and
57       * are managed using <code>HandlerChain.setRoles</code> and
58       * <code>HandlerChain.getRoles</code>. Handler instances in
59       * the HandlerChain use this information about the SOAP actor
60       * roles to process the SOAP header blocks. Note that the
61       * SOAP actor roles are invariant during the processing of
62       * SOAP message through the HandlerChain.
63       *
64       * @return Array of URIs for SOAP actor roles
65       * @see javax.xml.rpc.handler.HandlerChain#setRoles(java.lang.String[]) HandlerChain.setRoles(java.lang.String[])
66       * @see javax.xml.rpc.handler.HandlerChain#getRoles() HandlerChain.getRoles()
67       */
68      public abstract String[] getRoles();
69  }
70