Package org.araneaframework.core

Examples of org.araneaframework.core.BaseService$ServiceImpl


  }
 
    // Test that the assertion returns true for a service with no name.
  try
  {
    ServiceImpl service = new ServiceImpl();
    if(!val.testAssertionService1060(new Service[]{service}, reporter))
    {
      fail("The testAssertionService1060 method returned false for a service with no defined name.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
    // Test that the assertion returns true for a service that is the only service defined.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      ServiceImpl service = (ServiceImpl)descEl.addServiceElement();
    service.setName(name1);
    if(!val.testAssertionService1060(new Service[]{service}, reporter))
    {
      fail("The testAssertionService1060 method returned false for a service that is the only service defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true for a list of services that contains no duplicate names.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      ServiceImpl service = (ServiceImpl)descEl.addServiceElement();
    service.setName(name1);
    ServiceImpl service2 = (ServiceImpl)descEl.addServiceElement();
      service2.setName(name2);
    ServiceImpl service3 = (ServiceImpl)descEl.addServiceElement();
      service3.setName(name3);
   
    Service[] services = new Service[]{service, service2, service3};
   
    if(!val.testAssertionService1060(services, reporter))
    {
      fail("The testAssertionService1060 method returned false for a list of services that contains no duplicate names.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false for two services that are defined with the same QName object.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      ServiceImpl service = (ServiceImpl)descEl.addServiceElement();
      service.setName(name1);
      ServiceImpl service2 = (ServiceImpl)descEl.addServiceElement();
      service2.setName(name2);
      ServiceImpl service3 = (ServiceImpl)descEl.addServiceElement();
    service3.setName(name1);
   
    Service[] services = new Service[]{service, service2, service3};
   
    if(val.testAssertionService1060(services, reporter))
    {
      fail("The testAssertionService1060 method returned true for a list of services that contains two services defined with the same QName object.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false for two services that are defined with the same name and
  // different QName objects.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      ServiceImpl service = (ServiceImpl)descEl.addServiceElement();
      service.setName(name1);
      ServiceImpl service2 = (ServiceImpl)descEl.addServiceElement();
      service2.setName(name2);
      ServiceImpl service3 = (ServiceImpl)descEl.addServiceElement();
      service3.setName(new NCName("name1"));
   
    Service[] services = new Service[]{service, service2, service3};
   
    if(val.testAssertionService1060(services, reporter))
    {
View Full Code Here


  public void testGetEndpointGetEndpoints()
  {
    /* Set up prereqs:
     * - Service with > 1 endpoints created.
     */
    ServiceElement fServiceElement = new ServiceImpl();
    EndpointElement fEndpointElement1 = fServiceElement.addEndpointElement();
    fEndpointElement1.setName(new NCName("endpoint1"));
    EndpointElement fEndpointElement2 = fServiceElement.addEndpointElement();
    fEndpointElement2.setName(new NCName("endpoint2"));   
    Service fService = (Service) fServiceElement;
   
    // test getEndpoint()
    Endpoint e1 = fService.getEndpoint(new NCName("endpoint1"));
View Full Code Here

     * Test that the QName specified on the setInterfaceName method is returned by
     * the getInterfaceName method.
     */
    public void testSetAndGetInterfaceName()
    {
        ServiceElement service = new ServiceImpl();
        service.setInterfaceName(fQName);
        QName returnedQN = service.getInterfaceName();
        assertTrue("QName returned by ServiceElement.getInterfaceName() was not the one set by setInterfaceName().",
                   returnedQN.equals(fQName));
    }
View Full Code Here

    /**
     * Test that the QName specified on the setInterfaceName method is returned by
     * the getInterfaceName method.
     */
    public void testSetAndGetInterfaceNameFromOM(){
        ServiceElement service = new ServiceImpl();
        service.setInterfaceName(fQName);
        QName returnedQN = service.getInterfaceName();
        assertTrue("QName returned by ServiceElement.getInterfaceName() was not the one set by setInterfaceName().",
                   returnedQN.equals(fQName));
    }
View Full Code Here

  public void redirect(Environment environment, final String url) throws Exception {
    ContinuationManagerContext continuationHandler =
      (ContinuationManagerContext) environment.getEntry(ContinuationManagerContext.class)
   
    // setting the continuation
    continuationHandler.runContinuationOnce(new BaseService() {
      protected void action(Path path, InputData input, OutputData output) throws Exception {
        ((ServletOutputData)output).getResponse().sendRedirect(url);
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.araneaframework.core.BaseService$ServiceImpl

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.