Package org.apache.woden.internal.wsdl20

Examples of org.apache.woden.internal.wsdl20.EndpointImpl


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

     */
    protected void setUp() throws Exception
    {
        super.setUp();
        fTypeDefinition = new TypeDefinitionImpl();
    fTypeSystem = new URI("http://www.w3.org/2001/XMLSchema");
    }
View Full Code Here

     */
    public XmlSchemaType getType()
    {
        XmlSchemaType xst = null;
        DescriptionElement desc = getDescriptionElement(getParentElement());
        TypesImpl types = (TypesImpl)desc.getTypesElement();
        if(types != null) {
            xst = types.getTypeDefinition(fTypeName);
        }
        return xst;
    }
View Full Code Here

        //Populate the Map of targetClass->List of WSDL 2.0 Assertions
       
        fWsdlAsserts = new HashMap();
       
        List descElem = new Vector();
        descElem.add(new Description1001());
        descElem.add(new Description1002());
        descElem.add(new Description1002());
        fWsdlAsserts.put(DescriptionElement.class, descElem);
       
        List desc = new Vector();
View Full Code Here

       
        fWsdlAsserts = new HashMap();
       
        List descElem = new Vector();
        descElem.add(new Description1001());
        descElem.add(new Description1002());
        descElem.add(new Description1002());
        fWsdlAsserts.put(DescriptionElement.class, descElem);
       
        List desc = new Vector();
        desc.add(new Interface1010());
        fWsdlAsserts.put(Description.class, desc);
View Full Code Here

        List desc = new Vector();
        desc.add(new Interface1010());
        fWsdlAsserts.put(Description.class, desc);
       
        List intf = new Vector();
        intf.add(new Interface1009());
        fWsdlAsserts.put(Interface.class, intf);
       
    }
View Full Code Here

        descElem.add(new Description1002());
        descElem.add(new Description1002());
        fWsdlAsserts.put(DescriptionElement.class, descElem);
       
        List desc = new Vector();
        desc.add(new Interface1010());
        fWsdlAsserts.put(Description.class, desc);
       
        List intf = new Vector();
        intf.add(new Interface1009());
        fWsdlAsserts.put(Interface.class, intf);
View Full Code Here

TOP

Related Classes of org.apache.woden.internal.wsdl20.EndpointImpl

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.