Package org.apache.juddi.error

Examples of org.apache.juddi.error.RegistryException


           boolean hasFault = soapBody.hasFault();
           if(hasFault)
           {
              SOAPFault soapFault = soapBody.getFault();
              String faultStr = soapFault.getFaultCode() + "::" + soapFault.getFaultString();
              throw new RegistryException(faultStr);
           }
           response = getFirstChildElement(soapBody);
        } catch (Exception ex)
        {
            log.error("Exception::",ex);
            throw new RegistryException(ex);
        }

        log.debug("Response message:" + XMLUtils.getText(response));
        return response;
    }
View Full Code Here


    }
    catch(Exception ex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
      log.error(ex);
      throw new RegistryException(ex);
    }
    finally
    {
      if (dataStore != null)
        dataStore.release();
View Full Code Here

    }
    catch(Exception ex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
      log.error(ex);
      throw new RegistryException(ex);
    }
    finally
    {
      if (dataStore != null)
        dataStore.release();
View Full Code Here

        dispRpt = ((DispositionReport)handler.unmarshal((Element)nodeList.elementAt(0)));
      }
    }

    // Create RegistryException instance and return
    RegistryException obj = new RegistryException(fCode,fString,fActor,dispRpt);
   
    return obj;
  }
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    RegistryException regEx = (RegistryException)object;
    Document document = parent.getOwnerDocument();
    String generic = getGeneric(null);
    String namespace = getUDDINamespace(generic);
    Element fault = document.createElementNS(namespace,TAG_NAME);

    String fCode = regEx.getFaultCode();
    if (fCode != null)
    {
      Element fCodeElement = document.createElement("faultcode");
      fCodeElement.appendChild(document.createTextNode(fCode));
      fault.appendChild(fCodeElement);
    }

    String fString = regEx.getFaultString();
    if (fString == null)
      fString = "";

    Element fStringElement = document.createElement("faultstring");
    fStringElement.appendChild(document.createTextNode(fString));
    fault.appendChild(fStringElement);

    String fActor = regEx.getFaultActor();
    if (fActor != null)
    {
      Element fActorElement = document.createElement("faultactor");
      fActorElement.appendChild(document.createTextNode(fActor));
      fault.appendChild(fActorElement);
    }

    // check for a DispositionReport in the exception and if one exists,
    // grab it, marshal it into xml and stuff it into a SOAP fault
    // detail element.

    DispositionReport dispRpt = regEx.getDispositionReport();
    if (dispRpt != null)
    {
      Element fDetailElement = document.createElement("detail");
      IHandler handler = maker.lookup(DispositionReportHandler.TAG_NAME);
      handler.marshal(dispRpt,fDetailElement);
View Full Code Here

    HandlerMaker maker = HandlerMaker.getInstance();
    AbstractHandler handler = maker.lookup(RegistryExceptionHandler.TAG_NAME);
    Element parent = XMLUtils.newRootElement();
    Element child = null;

    RegistryException regex =
        new org.apache.juddi.error.AuthTokenRequiredException("Test Exception");

    System.out.println();

    RegistryObject regObject = regex;
View Full Code Here

    }
    catch(Exception ex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
      log.error(ex);
      throw new RegistryException(ex);
    }
    finally
    {
      if (dataStore != null)
        dataStore.release();
View Full Code Here

      return info;
    }
    catch(Exception ex)
    {
      log.error(ex);
      throw new RegistryException(ex);
    }
  }
View Full Code Here

    try {
      this.transaction = new Transaction();
      this.transaction.begin(connection);
    }
    catch(SQLException sqlex) {
      throw new RegistryException(sqlex);
    }
  }
View Full Code Here

  {
    try {
      this.transaction.commit();
    }
    catch(SQLException sqlex) {
      throw new RegistryException(sqlex);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.error.RegistryException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.