Package org.apache.woden.wsdl20.xml

Examples of org.apache.woden.wsdl20.xml.BindingOperationElement


    ifopElement.setName(new NCName("operation1"));
    InterfaceMessageReferenceElement ifmrElement = ifopElement.addInterfaceMessageReferenceElement();
    ifmrElement.setMessageLabel(new NCName("MessageRef1MessageLabel"));
       
    // Create the BindingOperationElement->BindingMessageReferenceElement hierarchy
    BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
    bopElement.setRef(new QName("operation1"));
    fBindingMessageRefElement = bopElement.addBindingMessageReferenceElement();
    fBindingMessageRefElement.setMessageLabel(new NCName("MessageRef1MessageLabel"));

    Description descComp = descriptionElement.toComponent();
    descComp.getBindings(); // this triggers setting the link to description in the binding
   
View Full Code Here


    BindingOperation[] bopArray = fBinding.getBindingOperations();
    assertNotNull("Expected an array of BindingOperations -", bopArray);
    assertEquals("Retrieved BindingOperation group should be empty if none set -", 0, bopArray.length);

    // addBindingOperationElement()
    BindingOperationElement bop1 = fBindingElement.addBindingOperationElement();
    BindingOperationElement bop2 = fBindingElement.addBindingOperationElement();

    // getBindingOperations()
    bopArray = fBinding.getBindingOperations();
    assertNotNull("Expected an array of BindingOperation -", bopArray);
    assertEquals("Incorrect number of retrieved BindingOperations -", 2, bopArray.length);
View Full Code Here

            XMLElement bindOpEl,
            DescriptionElement desc,
            BindingElement parent)
            throws WSDLException {

        BindingOperationElement oper = parent.addBindingOperationElement();

        QName refQN = null;
        String ref = bindOpEl.getAttributeValue(Constants.ATTR_REF);
        if(ref != null)
        {
            try {
                refQN = bindOpEl.getQName(ref);
                oper.setRef(refQN);
            } catch (WSDLException e) {
                getErrorReporter().reportError(
                        new ErrorLocatorImpl()//TODO line&col nos.
                        "WSDL505",
                        new Object[] {ref, bindOpEl.getQName()},
                        ErrorReporter.SEVERITY_ERROR);
            }
        }

        parseExtensionAttributes(bindOpEl, BindingOperationElement.class, oper, desc);

        /* Parse the child elements of binding <operation>.
         * As per WSDL 2.0 spec, they must be in the following order if present:
         * <documentation>
         * <input> <output> <infault> <outfault> or extension elements in any order
         * TODO validate that the elements are in correct order
         */

        XMLElement[] children = bindOpEl.getChildElements();
        XMLElement tempEl = null;
        QName tempElQN = null;

        for(int i=0; i<children.length; i++)
        {
            tempEl = children[i];
            tempElQN = tempEl.getQName();

            if (Constants.Q_ELEM_DOCUMENTATION.equals(tempElQN))
            {
                parseDocumentation(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_INPUT.equals(tempElQN))
            {
                parseBindingMessageReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_OUTPUT.equals(tempElQN))
            {
                parseBindingMessageReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_INFAULT.equals(tempElQN))
            {
                parseBindingFaultReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_OUTFAULT.equals(tempElQN))
            {
                parseBindingFaultReference(tempEl, desc, oper);
            }
            else
            {
                oper.addExtensionElement(
                        parseExtensionElement(BindingOperationElement.class, oper, tempEl, desc) );
            }
        }

        return oper;
View Full Code Here

        else
        {
            //This is a limited solution supporting the 3 MEPs in the Part 2 spec.
            //TODO generic support for user-defined, extensible MEPs.
           
            BindingOperationElement bop = (BindingOperationElement)faultRef.getParentElement();
            InterfaceOperationElement iop = bop.getInterfaceOperationElement();
            URI mep = (iop != null ? iop.getPattern() : null); //iop might be null if the WSDL is invalid
           
            if(Constants.MEP_URI_IN_OUT.equals(mep))
            {
                //Ruleset is fault-replaces-message, so fault is in same direction as msg.
View Full Code Here

                DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                          Constants.ELEM_OPERATION,
                          des);
            for(int ind=0;ind<operations.length;ind++){

                BindingOperationElement operation =operations[ind] ;
                if (operation!=null){

                    pw.print("    <" + tagName);
                    DOMUtils.printQualifiedAttribute(Constants.ATTR_REF,
                             operation.getRef(),
                             des,
                             pw);

                    printExtensibilityAttributes(operation.getExtensionAttributes(), operation, pw);
                    pw.println("/>");

                }
            }
View Full Code Here

                OMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                          Constants.ELEM_OPERATION,
                          des);
            for(int ind=0;ind<operations.length;ind++){

                BindingOperationElement operation =operations[ind] ;
                if (operation!=null){
                    pw.print("    <" + tagName);
                    OMUtils.printQualifiedAttribute(Constants.ATTR_REF,
                             operation.getRef(),
                             des,
                             pw);
                    printExtensibilityAttributes(operation.getExtensionAttributes(), operation, pw);
                    pw.println("/>");
                }
            }

View Full Code Here

    }

    private void validateWsdl2(HttpSoapConsumerMarshaler marshaler) throws org.apache.woden.WSDLException, IOException,
                    DeploymentException {
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        DescriptionElement descElement = reader.readWSDL(wsdl.getURL().toString());
        Description desc = descElement.toComponent();
        org.apache.woden.wsdl20.Service svc;
        if (getService() != null) {
            svc = desc.getService(getService());
            if (svc == null) {
                throw new DeploymentException("Could not find service '" + getService() + "' in wsdl");
View Full Code Here

    }
   
    protected void validateWsdl2(JmsSoapProviderMarshaler marshaler) throws
                                  org.apache.woden.WSDLException, IOException, DeploymentException {
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        DescriptionElement descElement = reader.readWSDL(wsdl.getURL().toString());
        Description desc = descElement.toComponent();
        org.apache.woden.wsdl20.Service svc;
        if (getService() != null) {
            svc = desc.getService(getService());
            if (svc == null) {
                throw new DeploymentException("Could not find service '" + getService() + "' in wsdl");
View Full Code Here

    protected static Binding<?> getBinding(String wsdlResource) {
        try {
            String url = PersonHttpTest.class.getResource(wsdlResource).toString();
            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            DescriptionElement descElement = reader.readWSDL(url);
            Description desc = descElement.toComponent();
            Endpoint endpoint = desc.getServices()[0].getEndpoints()[0];
            Binding<?> binding = BindingFactory.createBinding(endpoint);
            assertNotNull(binding);
            return binding;
        } catch (WSDLException e) {
View Full Code Here

    }
   
    protected void validateWsdl2(HttpSoapProviderMarshaler marshaler) throws
                                  org.apache.woden.WSDLException, IOException, DeploymentException {
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        DescriptionElement descElement = reader.readWSDL(wsdl.getURL().toString());
        Description desc = descElement.toComponent();
        org.apache.woden.wsdl20.Service svc;
        if (getService() != null) {
            svc = desc.getService(getService());
            if (svc == null) {
                throw new DeploymentException("Could not find service '" + getService() + "' in wsdl");
View Full Code Here

TOP

Related Classes of org.apache.woden.wsdl20.xml.BindingOperationElement

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.