public void setServiceURL ( String serviceUrl ) { try { URI fullURI = URI . create ( serviceUrl ) ; URI partialURI = new URI ( fullURI . getScheme ( ) , null , fullURI . getHost ( ) , fullURI . getPort ( ) , null , null , null ) ; cc . setEndpoint ( partialURI ) ; String path = fullURI . getPath ( ) ; if ( path != null ) { path = path . substring ( path . startsWith ( "/" ) ? 1 : 0 ) ; path = path . substring ( 0 , path . length ( ) - ( path . endsWith ( "/" ) ? 1 : 0 ) ) ; } if ( path == null || path . isEmpty ( ) ) { this . servicePath = DEFAULT_SERVICE_PATH ; } else { this . servicePath = path ; } } catch ( Exception e ) { throw MwsUtl . wrap ( e ) ; } }
Set the service URL to make requests against .