View Javadoc

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   *    &lt;binding name=&quot;EJOEBinding&quot; type=&quot;tns:AddressBook&quot;&gt;
43   *   		&lt;ejoe:binding /&gt;
44   *   		&lt;format:typeMapping encoding=&quot;Java&quot; style=&quot;Java&quot;&gt;
45   *   			&lt;format:typeMap typeName=&quot;typens:address&quot;
46   *   				formatType=&quot;de.netseeker.ejoe.test.client.stub.addressbook.wsiftypes.Address&quot; /&gt;
47   *   			&lt;format:typeMap typeName=&quot;xsd:string&quot;
48   *   				formatType=&quot;java.lang.String&quot; /&gt;
49   *   		&lt;/format:typeMapping&gt;
50   *   		&lt;operation name=&quot;addEntry&quot;&gt;
51   *   		...
52   *   	&lt;/binding&gt;
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       * (non-Javadoc)
68       * 
69       * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
70       */
71      public void setElementType( QName elementType )
72      {
73          fieldElementType = elementType;
74      }
75  
76      /*
77       * (non-Javadoc)
78       * 
79       * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
80       */
81      public QName getElementType()
82      {
83          return fieldElementType;
84      }
85  
86      /*
87       * (non-Javadoc)
88       * 
89       * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
90       */
91      public void setRequired( Boolean required )
92      {
93          fieldRequired = required;
94      }
95  
96      /*
97       * (non-Javadoc)
98       * 
99       * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
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 }