Package com.bea.x2002.x09.xbean.config.ConfigDocument

Examples of com.bea.x2002.x09.xbean.config.ConfigDocument.Config


    //
    // return policy;
    // }
    public static Policy getAttachedPolicy(ElementExtensible item, Definition def) {

        Policy rtnPolicy = null;
        String usedPolicyNamespace = PolicyUtils.WS_W3_POLICY_NAMESPACE;
        Element[] policyReferences = WsdlUtils.getExentsibilityElements(item, new QName(
                PolicyUtils.WS_W3_POLICY_NAMESPACE, "PolicyReference"));
        if (policyReferences.length <= 0) {
            policyReferences = WsdlUtils.getExentsibilityElements(item, new QName(
View Full Code Here


    }

    public static Policy getPolicy(Element policy, String usedPolicyNamespace) {
        // policy = PolicyUtils.normalize(policy);

        Policy newPolicy = null;
        // check for ExactlyOne and All
        // TODO ExactlyOne and All are idempotent all empty ones should be skipped
        // and found the real ones
        Element exactlyOne = XmlUtils.getFirstChildElementNS(policy, usedPolicyNamespace, "ExactlyOne");
        if (exactlyOne != null) {
View Full Code Here

    private static Policy getAddressingPolicy(Element wsamAddressingElm, String usedPolicyNamespace) {
        // check if found reference is addressing policy
        Element wsAddressing = XmlUtils.getFirstChildElementNS(wsamAddressingElm, WsaUtils.WS_A_NAMESPACE_200705,
                "Addressing");
        Element addressingPolicy = null;
        Policy newPolicy = PolicyDocument.Factory.newInstance().addNewPolicy();
        Addressing newAddressing = null;
        if (wsAddressing != null) {
            newAddressing = newPolicy.addNewAddressing();
            String optional = wsAddressing.getAttributeNS(usedPolicyNamespace, "Optional");
            if (!StringUtils.isNullOrEmpty(optional) && optional.equals(OptionalType.TRUE.toString())) {
                newAddressing.setOptional(OptionalType.TRUE);
            } else {
                newAddressing.setOptional(OptionalType.FALSE);
            }
            addressingPolicy = XmlUtils.getFirstChildElementNS(wsAddressing, usedPolicyNamespace, "Policy");
            if (addressingPolicy != null) {
                Element exactlyOne = XmlUtils.getFirstChildElementNS(addressingPolicy, usedPolicyNamespace, "ExactlyOne");
                if (exactlyOne != null) {
                    Element all = XmlUtils.getFirstChildElementNS(exactlyOne, usedPolicyNamespace, "All");
                    if (all != null) {
                        getAddressingAnonymous(all, newAddressing);
                    }
                } else {
                    getAddressingAnonymous(addressingPolicy, newAddressing);
                }

            }
        }
        Element usingAddressing = XmlUtils.getFirstChildElementNS(wsamAddressingElm, WsaUtils.WS_A_NAMESPACE_200605,
                "UsingAddressing");
        if (usingAddressing != null) {
            // add UsingAddressing to policy
            newPolicy.addNewUsingAddressing();
        }
        return newPolicy;
    }
View Full Code Here

        }
        return newPolicy;
    }

    private static void getAddressingAnonymous(Element addressingPolicy, Addressing newAddressing) {
        Policy innerPolicy = newAddressing.addNewPolicy();
        // check if policy has Anonymous
        Element anonymousElm = XmlUtils.getFirstChildElementNS(addressingPolicy, new QName(
                WsaUtils.WS_A_NAMESPACE_200705, "AnonymousResponses"));
        if (anonymousElm != null) {
            innerPolicy.addNewAnonymousResponses();
        } else {
            Element nonAnonymousElement = XmlUtils.getFirstChildElementNS(addressingPolicy, new QName(
                    WsaUtils.WS_A_NAMESPACE_200705, "NonAnonymousResponses"));
            if (nonAnonymousElement != null) {
                innerPolicy.addNewNonAnonymousResponses();
            }
        }
    }
View Full Code Here

        paths = ( XmlObject[] )listOfXmlObjcts.toArray();

        for( XmlObject obj : paths )
        {
          String xx = obj.xmlText( new XmlOptions().setSaveOuter() );
          PolicyDocument policyDocument = PolicyDocument.Factory.parse( xx );
          org.xmlsoap.schemas.ws.x2004.x09.policy.Policy polc = ( org.xmlsoap.schemas.ws.x2004.x09.policy.Policy )policyDocument
              .getPolicy();
          policies.add( polc );
          // List<Addressing> addressingList = polc.getAddressingList();
          // Addressing a = null;
          // if (addressingList.size() > 0 )
View Full Code Here

                listOfXmlObjcts.addAll(Arrays.asList(paths1));
                paths = (XmlObject[]) listOfXmlObjcts.toArray();

                for (XmlObject obj : paths) {
                    String xx = obj.xmlText(new XmlOptions().setSaveOuter());
                    PolicyDocument policyDocument = PolicyDocument.Factory.parse(xx);
                    org.xmlsoap.schemas.ws.x2004.x09.policy.Policy polc = (org.xmlsoap.schemas.ws.x2004.x09.policy.Policy) policyDocument
                            .getPolicy();
                    policies.add(polc);
                    // List<Addressing> addressingList = polc.getAddressingList();
                    // Addressing a = null;
                    // if (addressingList.size() > 0 )
View Full Code Here

TOP

Related Classes of com.bea.x2002.x09.xbean.config.ConfigDocument.Config

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.