Package javax.wsdl.extensions

Examples of javax.wsdl.extensions.UnknownExtensibilityElement


        while (iterator.hasNext()) {
            ExtensibilityElement wsdl4jElement = (ExtensibilityElement) iterator
                    .next();

            if (wsdl4jElement instanceof UnknownExtensibilityElement) {
                UnknownExtensibilityElement unknown = (UnknownExtensibilityElement) (wsdl4jElement);

                if (WSDLConstants.WSDL11Constants.POLICY.equals(unknown
                        .getElementType())) {

                    Policy policy = (Policy) PolicyUtil
                            .getPolicyComponent(unknown.getElement());
                    addPolicy(description, originOfExtensibilityElements,
                            policy);

                } else if (WSDLConstants.WSDL11Constants.POLICY_REFERENCE
                        .equals(unknown.getElementType())) {

                    PolicyReference policyReference = (PolicyReference) PolicyUtil
                            .getPolicyComponent(unknown.getElement());
                    addPolicyRef(description, originOfExtensibilityElements,
                            policyReference);

                } else if (AddressingConstants.Final.WSAW_USING_ADDRESSING
                        .equals(unknown.getElementType())
                        || AddressingConstants.Submission.WSAW_USING_ADDRESSING
                        .equals(unknown.getElementType())) {
                    // Read the wsaw:UsingAddressing flag from the WSDL. It is
                    // only valid on the Port or Binding
                    // so only recognise it as en extensibility elemtn of one of
                    // those.
                    if (originOfExtensibilityElements.equals(PORT)
                            || originOfExtensibilityElements.equals(BINDING)) {
                        if (Boolean.TRUE.equals(unknown.getRequired())) {
                            axisService
                                    .setWSAddressingFlag(AddressingConstants.ADDRESSING_REQUIRED);
                        } else {
                            axisService
                                    .setWSAddressingFlag(AddressingConstants.ADDRESSING_OPTIONAL);
                        }
                    }
                } else if (AddressingConstants.Final.WSAW_ANONYMOUS
                        .equals(unknown.getElementType())) {
                    if (originOfExtensibilityElements.equals(BINDING_OPERATION)) {
                        AxisOperation axisOperation = (AxisOperation) description;
                        if (unknown.getElement().getFirstChild() != null
                                && unknown.getElement().getFirstChild()
                                .getNodeType() == Node.TEXT_NODE) {
                            String anonymousValue = unknown.getElement()
                                    .getFirstChild().getNodeValue();
                            AddressingHelper.setAnonymousParameterValue(
                                    axisOperation, anonymousValue);
                        }
                    }
View Full Code Here


        ExtensibilityElement extElement;
        for (Iterator iterator = extElements.iterator(); iterator.hasNext();) {
            extElement = (ExtensibilityElement) iterator.next();

            if (extElement instanceof UnknownExtensibilityElement) {
                UnknownExtensibilityElement unknown = (UnknownExtensibilityElement) extElement;
                if (WSDLConstants.WSDL11Constants.POLICY.equals(unknown
                        .getElementType())) {

                    Policy policy = (Policy) PolicyUtil
                            .getPolicyComponent(unknown.getElement());

                    String key;
                    if ((key = policy.getName()) != null
                            || (key = policy.getId()) != null) {
                        registry.register(key, policy);
View Full Code Here

                           Policy p,
                           Class<?> cls,
                           String defName) {
        Element el = addPolicy(service, p, cls, defName);
        if (el != null) {
            UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
            uee.setElement(el);
            uee.setRequired(true);
            uee.setElementType(DOMUtils.getElementQName(el));
            place.addExtensor(uee);
        }
    }
View Full Code Here

            }

            // if not already added to service add it, otherwise ignore
            // and just create the policy reference.
            if (!isExistsPolicy(service, uri)) {
                UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
                uee.setElement(element);
                uee.setRequired(true);
                uee.setElementType(DOMUtils.getElementQName(element));
                service.getDescription().addExtensor(uee);
            }
           
            uri = "#" + uri;
        }
View Full Code Here

    private boolean isExistsPolicy(ServiceInfo service, String uri) {
        Object exts[] = service.getDescription().getExtensors().get();
        exts = exts == null ? new Object[0] : exts;
        for (Object o : exts) {
            if (o instanceof UnknownExtensibilityElement) {
                UnknownExtensibilityElement uee = (UnknownExtensibilityElement)o;
                String uri2 = getPolicyId(uee.getElement());
                if (uri.equals(uri2)) {
                    return true;
                }
            }
        }
View Full Code Here

                el.setRequired(addressing.required());
                bindingInfo.addExtensor(el);
               
                StringBuilder polRefId = new StringBuilder(bindingInfo.getName().getLocalPart());
                polRefId.append("_WSAM_Addressing_Policy");
                UnknownExtensibilityElement uel = new UnknownExtensibilityElement();
               
                W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
                writer.writeStartElement("wsp", "PolicyReference", URI_POLICY_NS);
                writer.writeAttribute("URI", "#" + polRefId.toString());
                writer.writeEndElement();
                Element pr = writer.getDocument().getDocumentElement();
                uel.setElement(pr);
                uel.setElementType(DOMUtils.getElementQName(pr));
                bindingInfo.addExtensor(uel);
               
                writer = new W3CDOMStreamWriter();
                writer.writeStartElement("wsp", "Policy", URI_POLICY_NS);
                writer.writeAttribute("wsu", URI_WSU_NS,
                                      "Id", polRefId.toString());
                writer.writeStartElement("wsam", "Addressing", JAXWSAConstants.NS_WSAM);
                if (!addressing.required()) {
                    writer.writeAttribute("wsp", URI_POLICY_NS,
                                          "Optional", "true");
                }
                writer.writeStartElement("wsp", "Policy", URI_POLICY_NS);
               
                String s = getAddressingRequirement(addressing);
                if (s != null) {
                    writer.writeEmptyElement("wsam", s, JAXWSAConstants.NS_WSAM);
                }
               
                writer.writeEndElement();
                writer.writeEndElement();
                writer.writeEndElement();
               
                pr = writer.getDocument().getDocumentElement();
               
                uel = new UnknownExtensibilityElement();
                uel.setElement(pr);
                uel.setElementType(DOMUtils.getElementQName(pr));
                if (bindingInfo.getService().getDescription() == null) {
                    DescriptionInfo description = new DescriptionInfo();
                    description.setName(bindingInfo.getService().getName());
                    bindingInfo.getService().setDescription(description);
                }
View Full Code Here

                        addSchemaElement(element, namespaceMap, schemaList);
                    }
                } else if (o instanceof UnknownExtensibilityElement) {
                    //This is allegedly obsolete as of axis-wsdl4j-1.2-RC3.jar which includes the Schema extension above.
                    //The change notes imply that imported schemas should end up in Schema elements.  They don't, so this is still needed.
                    UnknownExtensibilityElement unknownExtensibilityElement = (UnknownExtensibilityElement) o;
                    Element element = unknownExtensibilityElement.getElement();
                    String elementNamespace = element.getNamespaceURI();
                    String elementLocalName = element.getNodeName();
                    if ("http://www.w3.org/2001/XMLSchema".equals(elementNamespace) && "schema".equals(elementLocalName)) {
                        addSchemaElement(element, namespaceMap, schemaList);
                    }
View Full Code Here

        for ( int i = 0; i < extElems.size(); i++ )
        {
            ExtensibilityElement extElem = (ExtensibilityElement) extElems.get( i );
            if ( extElem instanceof UnknownExtensibilityElement )
            {
                UnknownExtensibilityElement unknownExtElem = (UnknownExtensibilityElement) extElem;
                Element elem = unknownExtElem.getElement();
                if ( elem.getNamespaceURI().equals( XmlConstants.NSURI_SCHEMA_XSD )
                        && elem.getLocalName().equals( XmlConstants.XSD_SCHEMA.getLocalPart() ) )
                {
                    schemaElems.add( elem );
                }
View Full Code Here

                           Policy p,
                           Class<?> cls,
                           String defName) {
        Element el = addPolicy(service, p, cls, defName);
        if (el != null) {
            UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
            uee.setElement(el);
            uee.setRequired(true);
            uee.setElementType(DOMUtils.getElementQName(el));
            place.addExtensor(uee);
        }
    }
View Full Code Here

            }

            // if not already added to service add it, otherwise ignore
            // and just create the policy reference.
            if (!isExistsPolicy(service, uri)) {
                UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
                uee.setElement(element);
                uee.setRequired(true);
                uee.setElementType(DOMUtils.getElementQName(element));
                service.getDescription().addExtensor(uee);
            }
           
            uri = "#" + uri;
        }
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.UnknownExtensibilityElement

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.