PortComponentType[] portComponents = webserviceDescription.getPortComponentArray();
for (PortComponentType portComponent : portComponents) {
String portComponentName = portComponent.getPortComponentName().getStringValue().trim();
QName portQName = portComponent.getWsdlPort().getQNameValue();
String seiInterfaceName = portComponent.getServiceEndpointInterface().getStringValue().trim();
ServiceImplBeanType serviceImplBeanType = portComponent.getServiceImplBean();
if (isEJB == serviceImplBeanType.isSetServletLink()) {
throw new DeploymentException("Wrong kind of web service described in web service descriptor: expected " + (isEJB ? "EJB" : "POJO(Servlet)"));
}
String linkName;
String servletLocation;
if (serviceImplBeanType.isSetServletLink()) {
linkName = serviceImplBeanType.getServletLink().getStringValue().trim();
servletLocation = (String) servletLocations.get(linkName);
if (servletLocation == null) {
throw new DeploymentException("No servlet mapping for port " + portComponentName);
}
} else {
linkName = serviceImplBeanType.getEjbLink().getStringValue().trim();
servletLocation = (String) servletLocations.get(linkName);
}
PortComponentHandlerType[] handlers = portComponent.getHandlerArray();
PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName, seiInterfaceName, handlers, servletLocation);