1 /**********************************************************************
2 * EJOEBinding.java
3 * created on 12.07.2006 by netseeker
4 * $Source$
5 * $Date$
6 * $Revision$
7 *
8 * ====================================================================
9 *
10 * Copyright 2006 netseeker aka Michael Manske
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 * ====================================================================
24 *
25 * This file is part of the EJOE framework.
26 * For more information on the author, please see
27 * <http://www.manskes.de/>.
28 *
29 *********************************************************************/
30
31 package de.netseeker.ejoe.ext.wsif.wsdl;
32
33 import java.io.Serializable;
34
35 import javax.wsdl.extensions.ExtensibilityElement;
36 import javax.xml.namespace.QName;
37
38 /***
39 * WSDL binding for the EJOE binding type. Example:
40 *
41 * <pre>
42 * <binding name="EJOEBinding" type="tns:AddressBook">
43 * <ejoe:binding />
44 * <format:typeMapping encoding="Java" style="Java">
45 * <format:typeMap typeName="typens:address"
46 * formatType="de.netseeker.ejoe.test.client.stub.addressbook.wsiftypes.Address" />
47 * <format:typeMap typeName="xsd:string"
48 * formatType="java.lang.String" />
49 * </format:typeMapping>
50 * <operation name="addEntry">
51 * ...
52 * </binding>
53 * </pre>
54 *
55 * @author netseeker
56 * @since 0.3.9.1
57 */
58 public class EJOEBinding implements ExtensibilityElement, Serializable
59 {
60 private static final long serialVersionUID = 1L;
61
62 protected Boolean fieldRequired;
63
64 protected QName fieldElementType = EJOEBindingConstants.Q_ELEM_EJOE_BINDING;
65
66
67
68
69
70
71 public void setElementType( QName elementType )
72 {
73 fieldElementType = elementType;
74 }
75
76
77
78
79
80
81 public QName getElementType()
82 {
83 return fieldElementType;
84 }
85
86
87
88
89
90
91 public void setRequired( Boolean required )
92 {
93 fieldRequired = required;
94 }
95
96
97
98
99
100
101 public Boolean getRequired()
102 {
103 return fieldRequired;
104 }
105
106 public String toString()
107 {
108 StringBuffer strBuf = new StringBuffer( super.toString() );
109
110 strBuf.append( "\nEJOEBinding (" + fieldElementType + "):" );
111 strBuf.append( "\nrequired=" + fieldRequired );
112
113 return strBuf.toString();
114 }
115 }