Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNWSRP-340 Revert temporary fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
metacosm committed Dec 21, 2012
1 parent f0300c8 commit d3247d7
Showing 1 changed file with 0 additions and 34 deletions.
Expand Up @@ -57,12 +57,10 @@
import javax.xml.ws.handler.Handler;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
Expand All @@ -84,7 +82,6 @@ public class SOAPServiceFactory implements ManageableServiceFactory
private static final Logger log = LoggerFactory.getLogger(SOAPServiceFactory.class);

private String wsdlDefinitionURL;
private URI wsdlURI;

private boolean isV2 = false;
private Service wsService;
Expand Down Expand Up @@ -132,29 +129,6 @@ private <T> T customizePort(Class<T> expectedServiceInterface, Object service)
BindingProvider bindingProvider = (BindingProvider)service;
Map<String, Object> requestContext = bindingProvider.getRequestContext();

// work around for GTNWSRP-340
String endpointAddress = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
if (!endpointAddress.equals(wsdlDefinitionURL))
{
try
{
URI portURI = new URI(endpointAddress);
final int portURIPort = portURI.getPort();
final int wsdlURIPort = wsdlURI.getPort();
if (portURIPort != wsdlURIPort)
{
endpointAddress = endpointAddress.replaceFirst(":" + portURIPort + "/", wsdlURIPort >= 0 ? ":" + wsdlURIPort + "/" : "/");

// set port address to the new, corrected one
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress);
}
}
catch (URISyntaxException e)
{
// shouldn't happen
}
}

// set timeout
setTimeout(requestContext);

Expand Down Expand Up @@ -296,14 +270,6 @@ public String getWsdlDefinitionURL()
public void setWsdlDefinitionURL(String wsdlDefinitionURL)
{
this.wsdlDefinitionURL = wsdlDefinitionURL;
try
{
this.wsdlURI = wsdlDefinitionURL != null ? new URI(wsdlDefinitionURL) : null;
}
catch (URISyntaxException e)
{
throw new IllegalArgumentException("Invalid WSDL URL: " + wsdlDefinitionURL, e);
}

// we need a refresh so mark as not available but not failed
setAvailable(false);
Expand Down

0 comments on commit d3247d7

Please sign in to comment.