KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > soap > wsdl > SOAPBody


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Emil Ong
27  */

28
29 package com.caucho.soap.wsdl;
30
31 import javax.xml.bind.annotation.XmlAccessType;
32 import javax.xml.bind.annotation.XmlAccessorType;
33 import javax.xml.bind.annotation.XmlAttribute;
34 import javax.xml.bind.annotation.XmlRootElement;
35 import java.util.ArrayList JavaDoc;
36 import java.util.List JavaDoc;
37
38 /**
39  * SOAP body definition
40  */

41 @XmlAccessorType(XmlAccessType.FIELD)
42 @XmlRootElement(name="body", namespace="http://schemas.xmlsoap.org/wsdl/soap/")
43 public class SOAPBody extends WSDLExtensibilityElement {
44   @XmlAttribute(name="parts")
45   private List JavaDoc<String JavaDoc> _parts;
46
47   @XmlAttribute(name="encodingStyle")
48   private List JavaDoc<String JavaDoc> _encodingStyle;
49
50   @XmlAttribute(name="namespace")
51   private String JavaDoc _namespace;
52
53   @XmlAttribute(name="use")
54   private SOAPUseChoice _use;
55
56   public void addPart(String JavaDoc part)
57   {
58     if (_parts == null)
59       _parts = new ArrayList JavaDoc<String JavaDoc>();
60
61     _parts.add(part);
62   }
63
64   public List JavaDoc<String JavaDoc> getParts()
65   {
66     if (_parts == null)
67       _parts = new ArrayList JavaDoc<String JavaDoc>();
68
69     return _parts;
70   }
71
72   public void addEncodingStyle(String JavaDoc encodingStyle)
73   {
74     if (_encodingStyle == null)
75       _encodingStyle = new ArrayList JavaDoc<String JavaDoc>();
76
77     _encodingStyle.add(encodingStyle);
78   }
79
80   public List JavaDoc<String JavaDoc> getEncodingStyle()
81   {
82     if (_encodingStyle == null)
83       _encodingStyle = new ArrayList JavaDoc<String JavaDoc>();
84
85     return _encodingStyle;
86   }
87
88   public void setNamespace(String JavaDoc namespace)
89   {
90     _namespace = namespace;
91   }
92
93   public String JavaDoc getNamespace()
94   {
95     return _namespace;
96   }
97
98   public void setUse(SOAPUseChoice use)
99   {
100     _use = use;
101   }
102
103   public SOAPUseChoice getUse()
104   {
105     return _use;
106   }
107 }
108
Popular Tags