001: /*
002: * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: * Free SoftwareFoundation, Inc.
023: * 59 Temple Place, Suite 330
024: * Boston, MA 02111-1307 USA
025: *
026: * @author Emil Ong
027: */
028:
029: package com.caucho.soap.wsdl;
030:
031: import javax.xml.bind.annotation.XmlAccessType;
032: import javax.xml.bind.annotation.XmlAccessorType;
033: import javax.xml.bind.annotation.XmlAttribute;
034: import javax.xml.bind.annotation.XmlRootElement;
035:
036: import javax.xml.namespace.QName;
037:
038: import java.util.ArrayList;
039: import java.util.List;
040:
041: /**
042: * SOAP body definition
043: */
044: @XmlAccessorType(XmlAccessType.FIELD)
045: @XmlRootElement(name="body",namespace="http://schemas.xmlsoap.org/wsdl/soap/")
046: public class SOAPBody extends WSDLExtensibilityElement {
047: @XmlAttribute(name="parts")
048: private List<String> _parts;
049:
050: @XmlAttribute(name="encodingStyle")
051: private List<String> _encodingStyle;
052:
053: @XmlAttribute(name="namespace")
054: private String _namespace;
055:
056: @XmlAttribute(name="use")
057: private SOAPUseChoice _use;
058:
059: // XXX Added to accommodate WSDL given in TCK, but not in schema!
060: @XmlAttribute(name="message")
061: private QName _message;
062:
063: public void addPart(String part) {
064: if (_parts == null)
065: _parts = new ArrayList<String>();
066:
067: _parts.add(part);
068: }
069:
070: public List<String> getParts() {
071: if (_parts == null)
072: _parts = new ArrayList<String>();
073:
074: return _parts;
075: }
076:
077: public void addEncodingStyle(String encodingStyle) {
078: if (_encodingStyle == null)
079: _encodingStyle = new ArrayList<String>();
080:
081: _encodingStyle.add(encodingStyle);
082: }
083:
084: public List<String> getEncodingStyle() {
085: if (_encodingStyle == null)
086: _encodingStyle = new ArrayList<String>();
087:
088: return _encodingStyle;
089: }
090:
091: public void setNamespace(String namespace) {
092: _namespace = namespace;
093: }
094:
095: public String getNamespace() {
096: return _namespace;
097: }
098:
099: public void setUse(SOAPUseChoice use) {
100: _use = use;
101: }
102:
103: public SOAPUseChoice getUse() {
104: return _use;
105: }
106: }
|