Index: /home/nrla/eclipse-IPv6/jbossws-1.2.1.GA_CP05/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java =================================================================== --- /home/nrla/eclipse-IPv6/jbossws-1.2.1.GA_CP05/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java (revision 11139) +++ /home/nrla/eclipse-IPv6/jbossws-1.2.1.GA_CP05/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java (working copy) @@ -366,6 +366,11 @@ String protocol = displayURL.getProtocol(); String host = displayURL.getHost(); int port = displayURL.getPort(); + + log.debug("getDisplayHost: requestURL = " + requestURL) ; + log.debug("getDisplayHost: displayURL = " + displayURL) ; + + String uriScheme = requestURL.getProtocol(); if ("CONFIDENTIAL".equals(seInfo.getServerEndpointMetaData().getTransportGuarantee())) { @@ -397,15 +402,25 @@ } } } - String displayHost = protocol + "://" + host + (port > 0 ? ":" + port : ""); + String displayHost = protocol + "://" + fixHostnameForURL(host) + (port > 0 ? ":" + port : ""); if (log.isDebugEnabled()) { - log.trace("Mapping WSDL host from '" + protocol + "://" + host + ":" + port + "' to '" + displayHost + "'"); + log.debug("Mapping WSDL host from '" + protocol + "://" + fixHostnameForURL(host) + ":" + port + "' to '" + displayHost + "'"); } return displayHost; } + private String fixHostnameForURL(String host) { + if (host == null) + return host ; + + if (host.indexOf(":") != -1) + return "[" + host + "]" ; + else + return host ; + } + /** Get the endpoint metrics */ public ServiceEndpointMetrics getServiceEndpointMetrics(ObjectName sepID)