Index: /home/nrla/eclipse-IPv6/jbossws-1.2.1.GA_CP05/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java =================================================================== --- /home/nrla/eclipse-IPv6/jbossws-1.2.1.GA_CP05/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java (revision 11139) +++ /home/nrla/eclipse-IPv6/jbossws-1.2.1.GA_CP05/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java (working copy) @@ -268,7 +268,8 @@ if ("https".equals(uriScheme)) port = epManager.getWebServiceSecurePort(); - String urlStr = uriScheme + "://" + host + ":" + port + servicePath; + // String urlStr = uriScheme + "://" + host + ":" + port + servicePath; + String urlStr = uriScheme + "://" + fixHostnameForURL(host) + ":" + port + servicePath; try { return new URL(urlStr).toExternalForm(); @@ -279,6 +280,16 @@ } } + private static String fixHostnameForURL(String host) { + if (host == null) + return host ; + + if (host.indexOf(":") != -1) + return "[" + host + "]" ; + else + return host ; + } + /** * Read the transport guarantee from web.xml */