private void setAddrElement() throws ToolException {
extReg = this.wsdlReader.getExtensionRegistry();
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
XMLHttpAddress xmlHttpAddress = null;
try {
xmlHttpAddress = (XMLHttpAddress)extReg.createExtension(Port.class,
WSDLConstants.NS_XMLHTTP_BINDING_ADDRESS);
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG);
throw new ToolException(msg);
}
if (env.get(ToolConstants.CFG_ADDRESS) != null) {
xmlHttpAddress.setLocation((String)env.get(ToolConstants.CFG_ADDRESS));
} else {
xmlHttpAddress.setLocation(HTTP_PREFIX + "/" + env.get(ToolConstants.CFG_SERVICE) + "/"
+ env.get(ToolConstants.CFG_PORT));
}
port.addExtensibilityElement(xmlHttpAddress);
}