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


     * @param configElement Endpoint configuration.
     * @return EndpointFactory implementation.
     */
    private static EndpointFactory getEndpointFactory(OMElement configElement) {

        if (configElement.getAttribute(new QName("key")) != null) {
            return IndirectEndpointFactory.getInstance();
        }

        if (configElement.getAttribute(new QName("key-expression")) != null) {
            return ResolvingEndpointFactory.getInstance();
        }

        if (configElement.getAttribute(new QName("template")) != null) {
            return new TemplateEndpointFactory();
        }

        OMElement addressElement = configElement.getFirstChildWithName(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "address"));
        if (addressElement != null) {
            return AddressEndpointFactory.getInstance();
        }

        OMElement wsdlElement = configElement.getFirstChildWithName(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "wsdl"));
        if (wsdlElement != null) {
            return WSDLEndpointFactory.getInstance();
        }

        OMElement defaultElement = configElement.getFirstChildWithName(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "default"));
        if (defaultElement != null) {
            return DefaultEndpointFactory.getInstance();
        }

        OMElement lbElement = configElement.getFirstChildWithName
                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "loadbalance"));
        if (lbElement != null) {
            OMElement sessionElement = configElement.
                    getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE, "session"));
            if (sessionElement != null) {
                return SALoadbalanceEndpointFactory.getInstance();
            } else {
                return LoadbalanceEndpointFactory.getInstance();
            }
        }

        OMElement dlbElement = configElement.getFirstChildWithName
                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "dynamicLoadbalance"));
        if (dlbElement != null) {
            //TODO: Handle Session affinity & failover
            return DynamicLoadbalanceEndpointFactory.getInstance();
        }

        OMElement foElement = configElement.getFirstChildWithName
                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "failover"));
        if (foElement != null) {
            return FailoverEndpointFactory.getInstance();
        }

        handleException("Invalid endpoint configuration.");
View Full Code Here


    public void processBpelString(OMElement om) {

        if (om != null) {

            OMElement startElement = bpelElement.getFirstChildWithName(new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", BPEL2SVGFactory.SEQUENCE_START_TAG)); // namesapce should be changed, exceptions should be handled.
            if (startElement != null) {
                processActivity = new ProcessImpl(bpelElement);
                processActivity.setLinkProperties(links, sources,targets);
                processActivity.processSubActivities(bpelElement);
            }else{
                startElement = bpelElement.getFirstChildWithName(new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", BPEL2SVGFactory.FLOW_START_TAG)); // namesapce should be changed, exceptions should be handled.
                if(startElement != null){
                    processActivity = new ProcessImpl(bpelElement);
                    processActivity.setLinkProperties(links, sources,targets);
                    processActivity.processSubActivities(bpelElement);  
                }
                else {
                    startElement = bpelElement.getFirstChildWithName(new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", BPEL2SVGFactory.SCOPE_START_TAG)); // namesapce should be changed, exceptions should be handled.
                    if(startElement != null){
                        processActivity = new ProcessImpl(bpelElement);
                        processActivity.setLinkProperties(links, sources,targets);
                        processActivity.processSubActivities(bpelElement);
                    } else {
View Full Code Here

            switch(nodekind) {
                case NodeKind.ELEMENT:
                    ElementTest elementTest = (ElementTest) nodetype;
                    final QualifiedName elemType = elementTest.getTypeName();
                    if(elemType == null) {
                        return new QName("http://www.w3.org/2001/XMLSchema", "anyType", "xs");
                    } else {
                        return QualifiedName.toJavaxQName(elemType);
                    }
                case NodeKind.ATTRIBUTE:
                    AttributeTest attrTest = (AttributeTest) nodetype;
                    final QualifiedName attrType = attrTest.getTypeName();
                    if(attrType == null) {
                        return new QName("http://www.w3.org/2001/XMLSchema", "anyType", "xs");
                    } else {
                        return QualifiedName.toJavaxQName(attrType);
                    }
                default:
                    break;
View Full Code Here

            }
        } catch (XQException e) {
        }
        // if getNodeName() is supported for the item kind, it must be equal
        try {
            final QName nodeName = getNodeName(), thatNodeName = objtype.getNodeName();
            if(nodeName == null) {
                if(thatNodeName != null) {
                    return false;
                }
            } else if(!nodeName.equals(thatNodeName)) {
                return false;
            }
        } catch (XQException e) {
        }
        // getSchemaURI() is equal
        final URI uri = getSchemaURI(), thatUri = objtype.getSchemaURI();
        if(uri == null) {
            if(thatUri != null) {
                return false;
            }
        } else if(!uri.equals(thatUri)) {
            return false;
        }
        // if getTypeName() is supported for the item kind, it must be equal
        try {
            final QName typeName = getTypeName(), thatTypeName = objtype.getTypeName();
            if(typeName == null) {
                if(thatTypeName != null) {
                    return false;
                }
            } else if(!typeName.equals(thatTypeName)) {
                return false;
            }
        } catch (XQException e) {
        }
        // isAnonymousType() is equal
View Full Code Here

    try {
      Service service = new Service();

      Call call = (Call)service.createCall();
      call.setTargetEndpointAddress(new java.net.URL(WEB_SERVICE_URL));
      call.setOperationName(new QName("LicenseAdminSoapService", "obtainLicenseFile"));
      call.addParameter("arg1", XMLType.XSD_BASE64, ParameterMode.IN);
      call.addParameter("arg2", XMLType.XSD_BASE64, ParameterMode.IN);
      call.setReturnType(XMLType.XSD_BASE64);
      returnByteArray = (byte[])call.invoke(new Object[] { blowfishKey, serverData });
    } catch (RemoteException remoteException) {
View Full Code Here

  public PurchaseSVC(URL wsdlLocation, QName serviceName) {
    super(wsdlLocation, serviceName);
  }

  public PurchaseSVC() {
    super(WSDL_URL, new QName(TARGET_NAMESPACE, SERVICE_NAME));
  }
View Full Code Here

   * @return returns InvoiceCallbackPT
   */
  @WebEndpoint(name = INVOICE_CALLBACK_PORT_NAME)
  public InvoiceCallbackPT getInvoiceCallbackSP() {
    return super.getPort(
        new QName(TARGET_NAMESPACE, INVOICE_CALLBACK_PORT_NAME),
        InvoiceCallbackPT.class);
  }
View Full Code Here

   * @return returns InvoiceCallbackPT
   */
  @WebEndpoint(name = INVOICE_CALLBACK_PORT_NAME)
  public InvoiceCallbackPT getInvoiceCallbackSP(WebServiceFeature... features) {
    return super.getPort(
        new QName(TARGET_NAMESPACE, INVOICE_CALLBACK_PORT_NAME),
        InvoiceCallbackPT.class, features);
  }
View Full Code Here

  /**
   * @return returns ShippingCallbackPT
   */
  @WebEndpoint(name = SHIPPING_CALLBACK_PORT_NAME)
  public ShippingCallbackPT getShippingCallbackSP() {
    return super.getPort(new QName(TARGET_NAMESPACE,
        SHIPPING_CALLBACK_PORT_NAME), ShippingCallbackPT.class);
  }
View Full Code Here

   * parameter will have their default values.
   * @return returns ShippingCallbackPT
   */
  @WebEndpoint(name = SHIPPING_CALLBACK_PORT_NAME)
  public ShippingCallbackPT getShippingCallbackSP(WebServiceFeature... features) {
    return super.getPort(new QName(TARGET_NAMESPACE,
        SHIPPING_CALLBACK_PORT_NAME), ShippingCallbackPT.class, features);
  }
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.