Author: alessio.soldano(a)jboss.com
Date: 2009-10-13 13:20:01 -0400 (Tue, 13 Oct 2009)
New Revision: 10902
Modified:
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
Log:
[JBPAPP-2912] JBossWS - Malformed URL exception when deploying wsdl with jms address
Modified:
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2009-10-13
12:58:29 UTC (rev 10901)
+++
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2009-10-13
17:20:01 UTC (rev 10902)
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.io.PrintWriter;
+import java.net.URI;
import java.net.URL;
import java.util.Set;
@@ -103,8 +104,7 @@
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td>Endpoint Address</td>");
- String address = createAddress(requestURL, ep.getAddress());
- writer.print(" <td><a href='" + address +
"?wsdl'>" + address + "?wsdl</a></td>");
+ writer.print(" <td>" + getAddressHtmlTag(requestURL, ep) +
"</td>");
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td colspan=2>");
@@ -181,6 +181,29 @@
writer.println("</head>");
}
+ private String getAddressHtmlTag(final URL requestURL, final Endpoint ep) throws
IOException
+ {
+ String address = createAddress(requestURL, ep.getAddress());
+ try
+ {
+ String scheme = new URI(address).getScheme();
+ if (scheme.equalsIgnoreCase("jms"))
+ {
+ return ep.getAddress();
+ }
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+ StringBuilder sb = new StringBuilder("<a href='");
+ sb.append(address);
+ sb.append("?wsdl'>");
+ sb.append(address);
+ sb.append("</a>");
+ return sb.toString();
+ }
+
private String createAddress(final URL requestURL, final String endpointAddress)
throws IOException
{
String address = endpointAddress;
Show replies by date