1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package jtr.config.ws; |
8 |
| |
9 |
| import java.io.Serializable; |
10 |
| import java.util.Collection; |
11 |
| import java.util.HashMap; |
12 |
| |
13 |
| import javax.xml.namespace.QName; |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| public class WebServiceService implements Serializable { |
31 |
| |
32 |
| |
33 |
| |
34 |
0
| public WebServiceService() {
|
35 |
0
| portTypes = new HashMap<QName,WebServicePortType>();
|
36 |
0
| ports = new HashMap<String,WebServicePort>();
|
37 |
0
| typeMappings = new HashMap<QName,WebServiceTypeMapping>();
|
38 |
| } |
39 |
| |
40 |
| |
41 |
| |
42 |
| |
43 |
| |
44 |
0
| public Collection<WebServicePortType> getPortTypes() {
|
45 |
0
| return portTypes.values();
|
46 |
| } |
47 |
| |
48 |
| |
49 |
| |
50 |
| |
51 |
| |
52 |
0
| public String getName() {
|
53 |
0
| return name;
|
54 |
| } |
55 |
| |
56 |
| |
57 |
| |
58 |
| |
59 |
| |
60 |
0
| public void setNameSpace(String nameSpace) {
|
61 |
0
| this.nameSpace = nameSpace;
|
62 |
| } |
63 |
| |
64 |
| |
65 |
| |
66 |
| |
67 |
| |
68 |
0
| public void setPortTypes(Collection<WebServicePortType> portTypes) {
|
69 |
0
| for(WebServicePortType pt : portTypes) {
|
70 |
0
| this.addPortType(pt);
|
71 |
| } |
72 |
| } |
73 |
| |
74 |
| |
75 |
| |
76 |
| |
77 |
| |
78 |
0
| public void setName(String name) {
|
79 |
0
| this.name = name;
|
80 |
| } |
81 |
| |
82 |
| |
83 |
| |
84 |
| |
85 |
| |
86 |
0
| public void setPorts(Collection<WebServicePort> ports) {
|
87 |
0
| for(WebServicePort p : ports) {
|
88 |
0
| this.addPort(p);
|
89 |
| } |
90 |
| } |
91 |
| |
92 |
| |
93 |
| |
94 |
| |
95 |
| |
96 |
0
| public String getNameSpace() {
|
97 |
0
| return nameSpace;
|
98 |
| } |
99 |
| |
100 |
| |
101 |
| |
102 |
| |
103 |
| |
104 |
0
| public Collection<WebServicePort> getPorts() {
|
105 |
0
| return ports.values();
|
106 |
| } |
107 |
| |
108 |
| |
109 |
| |
110 |
| |
111 |
| |
112 |
0
| public void addPortType(WebServicePortType pt) {
|
113 |
0
| portTypes.put(new QName(pt.getNameSpace(),pt.getName()),pt);
|
114 |
| } |
115 |
| |
116 |
| |
117 |
| |
118 |
| |
119 |
| |
120 |
0
| public void addPort(WebServicePort port) {
|
121 |
0
| ports.put(port.getName(),port);
|
122 |
| } |
123 |
| |
124 |
| |
125 |
| |
126 |
| |
127 |
| |
128 |
| |
129 |
0
| public Collection<WebServiceTypeMapping> getTypeMappings() {
|
130 |
0
| return typeMappings.values();
|
131 |
| } |
132 |
| |
133 |
| |
134 |
| |
135 |
| |
136 |
| |
137 |
| |
138 |
0
| public void setTypeMappings(Collection<WebServiceTypeMapping> typeMappings) {
|
139 |
0
| for(WebServiceTypeMapping tm : typeMappings) {
|
140 |
0
| this.addTypeMapping(tm);
|
141 |
| } |
142 |
| } |
143 |
| |
144 |
| |
145 |
| |
146 |
| |
147 |
| |
148 |
| |
149 |
0
| public void addTypeMapping(QName qualifiedName, WebServiceTypeMapping tm) {
|
150 |
0
| tm.setQualifiedName(qualifiedName);
|
151 |
0
| this.typeMappings.put(qualifiedName,tm);
|
152 |
| } |
153 |
| |
154 |
| |
155 |
| |
156 |
| |
157 |
| |
158 |
| |
159 |
| |
160 |
0
| public void addTypeMapping(String nameSpace, String name, String javaClassName) {
|
161 |
0
| WebServiceTypeMapping mapping = new WebServiceTypeMapping();
|
162 |
0
| mapping.setQualifiedName(nameSpace, name);
|
163 |
0
| mapping.setJavaClassName(javaClassName);
|
164 |
0
| this.addTypeMapping(mapping);
|
165 |
| } |
166 |
| |
167 |
| |
168 |
| |
169 |
| |
170 |
| |
171 |
| |
172 |
0
| public void addTypeMapping(QName qName, String javaClassName) {
|
173 |
0
| WebServiceTypeMapping mapping = new WebServiceTypeMapping();
|
174 |
0
| mapping.setQualifiedName(qName);
|
175 |
0
| mapping.setJavaClassName(javaClassName);
|
176 |
0
| this.addTypeMapping(mapping);
|
177 |
| } |
178 |
| |
179 |
| |
180 |
| |
181 |
| |
182 |
| |
183 |
0
| public void addTypeMapping(WebServiceTypeMapping typeMapping) {
|
184 |
0
| typeMappings.put(typeMapping.getQualifiedName(),typeMapping);
|
185 |
| } |
186 |
| |
187 |
| |
188 |
| |
189 |
| |
190 |
| |
191 |
| |
192 |
| |
193 |
0
| public WebServicePortType getPortType(QName qName) {
|
194 |
0
| return portTypes.get(qName);
|
195 |
| } |
196 |
| |
197 |
| |
198 |
| |
199 |
| |
200 |
| |
201 |
| |
202 |
| |
203 |
0
| public WebServicePort getPort(String name) {
|
204 |
0
| return ports.get(name);
|
205 |
| } |
206 |
| |
207 |
| |
208 |
| |
209 |
| |
210 |
| |
211 |
| |
212 |
| |
213 |
0
| public WebServiceTypeMapping getTypeMapping(QName qName) {
|
214 |
0
| return typeMappings.get(qName);
|
215 |
| } |
216 |
| |
217 |
| private String nameSpace; |
218 |
| |
219 |
| private String name; |
220 |
| |
221 |
| private HashMap<QName,WebServicePortType> portTypes; |
222 |
| |
223 |
| private HashMap<String,WebServicePort> ports; |
224 |
| |
225 |
| private HashMap<QName,WebServiceTypeMapping> typeMappings; |
226 |
| } |