String address = null;
String bindingID = null;
List<? extends ExtensibilityElement> extensions
= CastUtils.cast(port.getBinding().getExtensibilityElements());
if (!extensions.isEmpty()) {
ExtensibilityElement e = extensions.get(0);
if (e instanceof SoapBinding) {
bindingID = SOAPBinding.SOAP11HTTP_BINDING;
} else if (e instanceof SOAP12Binding) {
bindingID = SOAPBinding.SOAP12HTTP_BINDING;
} else if (e instanceof javax.wsdl.extensions.soap.SOAPBinding) {
bindingID = SOAPBinding.SOAP11HTTP_BINDING;
}
}
extensions = CastUtils.cast(port.getExtensibilityElements());
if (!extensions.isEmpty()) {
ExtensibilityElement e = extensions.get(0);
if (tpId == null) {
tpId = e.getElementType().getNamespaceURI();
}
if (e instanceof SoapAddress) {
address = ((SoapAddress)e).getLocationURI();
} else if (e instanceof AddressType) {
address = ((AddressType)e).getLocation();