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.PortComponentHandlerType;
20 import com.sun.java.xml.ns.j2Ee.PortComponentType;
21 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AbstractWSCFPortComponent;
22 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFHandler;
23 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFPortComponent;
24
25 /***
26 * This encapsulates the level 2 Elemenr PortComponent which is a child element of the webservice-description element.
27 * It is also the concrete implmentation of the WSCFPortComponent.
28 */
29 public class WSCFPortComponentImpl extends AbstractWSCFPortComponent implements WSCFPortComponent {
30
31 public WSCFPortComponentImpl(PortComponentType pc) {
32
33 this.description = XMLBeansUtils.getStringValue(pc.getDescription());
34 this.displayName = XMLBeansUtils.getStringValue(pc.getDisplayName());
35 IconType icon = pc.getIcon();
36 if (icon != null) {
37 this.smallIcon = XMLBeansUtils.getStringValue(icon.getSmallIcon());
38 this.largeIcon = XMLBeansUtils.getStringValue(icon.getLargeIcon());
39 }
40 this.portComponentName = XMLBeansUtils.getStringValue(pc.getPortComponentName());
41 this.serviceEndpointInterface = XMLBeansUtils.getStringValue(pc.getServiceEndpointInterface());
42 this.wsdlPort = new WSCFWSDLPortImpl(pc.getWsdlPort());
43 this.serviceImplBean = new WSCFServiceImplBeanImpl(pc.getServiceImplBean());
44 PortComponentHandlerType[] list = pc.getHandlerArray();
45 for (int i = 0; i < list.length; i++) {
46 WSCFHandler handler = new WSCFHandlerImpl(list[i]);
47 this.handlers.put(handler.getHandlerName(), handler);
48 }
49 }
50
51 }