Package javax.xml.namespace

Examples of javax.xml.namespace.QName

The value of a QName contains a namespaceURI and a localPart. The localPart provides the local part of the qualified name. The namespaceURI is a URI reference identifying the namespace.

The prefix is included in the QName class to retain lexical information where present in an XML input source. The prefix is NOT used to compute the hash code or in the equals operation. In other words, equality is defined only using the namespaceURI and the localPart. @version 1.1


{
    public void testWSDL()
        throws Exception
    {
        Service service = getServiceFactory().create(Echo.class,
                                                     new QName("urn:xfire:wsdl", "EchoService"),
                                                     getClass().getResource("echoDocLit.wsdl"),
                                                     null);
       
       
    }
View Full Code Here


{

    public void extend(Definition definition, WSDLBuilder builder)
    {
        Message message = definition.createMessage();
        message.setQName(new QName("urn:foo", "Test"));
        message.setUndefined(false);
       
        definition.addMessage(message);
    }
View Full Code Here

        // Create using PicoObjectServiceFactory and put the Service into the
        // pico.
        ServiceFactory sf = getServiceFactory();
        Service ms = sf.create(DummyServiceThatCounts.class);
        ms.setName(new QName("test"));
        getPico().registerComponentInstance(ms);

        // Register XFireServiceRegisterVisitor and its dependency into the
        // pico.
        getPico().registerComponentInstance(ServiceRegistry.class, getXFire().getServiceRegistry());
View Full Code Here

        Type type = tm.getTypeCreator().createType(MyBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        Iterator elItr = info.getElements();
        assertTrue(elItr.hasNext());
        QName el = (QName) elItr.next();
        assertEquals("Prop1", el.getLocalPart());

        Iterator attItr = info.getAttributes();
        assertTrue(attItr.hasNext());
        QName att = (QName) attItr.next();
        assertEquals("Prop2", att.getLocalPart());
    }
View Full Code Here

        Type type = tm.getTypeCreator().createType(MyBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        Iterator elItr = info.getElements();
        assertTrue(elItr.hasNext());
        QName el = (QName) elItr.next();
        assertEquals("Prop1", el.getLocalPart());

        assertTrue(elItr.hasNext());
        QName el2 = (QName) elItr.next();
        assertEquals("Prop2", el2.getLocalPart());
    }
View Full Code Here

        Type type = tm.getTypeCreator().createType(ParentOfMyBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        Iterator elItr = info.getElements();
        assertTrue(elItr.hasNext());
        QName el = (QName) elItr.next();
        assertEquals("Prop1", el.getLocalPart());

        assertTrue(elItr.hasNext());
        QName el2 = (QName) elItr.next();
        assertEquals("Prop2", el2.getLocalPart());
    }
View Full Code Here

        Type type = tm.getTypeCreator().createType(ListHolderBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        Iterator elItr = info.getElements();
        assertTrue(elItr.hasNext());
        QName el = (QName) elItr.next();
        assertEquals("Beans", el.getLocalPart());

        Type beanList = info.getType(el);
        assertTrue( beanList instanceof CollectionType );
    }
View Full Code Here

        Type type = tm.getTypeCreator().createType(ListHolderBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        Iterator elItr = info.getElements();
        assertTrue(elItr.hasNext());
        QName el = (QName) elItr.next();
        assertEquals("beans", el.getLocalPart());

        Type beanList = info.getType(el);
        assertTrue( beanList instanceof CollectionType );
    }
View Full Code Here

        Type type = tm.getTypeCreator().createType(MyBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        Iterator attItr = info.getAttributes();
        assertTrue(attItr.hasNext());
        QName el = (QName) attItr.next();
        assertEquals("prop2", el.getLocalPart());
    }
View Full Code Here

        tm.setEncodingStyleURI("urn:xfire:bean-nillable");

        Type type = tm.getTypeCreator().createType(MyBean.class);
        BeanTypeInfo info = ((BeanType) type).getTypeInfo();

        assertFalse(info.isNillable(new QName(info.getDefaultNamespace(), "prop1")));
        assertTrue(info.isNillable(new QName(info.getDefaultNamespace(), "prop2")));
    }
View Full Code Here

TOP

Related Classes of javax.xml.namespace.QName

Copyright © 2015 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.