Examples of MyTest


Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

      URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
      URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      SchemaValidationFeature feature = new SchemaValidationFeature(xsdURL.toString());
      MyTest port = service.getPort(MyTest.class, feature);
      try
      {
         port.performTest(new Long(2000));
      }
      catch (Exception ex)
      {
         StringWriter stwr = new StringWriter();
         ex.printStackTrace(new PrintWriter(stwr));
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

      SchemaValidationFeature feature = new SchemaValidationFeature(xsdURL.toString());
     
      TestErrorHandler errorHandler = new TestErrorHandler();
      feature.setErrorHandler(errorHandler);
     
      MyTest port = service.getPort(MyTest.class, feature);
      port.performTest(new Long(2000));
     
      String msg = errorHandler.getErrors();
      assertTrue("Unexpectd message: " + msg, msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
   }
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

   public void testNonValidatingEndpoint() throws Exception
   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/noval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Long(1000));
      port.performTest(new Long(2000));
   }
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

   public void testValidatingEndpoint() throws Exception
   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/doval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Long(1000));
      try
      {
         port.performTest(new Long(2000));
      }
      catch (Exception ex)
      {
         String msg = ex.getMessage();
         assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

   public void testValidatingClientWithExplicitSchema() throws Exception
   {
      URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");    
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      SchemaValidationFeature feature = new SchemaValidationFeature();
      MyTest port = service.getPort(MyTest.class, feature);
      ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:9090/jaxws-jbws1172/doval");
      try
      {
         port.performTest(new Integer(2000));
      }
      catch (Exception ex)
      {
         StringWriter stwr = new StringWriter();
         ex.printStackTrace(new PrintWriter(stwr));
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

      SchemaValidationFeature feature = new SchemaValidationFeature();
     
      TestErrorHandler errorHandler = new TestErrorHandler();
      feature.setErrorHandler(errorHandler);
     
      MyTest port = service.getPort(MyTest.class, feature);
      try
      {
         port.performTest(new Integer(2000));
      }
      catch (Exception e)
      {

      }  
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

   public void testNonValidatingEndpoint() throws Exception
   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/noval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Integer(1000));
      port.performTest(new Integer(2000));
   }
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

   public void testValidatingEndpoint() throws Exception
   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/doval?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Integer(1000));
      try
      {
         port.performTest(new Integer(2000));
      }
      catch (Exception ex)
      {
         String msg = ex.getMessage();
         assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
View Full Code Here

Examples of org.jboss.test.ws.jaxws.jbws1172.types.MyTest

   public void testValidatingImportEndpoint() throws Exception
   {
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/doval-import?wsdl");
     
      Service service = Service.create(wsdlURL, SERVICE_NAME);
      MyTest port = service.getPort(MyTest.class);
      port.performTest(new Integer(1000));
      try
      {
         port.performTest(new Integer(2000));
      }
      catch (Exception ex)
      {
         String msg = ex.getMessage();
         assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.