//clear the unique block map
uniqueBodyBlocks.clear();
QName portQName = getQNameOf(wsdlPort);
Port port = new Port(portQName, wsdlPort);
setDocumentationIfPresent(port, wsdlPort.getDocumentation());
SOAPAddress soapAddress =
(SOAPAddress) getExtensionOfType(wsdlPort, SOAPAddress.class);
if (soapAddress == null) {
if(options.isExtensionMode()){
warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_NO_SOAP_ADDRESS(wsdlPort.getName()));
}else{
// not a SOAP port, ignore it
warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(wsdlPort.getName()));
return false;
}
}
if(soapAddress != null)
port.setAddress(soapAddress.getLocation());
Binding binding = wsdlPort.resolveBinding(document);
QName bindingName = getQNameOf(binding);
PortType portType = binding.resolvePortType(document);
port.setProperty(
ModelProperties.PROPERTY_WSDL_PORT_NAME,
getQNameOf(wsdlPort));
port.setProperty(
ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME,
getQNameOf(portType));
port.setProperty(
ModelProperties.PROPERTY_WSDL_BINDING_NAME,
bindingName);
boolean isProvider = isProvider(wsdlPort);
if (_bindingNameToPortMap.containsKey(bindingName) && !isProvider) {
// this binding has been processed before
Port existingPort =
_bindingNameToPortMap.get(bindingName);
port.setOperations(existingPort.getOperations());
port.setJavaInterface(existingPort.getJavaInterface());
port.setStyle(existingPort.getStyle());
port.setWrapped(existingPort.isWrapped());
} else {
// find out the SOAP binding extension, if any
SOAPBinding soapBinding =
(SOAPBinding) getExtensionOfType(binding, SOAPBinding.class);