Package org.apache.juddi.error

Examples of org.apache.juddi.error.FatalErrorException


    // value must be specified for all UDDI requests and
    // only version 2.0 UDDI requests are supported by
    // this endpoint).

    if (version == null)
      throw new FatalErrorException("A UDDI generic attribute " +
        "value was not found for UDDI request: "+operation+" (The " +
        "'generic' attribute must be present)");
    else if (!version.equals(IRegistry.UDDI_V2_GENERIC))
      throw new UnsupportedException("Only UDDI v2 " +
        "requests are currently supported. The generic attribute value " +
        "received was: "+version);

    if ((operation == null) || (operation.trim().length() == 0))
      throw new FatalErrorException("The UDDI service operation " +
        "could not be identified.");
    else if (!operations.contains(operation.toLowerCase()))
      throw new UnsupportedException("The operation "+operation+" is not " +
          "supported by the UDDI version 2 Inquiry API.");
  }
View Full Code Here


          uddiReq = (Element)obj;
          break;
        }
      }
      if (uddiReq == null)
        throw new FatalErrorException("A UDDI request was not " +
          "found in the SOAP message.");
     
      // Grab the local name of the UDDI request element
      // from the UDDI Request. If a value isn't returned
      // (either null or an empty String is returned) then
      // throw a FatalError exception. This is probably a
      // configuration problem related to the XML Parser
      // that jUDDI is using.
     
      String operation = uddiReq.getLocalName();
      if ((operation == null) || (operation.trim().length() == 0))
        throw new FatalErrorException("The UDDI service operation " +
          "could not be identified.");
     
      // Grab the generic attribute value (version value).  If
      // one isn't specified or the value specified is not "2.0"
      // then throw an exception (this value must be specified
      // for all UDDI requests and currently only vesion 2.0
      // UDDI requests are supported).

      String version = uddiReq.getAttribute("generic");
      if (version == null)
        throw new FatalErrorException("A UDDI generic attribute " +
          "value was not found for UDDI request: "+operation+" (The " +
          "'generic' attribute must be present)");

      // Verify that the appropriate endpoint was targeted for
      // this service request.  The validateRequest method will
      // throw an UnsupportedException if anything's amiss.

      validateRequest(operation,version,uddiReq);
     
      // Lookup the appropriate XML handler.  Throw an
      // UnsupportedException if one could not be located.

      HandlerMaker maker = HandlerMaker.getInstance();
      IHandler requestHandler = maker.lookup(operation);
      if (requestHandler == null)
        throw new UnsupportedException("The UDDI service operation " +
          "specified is unknown or unsupported: " +operation);
     
      // Unmarshal the raw xml into the appropriate jUDDI
      // request object.

      RegistryObject uddiReqObj = requestHandler.unmarshal(uddiReq);
     
      // 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

    // throw an exception (this value must be specified
    // for all UDDI requests and the endpoint called only
    // supports UDDI version 1.0 requests).

    if (version == null)
      throw new FatalErrorException("A jUDDI generic attribute " +
        "value was not found for UDDI request: "+operation+" (The " +
        "'generic' attribute must be present)");
    else if (!version.equals(IRegistry.JUDDI_V1_GENERIC))
      throw new UnsupportedException("Only jUDDI v1 requests " +
        "are currently supported. The generic attribute value " +
        "received was: "+version);

    if ((operation == null) || (operation.trim().length() == 0))
      throw new FatalErrorException("The jUDDI service operation " +
        "could not be identified.");
    else if (!operations.contains(operation.toLowerCase()))
      throw new UnsupportedException("The operation "+operation+" is not " +
          "supported by the jUDDI Admin API.");
  }
View Full Code Here

   * @throws Exception
   */
  public String getOperation(Element uddiReq) throws Exception
  {
      if (uddiReq == null)
          throw new FatalErrorException("A UDDI request was not " +
            "found in the SOAP message.");

      String operation = uddiReq.getLocalName();
      if ((operation == null) || (operation.trim().length() == 0))
        throw new FatalErrorException("The UDDI service operation " +
          "could not be identified.");
      setOperation(operation);
      return operation;
  }
View Full Code Here

   */
  public String getVersion(Element uddiReq, String operation) throws Exception
  {
      String version = uddiReq.getAttribute("generic");
      if (version == null)
        throw new FatalErrorException("A UDDI generic attribute " +
          "value was not found for UDDI request: "+operation+" (The " +
          "'generic' attribute must be present)");
      setVersion(version);
      return version;
  }
View Full Code Here

      // 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

    // value must be specified for all UDDI requests and
    // only version 2.0 UDDI requests are supported by
    // this endpoint).

    if (version == null)
      throw new FatalErrorException("A UDDI generic attribute " +
        "value was not found for UDDI request: "+operation+" (The " +
        "'generic' attribute must be present)");
    else if (!version.equals(IRegistry.UDDI_V2_GENERIC))
      throw new UnsupportedException("Only UDDI v2 " +
        "requests are currently supported. The generic attribute value " +
        "received was: "+version);

    if ((operation == null) || (operation.trim().length() == 0))
      throw new FatalErrorException("The UDDI service operation " +
        "could not be identified.");
    else if (!operations.contains(operation.toLowerCase()))
      throw new UnsupportedException("The operation "+operation+" is not " +
          "supported by the UDDI version 2 Publish API.");
  }
View Full Code Here

    // value must be specified for all UDDI requests and
    // only version 2.0 UDDI requests are supported by
    // this endpoint).

    if (version == null)
      throw new FatalErrorException("A UDDI generic attribute " +
        "value was not found for UDDI request: "+operation+" (The " +
        "'generic' attribute must be present)");
    else if (!version.equals(IRegistry.UDDI_V2_GENERIC))
      throw new UnsupportedException("Only UDDI v2 " +
        "requests are currently supported. The generic attribute value " +
        "received was: "+version);

    if ((operation == null) || (operation.trim().length() == 0))
      throw new FatalErrorException("The UDDI service operation " +
        "could not be identified.");
    else if (!operations.contains(operation.toLowerCase()))
      throw new UnsupportedException("The operation "+operation+" is not " +
          "supported by the UDDI version 2 Publish API.");
  }
View Full Code Here

                  uddiReq = (Element)current;
               }
            }
           
            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

   * @throws Exception
   */
  public String getOperation(Element uddiReq) throws Exception
  {
      if (uddiReq == null)
          throw new FatalErrorException("A UDDI request was not " +
            "found in the SOAP message.");

      String operation = uddiReq.getLocalName();
      if ((operation == null) || (operation.trim().length() == 0))
        throw new FatalErrorException("The UDDI service operation " +
          "could not be identified.");
      setOperation(operation);
      return operation;
  }
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.