JavaWsdlMappingType javaWsdlMapping = readJaxrpcMapping(moduleFile, jaxrpcMappingURI);
HashMap seiMappings = new HashMap();
ServiceEndpointInterfaceMappingType[] mappings = javaWsdlMapping.getServiceEndpointInterfaceMappingArray();
for (int j = 0; j < mappings.length; j++) {
ServiceEndpointInterfaceMappingType seiMapping = mappings[j];
seiMappings.put(seiMapping.getServiceEndpointInterface().getStringValue(), seiMapping);
}
PortComponentType[] portComponents = webserviceDescription.getPortComponentArray();
for (int j = 0; j < portComponents.length; j++) {
PortComponentType portComponent = portComponents[j];
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 " + portQName);
}
schemaInfoBuilder.movePortLocation(portQName.getLocalPart(), servletLocation);
} else {
linkName = serviceImplBeanType.getEjbLink().getStringValue().trim();
servletLocation = (String) servletLocations.get(linkName);
servletLocation = schemaInfoBuilder.movePortLocation(portQName.getLocalPart(), servletLocation);
}
PortComponentHandlerType[] handlers = portComponent.getHandlerArray();
Port port = (Port) wsdlPortMap.get(portQName.getLocalPart());
if (port == null) {
throw new DeploymentException("No WSDL Port definition for port-component " + portComponentName);
}
ServiceEndpointInterfaceMappingType seiMapping = (ServiceEndpointInterfaceMappingType) seiMappings.get(seiInterfaceName);
String wsdlLocation = webserviceDescription.getWsdlFile().getStringValue().trim();
URI contextURI = null;
try {
contextURI = new URI(servletLocation);