Package org.apache.woden

Examples of org.apache.woden.WSDLFactory


    /*
     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        //Don't set validation on, as the testcase WSDL is not intended to be a valid WSDL 2.0 doc.
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here


    /*
     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        //Don't set validation on, as the testcase WSDL is not intended to be a valid WSDL 2.0 doc.
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here

     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception
    {
        super.setUp();
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        //Don't set validation on, as the testcase WSDL is not intended to be a valid WSDL 2.0 doc.
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here

     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception
    {
        super.setUp();
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        //Don't set validation on, as the testcase WSDL is not intended to be a valid WSDL 2.0 doc.
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here

        assertNotNull("Failed to find the Resolver Catalog document on the classpath using the path: " + fCatalogPath + ".",
            catalogURL);
        // simulate the standard compiler "-D" option ...
        fCatalogPropValue = System.setProperty(fCatalogProperty, catalogURL.toString());
       
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here

        // create a reader (with specified implementation if given).
        try {
           //If an implementation name is given use that to test against, else use the default one.
           if (implName != null && !implName.equals("")) {
               System.out.println("Using woden with implementation from " + implName);
               WSDLFactory factory = WSDLFactory.newInstance(implName);
               reader = factory.newWSDLReader();
           } else {
               System.out.println("Using default woden implementation.");
               WSDLFactory factory = WSDLFactory.newInstance();
               reader = factory.newWSDLReader();
           }

        } catch (WSDLException e) {

            // fail if unable to create a reader
View Full Code Here

        Report reportWriter = Report.openReport(new File(reportLoc));
        reportWriter.beginWsdl(wsdlLoc);

        try {

            WSDLFactory factory = WSDLFactory.newInstance();
            WSDLReader reader = factory.newWSDLReader();

            // <-- enable WSDL 2.0 validation (optional)
            reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
           
            //Add errorHandler
View Full Code Here

        assertNotNull("Failed to find the Resolver Catalog document on the classpath using the path: " + fCatalogPath + ".",
            catalogURL);
        // simulate the standard compiler "-D" option ...
        fCatalogPropValue = System.setProperty(fCatalogProperty, catalogURL.toString());
       
        WSDLFactory factory = OMWSDLFactory.newInstance("org.apache.woden.internal.OMWSDLFactory");
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here

  catch(URISyntaxException e)
  {
    fail("There was a problem creating the test URIs: " + e);
  }

    WSDLFactory factory = null;
    try {
        factory = WSDLFactory.newInstance();
    } catch (WSDLException e) {
        fail("Can't instantiate the WSDLFactory object.");
    }
   
  // Test that a schema without any style defaults is valid.
  handler.reset();
    try
  {
      DescriptionElement desc = factory.newDescription();
      InterfaceElement interfaceElem = desc.addInterfaceElement();
    if(!val.testAssertionInterface1012(interfaceElem, reporter))
    {
      fail("The testAssertionInterface1012 method returned false for an interface that specifies no style defaults.");
    }
  }
  catch(WSDLException e)
    {
    fail("There was a problem running the test assertion method " + e);
  }
 
    // Test that a schema with an absolute style default is valid.
  handler.reset();
  try
  {
          DescriptionElement desc = factory.newDescription();
      InterfaceElement interfaceElem = desc.addInterfaceElement();
    interfaceElem.addStyleDefaultURI(absoluteURI);
    if(!val.testAssertionInterface1012(interfaceElem, reporter))
    {
      fail("The testAssertionInterface1012 method returned false for an interface that specifies one absolute style default.");
    }
    }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
    }
 
    // Test that a schema with a relative style default is not valid.
  handler.reset();
  try
  {
      DescriptionElement desc = factory.newDescription();
    InterfaceElement interfaceElem = desc.addInterfaceElement();
    interfaceElem.addStyleDefaultURI(relativeURI);
    if(val.testAssertionInterface1012(interfaceElem, reporter))
    {
      fail("The testAssertionInterface1012 method returned true for an interface that specifies one relative style default.");
    }
    }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
    }
 
    // Test that a schema with an absolute style default and a relative sytle default is not valid.
  handler.reset();
  try
  {
      DescriptionElement desc = factory.newDescription();
      InterfaceElement interfaceElem = desc.addInterfaceElement();
    interfaceElem.addStyleDefaultURI(absoluteURI);
    interfaceElem.addStyleDefaultURI(relativeURI);
    if(val.testAssertionInterface1012(interfaceElem, reporter))
    {
      fail("The testAssertionInterface1012 method returned true for an interface that specifies an absolute style default and a relative style default.");
    }
    }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
    }
 
    // Test that a schema with two relative style defaults returns two error messages
  handler.reset();
  try
  {
      DescriptionElement desc = factory.newDescription();
      InterfaceElement interfaceElem = desc.addInterfaceElement();
    interfaceElem.addStyleDefaultURI(relativeURI);
    interfaceElem.addStyleDefaultURI(relativeURI2);
    val.testAssertionInterface1012(interfaceElem, reporter);
    if(handler.numErrors != 2)
View Full Code Here

    /*
     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        ErrorHandler handler = new TestErrorHandler();
        //Don't set validation on, as the testcase WSDL is not intended to be a valid WSDL 2.0 doc.
        reader.getErrorReporter().setErrorHandler(handler);
       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
View Full Code Here

TOP

Related Classes of org.apache.woden.WSDLFactory

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.