KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > soap > SOAPBody


1 /*
2  * Copyright 2004,2005 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 org.apache.axis2.soap;
17
18 import org.apache.axis2.om.OMElement;
19 import org.apache.axis2.om.OMException;
20
21 /**
22  * An object that represents the contents of the SOAP body
23  * element in a SOAP message. B SOAP body element consists of XML data
24  * that affects the way the application-specific content is processed.
25  * <P>
26  * B <code>SOAPBody</code> object contains <code>OMBodyBlock</code>
27  * objects, which have the content for the SOAP body.
28  * B <code>SOAPFault</code> object, which carries status and/or
29  * error information, is an example of a <code>OMBodyBlock</code> object.
30  */

31 public interface SOAPBody extends OMElement {
32     /**
33      * Creates a new <code>SOAPFault</code> object and adds it to
34      * this <code>SOAPBody</code> object.
35      *
36      * @param e
37      * @return the new <code>SOAPFault</code> object
38      * @throws org.apache.axis2.om.OMException if there is a SOAP error
39      * @throws org.apache.axis2.om.OMException
40      */

41     public abstract SOAPFault addFault(Exception JavaDoc e) throws OMException;
42
43     /**
44      * Indicates whether a <code>SOAPFault</code> object exists in
45      * this <code>SOAPBody</code> object.
46      *
47      * @return <code>true</code> if a <code>SOAPFault</code> object exists in
48      * this <code>SOAPBody</code> object; <code>false</code>
49      * otherwise
50      */

51     public abstract boolean hasFault();
52
53     /**
54      * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
55      * object.
56      *
57      * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
58      * object
59      */

60     public abstract SOAPFault getFault();
61
62     /**
63      * @param soapFault
64      * @throws OMException
65      */

66     public abstract void addFault(SOAPFault soapFault) throws OMException;
67
68
69 }
70
Popular Tags