GerPortType port = portCompletion.getPort();
URL location = getLocation(port);
String portName = port.getPortName().trim();
String bindingName = portCompletion.getBindingName().trim();
QName bindingQName = new QName(namespace, bindingName);
Binding binding = definition.getBinding(bindingQName);
if (binding == null) {
throw new DeploymentException("No binding found with qname: " + bindingQName);
}
String credentialsName = port.isSetCredentialsName() ? port.getCredentialsName().trim() : null;
mapBinding(binding, mapping, serviceQName, classLoader, context, module, soapVersion, schemaInfoBuilder, portName, serviceImpl, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName, exceptionMap);
}
} else {
//full wsdl
if (serviceRefType != null && serviceRefType.isSetServiceCompletion()) {
throw new DeploymentException("Full wsdl, but service completion supplied");
}
//organize the extra port info
Map portMap = new HashMap();
if (serviceRefType != null) {
GerPortType[] ports = serviceRefType.getPortArray();
for (int i = 0; i < ports.length; i++) {
GerPortType port = ports[i];
String portName = port.getPortName().trim();
portMap.put(portName, port);
}
}
//find the service we are working with
javax.wsdl.Service service = getService(serviceQName, schemaInfoBuilder.getDefinition());
if (serviceQName == null) {
serviceQName = service.getQName();
}
Map wsdlPortMap = service.getPorts();
for (Iterator iterator = wsdlPortMap.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
String portName = (String) entry.getKey();
Port port = (Port) entry.getValue();
GerPortType gerPort = (GerPortType) portMap.get(portName);
URL location = gerPort == null ? getAddressLocation(port) : getLocation(gerPort);
//skip non-soap ports
if (location == null) {
continue;
}
String credentialsName = gerPort == null || gerPort.getCredentialsName() == null ? null : gerPort.getCredentialsName().trim();
Binding binding = port.getBinding();
mapBinding(binding, mapping, serviceQName, classLoader, context, module, soapVersion, schemaInfoBuilder, portName, serviceImpl, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName, exceptionMap);
}
}
}