private void updatePortLocation(Port port, String baseUri) throws URISyntaxException {
List<?> exts = port.getExtensibilityElements();
if (exts != null && exts.size() > 0) {
ExtensibilityElement el = (ExtensibilityElement) exts.get(0);
if (el instanceof SOAP12Address) {
SOAP12Address add = (SOAP12Address) el;
add.setLocationURI(baseUri);
} else if (el instanceof SOAPAddress) {
SOAPAddress add = (SOAPAddress) el;
add.setLocationURI(baseUri);
}
}
}