Package org.apache.juddi.error

Examples of org.apache.juddi.error.FatalErrorException


 
  public void validateDeletePublisher(EntityManager em, DeletePublisher body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<String> entityKeyList = body.getPublisherId();
    if (entityKeyList == null || entityKeyList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
View Full Code Here


  public void validateSavePublisher(EntityManager em, SavePublisher body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<org.apache.juddi.api_v3.Publisher> entityList = body.getPublisher();
    if (entityList == null || entityList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.savepublisher.NoInput"));
View Full Code Here

 
  public void validateGetPublisherDetail(GetPublisherDetail body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<String> publisherIdList = body.getPublisherId();
    if (publisherIdList == null || publisherIdList.size() == 0)
      throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
View Full Code Here

 
  public void validateGetAllPublisherDetail(GetAllPublisherDetail body) throws DispositionReportFaultMessage {

    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
  }
View Full Code Here

      logger.debug("marshalled subscription filter:  " + rawFilter);
      modelSubscription.setSubscriptionFilter(rawFilter);

    } catch (JAXBException e) {
      logger.error("JAXBException while marshalling subscription filter", e);
      throw new FatalErrorException(new ErrorMessage("errors.Unspecified"));
    }
   
  }
View Full Code Here

            }

            SOAPBody soapReqBody = soapReq.getSOAPBody();
            Element uddiReq = (Element) soapReqBody.getFirstChild();
            if (uddiReq == null)
                throw new FatalErrorException("A UDDI request was not " +
                        "found in the SOAP message.");

            String function = uddiReq.getLocalName();
            if ((function == null) || (function.trim().length() == 0))
                throw new FatalErrorException("The name of the UDDI request " +
                        "could not be identified.");
            IHandler requestHandler = maker.lookup(function);
            if (requestHandler == null)
                throw new UnsupportedException("The UDDI request " +
                        "type specified is unknown: " + function);

            String generic = uddiReq.getAttribute("generic");
            if (generic == null)
                throw new FatalErrorException("A UDDI generic attribute " +
                        "value was not found for UDDI request: " + function + " (The " +
                        "'generic' attribute must be present)");
            else if (!generic.equals(IRegistry.UDDI_V2_GENERIC))
                throw new UnsupportedException("Currently only UDDI v2 " +
                        "requests are supported. The generic attribute value " +
                        "received was: " + generic);

            // Unmarshal the raw xml into the appropriate jUDDI
            // request object.

            RegistryObject uddiReqObj = requestHandler.unmarshal(uddiReq);
            if(uddiReqObj == null)
               throw new FatalErrorException("Uddi Request is null");

            // Grab a reference to the shared jUDDI registry
            // instance (make sure it's running) and execute the
            // requested UDDI function.

            RegistryObject uddiResObj = null;
            RegistryEngine registry = RegistryServlet.getRegistry();
            if ((registry != null) && (registry.isAvailable()))
                uddiResObj = registry.execute(uddiReqObj);
            else
                throw new BusyException("The Registry is currently unavailable.");

            // Lookup the appropriate response handler which will
            // be used to marshal the UDDI object into the appropriate
            // xml format.

            IHandler responseHandler = maker.lookup(uddiResObj.getClass().getName());
            if (responseHandler == null)
                throw new FatalErrorException("The response object " +
                        "type is unknown: " + uddiResObj.getClass().getName());

            // Create a new 'temp' XML element to use as a container
            // in which to marshal the UDDI response data into.
View Full Code Here

TOP

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

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.