public boolean validateToken(EndpointSpecification endpointSpecification,SecurityToken toBeValidatedToken) throws SoapSTSConsumerException {
  STSClient client=getSTSClient(stsInstanceWsdlUrl,endpointSpecification.serviceQName,endpointSpecification.portQName);
  client.setTokenType(STSConstants.STATUS);
  try {
    client.validateSecurityToken(toBeValidatedToken);
    return true;
  }
 catch (  TrustException e) {
    return false;
  }
catch (  Exception e) {
    throw new SoapSTSConsumerException(e.getMessage(),e);
  }
}

public boolean validateToken ( EndpointSpecification endpointSpecification , SecurityToken toBeValidatedToken ) throws SoapSTSConsumerException { STSClient client = getSTSClient ( stsInstanceWsdlUrl , endpointSpecification . serviceQName , endpointSpecification . portQName ) ; client . setTokenType ( STSConstants . STATUS ) ; try { client . validateSecurityToken ( toBeValidatedToken ) ; return true ; } catch ( TrustException e ) { return false ; } catch ( Exception e ) { throw new SoapSTSConsumerException ( e . getMessage ( ) , e ) ; } }
invokes the soap - sts validate operation
