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


        boolean locked = false;
        if (messageContext.getParameter(HTTPConstants.USER_AGENT) != null) {
            OMElement userAgentElement =
                    messageContext.getParameter(HTTPConstants.USER_AGENT).getParameterElement();
            userAgentString = userAgentElement.getText().trim();
            OMAttribute lockedAttribute = userAgentElement.getAttribute(new QName("locked"));
            if (lockedAttribute != null) {
                if (lockedAttribute.getAttributeValue().equalsIgnoreCase("true")) {
                    locked = true;
                }
            }
View Full Code Here


      List<JAXBElement> elements = new ArrayList<JAXBElement>();
      for (SetClause clause : ((Update)command).getChanges()) {
        ColumnReference element = clause.getSymbol();
        Column column = element.getMetadataObject();
        String val = ((Literal) clause.getValue()).toString();
        JAXBElement messageElem = new JAXBElement(new QName(column.getNameInSource()), stringClazz, Util.stripQutes(val));
        elements.add(messageElem);
      }

      List<DataPayload> updateDataList = new ArrayList<DataPayload>();
      for (int i = 0; i < Ids.length; i++) {
View Full Code Here

        String ns = "urn:AddNumbers";
        Service service = getServiceFactory().create(AddNumbers.class, "AddNumbers", ns, null);
       
        OperationInfo operation = service.getServiceInfo().getOperation("add");
       
        MessagePartInfo v1 = operation.getInputMessage().getMessagePart(new QName(ns, "value1"));
        assertNotNull(v1);
       
        MessagePartInfo v2 = operation.getInputMessage().getMessagePart(new QName(ns, "value2"));
        assertNotNull(v2);
       
        MessagePartInfo sum = operation.getOutputMessage().getMessagePart(new QName(ns, "sum"));
        assertNotNull(sum);
    }
View Full Code Here

        service = asf.create(CustomXFireNamespaceProblemServiceImpl.class,
                             null,
                             getTestFile("src/wsdl/XFire582.wsdl").toURL(),
                             null);
       
        Soap11Binding binding = new Soap11Binding(new QName("Soap"),
                                                  LocalTransport.BINDING_ID,
                                                  service);
        service.addBinding(binding);
        binding.setStyle(SoapConstants.STYLE_WRAPPED);
        binding.setSerializer(AbstractSoapBinding.getSerializer(SoapConstants.STYLE_WRAPPED,
                                                                SoapConstants.USE_LITERAL));
        Endpoint endpoint = new Endpoint(new QName("SoapEndpoint"),
                                         binding,
                                         "xfire.local://XFireNamespaceProblemService");
        service.addEndpoint(endpoint);
       
        getServiceRegistry().register(service);
View Full Code Here

{
    public void testTM() throws Exception
    {
        CustomTypeMapping mapping = new CustomTypeMapping();
       
        QName qname = new QName( "urn:soap", "String" );
       
        mapping.register( String.class, qname, new StringType() );
       
        assertTrue( mapping.isRegistered( String.class ) );
        assertTrue( mapping.isRegistered( qname ) );
View Full Code Here

        Service model = client.getService();
        AegisBindingProvider bp = (AegisBindingProvider) model.getBindingProvider();
        TypeMapping typeMapping = bp.getTypeMapping(model);
       
        BeanType bt = new BeanType();
        bt.setSchemaType(new QName("http://services.xfire.codehaus.org","SimpleBean"));
        bt.setTypeClass(SimpleBean.class);
        typeMapping.register(bt);
        // -- End insertion
       
        client.setXFire(getXFire());
View Full Code Here

        TypeMapping tm = provider.getTypeMappingRegistry().getDefaultTypeMapping();
       
        // Create your custom type
        BeanType type = new BeanType();
        type.setTypeClass(SimpleBean.class);
        type.setSchemaType(new QName("urn:ReallyNotSoSimpleBean", "SimpleBean"));

        // register the type
        tm.register(type);
       
        Service service = getServiceFactory().create(BeanService.class);
View Full Code Here

    public AuthenticationFault getFaultInfo() {
        return faultInfo;
    }

    public static QName getFaultName() {
        return new QName("urn:xfire:authenticate:fault", "AuthenticationFault");
    }
View Full Code Here

        throws Exception
    {
        ArrayType type = new ArrayType();
        type.setTypeClass(String[].class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:test", "strings"));
   
        // Test reading
        ElementReader reader = new ElementReader(getResourceAsStream("/org/codehaus/xfire/aegis/type/basic/strings.xml"));
       
        String[] strings = (String[]) type.readObject(reader, new MessageContext());
View Full Code Here

       
        ObjectServiceFactory osf = (ObjectServiceFactory) getServiceFactory();
        service = osf.create(AuthService.class, name, ns, null);
        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, AuthServiceImpl.class);
       
        soap12Binding = osf.createSoap12Binding(service, new QName(service.getTargetNamespace(), "Auth12"), LocalTransport.BINDING_ID);

        getServiceRegistry().register(service);
    }
View Full Code Here

TOP

Related Classes of javax.xml.namespace.QName

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.