Package org.apache.woden

Examples of org.apache.woden.WSDLException


        setBaseUri(fullPath);
        Description description;
        try {
            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
View Full Code Here


      es = defaultSer;
    }

    if (es == null)
    {
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                              "No ExtensionSerializer found " +
                              "to serialize a '" + elementType +
                              "' element in the context of a '" +
                              parentType.getName() + "'.");
    }
View Full Code Here

      ed = defaultDeser;
    }

    if (ed == null)
    {
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                              "No ExtensionDeserializer found " +
                              "to deserialize a '" + elementType +
                              "' element in the context of a '" +
                              parentType.getName() + "'.");
    }
View Full Code Here

    }

    if (extensionType == null)
    {
      //TODO use ErrorReporter to get formatted error msg WSDL012
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                              "No Java extensionType found " +
                              "to represent a '" + elementType +
                              "' element in the context of a '" +
                              parentType.getName() + "'.");
    }
    else if (!(ExtensionElement.class.isAssignableFrom(extensionType)))
    {
      //TODO use ErrorReporter to get formatted error msg WSDL013
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                              "The Java extensionType '" +
                              extensionType.getName() + "' does " +
                              "not implement the ExtensibilityElement " +
                              "interface.");
    }

    try
    {
        ExtensionElement ee = (ExtensionElement)extensionType.newInstance();
      /*
      if (ee.getElementType() == null)
      {
        ee.setElementType(elementQN);
      }
      */
     
      return ee;
    }
    catch (Exception e)
    {
      /*
        Catches:
                 InstantiationException
                 IllegalAccessException
      */
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                              "Problem instantiating Java " +
                              "extensionType '" + extensionType.getName() +
                              "'.",
                              e);
    }
View Full Code Here

      }
      else if (!(XMLAttr.class.isAssignableFrom(implClass)))
      {
          String msg = getErrorReporter().getFormattedMessage("WSDL011",
                           new Object[] {attrQName.toString()});   
          throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL011: " + msg);
      }
     
      try {
          Class[] ctorParms = new Class[] {XMLElement.class, QName.class, String.class, ErrorReporter.class};
          Constructor ctor = implClass.getConstructor(ctorParms);
          Object[] ctorParmValues = new Object[] {ownerElement, attrQName, attrValue, getErrorReporter()};
          attr = (XMLAttr)ctor.newInstance(ctorParmValues);
      }
      catch (Exception e) {
          //SecurityException
          //NoSuchMethodException
          //InvocationTargetException
          //InstantiationException
          //IllegalAccessException
          String msg = getErrorReporter().getFormattedMessage("WSDL009",
                           new Object[] {implClass.getName()});
          throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
      }
     
      return attr;
  }
View Full Code Here

     
      if(compExtCtxClass == null)
      {
          String msg = getErrorReporter().getFormattedMessage("WSDL015",
                  new Object[] {extNamespace.toString(), parentClass.getName()});
          throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL015: " + msg);
      }
         
      ComponentExtensionContext compExtCtx = null;
     
      /* TODO remove with woden-47
      try {
          compExtCtx = (ComponentExtensionContext)compExtCtxClass.newInstance();
      }
      catch (InstantiationException e)
      {
          String msg = getErrorReporter().getFormattedMessage("WSDL009",
                  new Object[] {compExtCtxClass.getName()});
          throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
      }
      catch (IllegalAccessException e) {
          String msg = getErrorReporter().getFormattedMessage("WSDL009",
                  new Object[] {compExtCtxClass.getName()});
          throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
      }
      */
     
     
      try {
          Class[] ctorParms = new Class[] {WSDLComponent.class, URI.class, ErrorReporter.class};
          Constructor ctor = compExtCtxClass.getConstructor(ctorParms);
          Object[] ctorParmValues = new Object[] {parentComp, extNamespace, getErrorReporter()};
          compExtCtx = (ComponentExtensionContext)ctor.newInstance(ctorParmValues);
      }
      catch (Exception e) {
          //SecurityException
          //NoSuchMethodException
          //InvocationTargetException
          //InstantiationException
          //IllegalAccessException
          String msg = getErrorReporter().getFormattedMessage("WSDL009",
                           new Object[] {compExtCtxClass.getName()});
          throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
      }
     
     
      return compExtCtx;
  }
View Full Code Here

                /*
                 ClassNotFoundException
                 InstantiationException
                 IllegalAccessException
                 */
                throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                        "Problem instantiating the customer error handler.",
                        e);
            }
        }
        else
View Full Code Here

            eh.fatalError(errorInfo);
           
            // Fatal error strategy is to terminate with a WSDLException.
           
            if(exception == null) {
                throw new WSDLException(WSDLException.INVALID_WSDL,
                        "Fatal WSDL error:\n" + errorInfo.toString());
            }
            else if(exception instanceof WSDLException) {
                throw (WSDLException)exception;
            }
            else {
                throw new WSDLException(WSDLException.OTHER_ERROR,
                                        "Fatal error.",
                                        exception);
            }
        }
        else
View Full Code Here

      if (nsStr != null) {
            try {
                uri = new URI(nsStr);
            } catch (URISyntaxException e) {
                String msg = fErrorReporter.getFormattedMessage("WSDL506", new Object[] { nsStr });
                throw new WSDLException(WSDLException.INVALID_WSDL, msg, e);
            }
        }
        return uri;
    }
View Full Code Here

        if(prefix != null && namespaceURI == null) {
            String faultCode = WSDLException.UNBOUND_PREFIX;
            String msg = fErrorReporter.getFormattedMessage(
                    "WSDL513",
                    new Object[] {prefixedValue, DOMQNameUtils.newQName(el)});
            WSDLException wsdlExc = new WSDLException(
                    faultCode,
                    msg);
            wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el));
            throw wsdlExc;
        }
       
        return new QName(namespaceURI, localPart, (prefix != null ? prefix : emptyString));
    }
View Full Code Here

TOP

Related Classes of org.apache.woden.WSDLException

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.