org.jboss.portal.wsrp.servlet
Class WSDLPortFixFilter

java.lang.Object
  extended by org.jboss.portal.wsrp.servlet.WSDLPortFixFilter

public class WSDLPortFixFilter
extends java.lang.Object

A Filter that fixes the ports returned by JBWS. This is a hack and this class will be removed when JBWS 1.2.1 is available. This includes code from URLTools that has been duplicated and simplified here for either inclusion. Post-processing based on a Java Pro article.

Since:
2.4.2
Version:
$Revision: 7225 $
Author:
Chris Laprun

Nested Class Summary
static class WSDLPortFixFilter.PortReplacementGenerator
           
static class WSDLPortFixFilter.URLMatch
           
static class WSDLPortFixFilter.URLReplacementGenerator
           
 class WSDLPortFixFilter.WSDLProcessorResponseWrapper
          Response wrapper using the hybrid PrintWriter / ServletOutputStream
 
Field Summary
static java.lang.String HTTP_PREFIX
           
static java.lang.String HTTPS_PREFIX
           
 
Constructor Summary
WSDLPortFixFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
           
static WSDLPortFixFilter.URLMatch[] extractURLsFrom(java.lang.String markup)
           
 void init(FilterConfig filterConfig)
           
static boolean isNetworkURL(java.lang.String url)
           
static java.lang.String replaceServerPortInURL(java.lang.String url, int newPort)
           
static java.lang.String replaceURLsBy(java.lang.String markup, WSDLPortFixFilter.URLReplacementGenerator generator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_PREFIX

public static final java.lang.String HTTP_PREFIX
See Also:
Constant Field Values

HTTPS_PREFIX

public static final java.lang.String HTTPS_PREFIX
See Also:
Constant Field Values
Constructor Detail

WSDLPortFixFilter

public WSDLPortFixFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Throws:
ServletException

doFilter

public void doFilter(ServletRequest servletRequest,
                     ServletResponse servletResponse,
                     FilterChain filterChain)
              throws java.io.IOException,
                     ServletException
Throws:
java.io.IOException
ServletException

destroy

public void destroy()

isNetworkURL

public static boolean isNetworkURL(java.lang.String url)

extractURLsFrom

public static WSDLPortFixFilter.URLMatch[] extractURLsFrom(java.lang.String markup)

replaceURLsBy

public static java.lang.String replaceURLsBy(java.lang.String markup,
                                             WSDLPortFixFilter.URLReplacementGenerator generator)

replaceServerPortInURL

public static java.lang.String replaceServerPortInURL(java.lang.String url,
                                                      int newPort)