1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.geronimo.ews.ws4j2ee.context.webservices.server.xmlbeans;
17
18 import com.sun.java.xml.ns.j2Ee.IconType;
19 import com.sun.java.xml.ns.j2Ee.ParamValueType;
20 import com.sun.java.xml.ns.j2Ee.PortComponentHandlerType;
21 import com.sun.java.xml.ns.j2Ee.XsdQNameType;
22 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AbstractWSCFHandler;
23 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFHandler;
24 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFInitParam;
25
26 /***
27 * This encapsulates the layer 3 handler element of the webservices.xml. This
28 * is also the concrete implementation of the WSCFHandler.
29 */
30 public class WSCFHandlerImpl extends AbstractWSCFHandler implements WSCFHandler {
31 public WSCFHandlerImpl(PortComponentHandlerType handler) {
32 this.description = XMLBeansUtils.getStringValue(handler.getDescriptionArray());
33 this.displayName = XMLBeansUtils.getStringValue(handler.getDisplayNameArray());
34 IconType[] icons = handler.getIconArray();
35 if (icons.length > 0) {
36 this.smallIcon = XMLBeansUtils.getStringValue(icons[0].getSmallIcon());
37 this.largeIcon = XMLBeansUtils.getStringValue(icons[0].getLargeIcon());
38 }
39 this.handlerName = XMLBeansUtils.getStringValue(handler.getHandlerName());
40 this.handlerClass = XMLBeansUtils.getStringValue(handler.getHandlerName());
41 ParamValueType[] list = handler.getInitParamArray();
42 for (int i = 0; i < list.length; i++) {
43 WSCFInitParam initParameters = new WSCFInitParamImpl(list[i]);
44 this.initParam.put(initParameters.getParamName(), initParameters);
45 }
46 XsdQNameType[] list2 = handler.getSoapHeaderArray();
47 for (int i = 0; i < list2.length; i++) {
48 this.soapHeader.add(new WSCFSOAPHeaderImpl(list2[i]));
49 }
50 com.sun.java.xml.ns.j2Ee.String[] list3 = handler.getSoapRoleArray();
51 for (int i = 0; i < list3.length; i++) {
52 this.soapRole.add(XMLBeansUtils.getStringValue(list3[i]));
53 }
54 }
55 }