Ejemplo n.º 1
0
 private static function getNamingTable($nameurl)
 {
     $nametbl = null;
     $nrequest = new NamingRequest(NamingRequest::reqVersion);
     $request = new Request($nrequest->toXMLString());
     $set = new RequestSet(WebtopNaming::NAMING_SERVICE);
     $set->addRequest($request);
     //        try {
     $responses = PLLClient::sendURLRequestSet($nameurl, $set);
     if (count($responses) != 1) {
         throw new Exception("Unexpected response");
     }
     $res = $responses[0];
     $nres = NamingResponse::parseXML($res->getContent());
     if ($nres->getException() != null) {
         throw new Exception($nres->getException());
     }
     $nametbl = $nres->getNamingTable();
     //        } catch (SendRequestException sre) {
     //            debug.error("Naming service connection failed for " + nameurl, sre);
     //        } catch (Exception e) {
     //            debug.error("getNamingTable: ", e);
     //        }
     return $nametbl;
 }
Ejemplo n.º 2
0
 /**
  * Translates the Java object to an XML RequestSet document and sends the
  * corresponding XML document to the specified URL.
  *
  * @param url
  *            The destination URL for the RequestSet XML document.
  * @param set
  *            The RequestSet Java object to be translated to an XML
  *            RequestSet document.
  * @param cookieTable
  *            The HashMap that constains cookies to be replayed and stores
  *            cookies retrieved from the response.
  * @exception SendRequestException
  *                if there is an error in sending the XML document.
  */
 public static function sendUrlRequestSetCookieTable($url, RequestSet $set, $cookieTable)
 {
     return PLLClient::send($url, null, $set, $cookieTable);
 }