public static PolicyService sendPLLRequest(URL policyServiceUrl,PolicyRequest preq) throws SendRequestException, PolicyException {
  String lbcookie=null;
  try {
    lbcookie=getLBCookie(preq);
  }
 catch (  Exception e) {
    throw new SendRequestException(e);
  }
  PolicyService policyService=new PolicyService();
  policyService.setMethodID(PolicyService.POLICY_REQUEST_ID);
  policyService.setPolicyRequest(preq);
  String xmlString=policyService.toXMLString();
  Request request=new Request(xmlString);
  RequestSet requestSet=new RequestSet(PolicyService.POLICY_SERVICE);
  requestSet.addRequest(request);
  if (debug.messageEnabled()) {
    debug.message("ResourceResultCache.sendPLLRequest:" + "sending PLL request to URL=" + policyServiceUrl + ":\nPLL message="+ xmlString);
  }
  Vector responses=PLLClient.send(policyServiceUrl,lbcookie,requestSet);
  Response response=(Response)responses.elementAt(0);
  PolicyService ps=PolicyService.parseXML(response.getContent());
  if (debug.messageEnabled()) {
    debug.message("ResourceResultCache.sendPLLRequest:" + "result=" + ps.toXMLString());
  }
  return ps;
}

public static PolicyService sendPLLRequest ( URL policyServiceUrl , PolicyRequest preq ) throws SendRequestException , PolicyException { String lbcookie = null ; try { lbcookie = getLBCookie ( preq ) ; } catch ( Exception e ) { throw new SendRequestException ( e ) ; } PolicyService policyService = new PolicyService ( ) ; policyService . setMethodID ( PolicyService . POLICY_REQUEST_ID ) ; policyService . setPolicyRequest ( preq ) ; String xmlString = policyService . toXMLString ( ) ; Request request = new Request ( xmlString ) ; RequestSet requestSet = new RequestSet ( PolicyService . POLICY_SERVICE ) ; requestSet . addRequest ( request ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "ResourceResultCache.sendPLLRequest:" + "sending PLL request to URL=" + policyServiceUrl + ":\nPLL message=" + xmlString ) ; } Vector responses = PLLClient . send ( policyServiceUrl , lbcookie , requestSet ) ; Response response = ( Response ) responses . elementAt ( 0 ) ; PolicyService ps = PolicyService . parseXML ( response . getContent ( ) ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "ResourceResultCache.sendPLLRequest:" + "result=" + ps . toXMLString ( ) ) ; } return ps ; }
return a policyservice object based on the xml document received from remote policy server . this is in response to a request that we send to the policy server .
