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.PortComponentType;
20 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AbstractWSCFWebserviceDescription;
21 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.WSCFException;
22 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFPortComponent;
23 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFWebserviceDescription;
24
25 /***
26 * This represents a level 1 element in the Element tree :webservice-description. This is the concrete implementation of the
27 * WSCFWebServiceDescription interface
28 */
29 public class WSCFWebserviceDescriptionImpl extends AbstractWSCFWebserviceDescription implements WSCFWebserviceDescription {
30 public WSCFWebserviceDescriptionImpl(com.sun.java.xml.ns.j2Ee.WebserviceDescriptionType wsdes) throws WSCFException {
31 this.description = XMLBeansUtils.getStringValue(wsdes.getDescription());
32 this.displayName = XMLBeansUtils.getStringValue(wsdes.getDisplayName());
33 IconType icon = wsdes.getIcon();
34 if (icon != null) {
35 this.smallIcon = XMLBeansUtils.getStringValue(icon.getSmallIcon());
36 this.largeIcon = XMLBeansUtils.getStringValue(icon.getLargeIcon());
37 }
38 this.webserviceDescriptionName = XMLBeansUtils.getStringValue(wsdes.getWebserviceDescriptionName());
39 this.wsdlFile = XMLBeansUtils.getStringValue(wsdes.getWsdlFile());
40 this.jaxrpcMappingFile = XMLBeansUtils.getStringValue(wsdes.getJaxrpcMappingFile());
41 ;
42 PortComponentType[] list = wsdes.getPortComponentArray();
43 if (0 == list.length) {
44 throw new WSCFException("At least one port-component element should exist in the " + this.description + " webservices element.");
45 }
46 for (int i = 0; i < list.length; i++) {
47 WSCFPortComponent portComponent = new WSCFPortComponentImpl(list[i]);
48 this.portComponent.put(portComponent.getPortComponentName(), portComponent);
49 }
50 }
51 }