Author: darran.lofthouse(a)jboss.com
Date: 2009-10-28 10:41:50 -0400 (Wed, 28 Oct 2009)
New Revision: 11057
Modified:
framework/branches/jbossws-framework-3.1.2.SP4_JBPAPP-3021/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
Log:
[JBPAPP-3021] Malformed URL exception when deploying wsdl with jms address.
Modified:
framework/branches/jbossws-framework-3.1.2.SP4_JBPAPP-3021/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2.SP4_JBPAPP-3021/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2009-10-28
12:58:02 UTC (rev 11056)
+++
framework/branches/jbossws-framework-3.1.2.SP4_JBPAPP-3021/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2009-10-28
14:41:50 UTC (rev 11057)
@@ -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