/** * Checks an ejb request uri to see if it represents a legal request * for the wsdl content associated with this endpoint's web service. * Equivalent matching for servlets is performed automatically by the * web server. Should only be called for HTTP(S) GET. */ public boolean matchesEjbPublishRequest(String requestUriRaw, String query) { // Strip off leading slash. String requestUri = (requestUriRaw.charAt(0) == '/') ? requestUriRaw.substring(1) : requestUriRaw; boolean matches = false; // If request of form http<s>://<host>:<port>/<endpoint-address>?WSDL if( query != null ) { String toMatch = (endpointAddressUri.charAt(0) == '/') ? endpointAddressUri.substring(1) : endpointAddressUri; matches = requestUri.equals(toMatch) && (query.equalsIgnoreCase("WSDL") || query.startsWith("xsd=") || query.startsWith("wsdl=")); } else { // Add trailing slash to make sure sub context is an exact match. String publishingUri = getPublishingUri() + "/"; matches = requestUri.startsWith(publishingUri); } return matches; }
/** * Checks an ejb request uri to see if it represents a legal request * for the wsdl content associated with this endpoint's web service. * Equivalent matching for servlets is performed automatically by the * web server. Should only be called for HTTP(S) GET. */ public boolean matchesEjbPublishRequest(String requestUriRaw, String query) { // Strip off leading slash. String requestUri = (requestUriRaw.charAt(0) == '/') ? requestUriRaw.substring(1) : requestUriRaw; boolean matches = false; // If request of form http<s>://<host>:<port>/<endpoint-address>?WSDL if( query != null ) { String toMatch = (endpointAddressUri.charAt(0) == '/') ? endpointAddressUri.substring(1) : endpointAddressUri; matches = requestUri.equals(toMatch) && (query.equalsIgnoreCase("WSDL") || query.startsWith("xsd=") || query.startsWith("wsdl=")); } else { // Add trailing slash to make sure sub context is an exact match. String publishingUri = getPublishingUri() + "/"; matches = requestUri.startsWith(publishingUri); } return matches; }
String publishingUriRaw = getPublishingUri();
String publishingUriRaw = getPublishingUri();
String publishingUri = nextEndpoint.getPublishingUri(); String publishingUrlPattern = (publishingUri.charAt(0) == '/') ?publishingUri : "/" + publishingUri + "/*";