Package org.apache.woden.wsdl20.xml

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


      // Description...
      DescriptionElement fDescElement = factory.newDescription();
     
      // Binding...
        fBindingQName = new QName("binding1");
      BindingElement fBindingElement = fDescElement.addBindingElement();
        fBindingNCName = new NCName("binding1");
        NCName fServiceNCName = new NCName("service1");
        QName fServiceQName = new QName("service1");
        NCName fEndpointNCname = new NCName("endpoint1");
      fBindingElement.setName(fBindingNCName);
     
      // Service... (attach our Endpoint to a Service parented by our Description)
      ServiceElement fServiceElement = fDescElement.addServiceElement();
      fServiceElement.setName(fServiceNCName);
     
View Full Code Here


        }

        DescriptionElement descriptionElement = factory.newDescription();

    // Create the BindingElement<->InterfaceElement->InterfaceOperationElement->InterfaceMessageReferenceElement hierarchy
    BindingElement bindingElement = descriptionElement.addBindingElement();
    bindingElement.setInterfaceName(new QName("interface1"));
   
    InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));

    InterfaceOperationElement ifopElement = interfaceElement.addInterfaceOperationElement();
    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();
View Full Code Here

     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getInterfaceOperationElement()
     */
    public InterfaceOperationElement getInterfaceOperationElement()
    {
        InterfaceOperationElement oper = null;
        BindingElement binding = (BindingElement)getParentElement();
        InterfaceElement interfac = binding.getInterfaceElement();
        if(interfac != null) {
            InterfaceOperation operComp = ((Interface)interfac).getFromAllInterfaceOperations(fRef);
            if(operComp != null) {
                oper = operComp.toElement();
            }
View Full Code Here

    private BindingElement parseBinding(
            XMLElement bindEl,
            DescriptionElement desc)
            throws WSDLException {

        BindingElement binding = desc.addBindingElement();

        String name = bindEl.getAttributeValue(Constants.ATTR_NAME);
        if(name != null)
        {
            binding.setName(new NCName(name));
        }

        QName intfaceQN = null;
        String intface = bindEl.getAttributeValue(Constants.ATTR_INTERFACE);
        if(intface != null)
        {
            try {
                intfaceQN = bindEl.getQName(intface);
                binding.setInterfaceName(intfaceQN);
            } catch (WSDLException e) {
                getErrorReporter().reportError(
                        new ErrorLocatorImpl()//TODO line&col nos.
                        "WSDL505",
                        new Object[] {intface, bindEl.getQName()},
                        ErrorReporter.SEVERITY_ERROR);
            }
        }

        String type = bindEl.getAttributeValue(Constants.ATTR_TYPE);
        if(type != null) {
            binding.setType(getURI(type));
        }

        parseExtensionAttributes(bindEl, BindingElement.class, binding, desc);

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

        XMLElement[] children = bindEl.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, binding);
            }
            else if (Constants.Q_ELEM_FAULT.equals(tempElQN))
            {
                parseBindingFault(tempEl, desc, binding);
            }
            else if (Constants.Q_ELEM_OPERATION.equals(tempElQN))
            {
                parseBindingOperation(tempEl, desc, binding);
            }
            else
            {
                binding.addExtensionElement(
                        parseExtensionElement(BindingElement.class, binding, tempEl, desc) );
            }
        }

        return binding;
View Full Code Here

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

            BindingElement binding=bindings[ind];
            if (bindings != null){

                pw.print("  <" + tagName);
                QName name = binding.getName();
                if (name != null){
                    DOMUtils.printAttribute(Constants.ATTR_NAME,
                            name.getLocalPart(),
                            pw);
                }

                InterfaceElement intrface = binding.getInterfaceElement();
                if (intrface != null){


                    QName interfaceName=intrface.getName();
                    if(interfaceName!=null)
                    DOMUtils.printQualifiedAttribute(Constants.ATTR_INTERFACE,
                            interfaceName,
                            des,
                            pw);

                    DOMUtils.printAttribute(Constants.ATTR_TYPE,
                            binding.getType().toString(),
                            pw);
                   
                   printExtensibilityAttributes(binding.getExtensionAttributes(), binding, pw);                  
                }
                pw.println('>');
                printDocumentation(binding.getDocumentationElements(), des, pw);
                printExtensibilityElements(binding.getClass(), binding.getExtensionElements(), des, pw);
                printBindingOperations(binding.getBindingOperationElements(), des, pw);
                printBindingFaults(binding.getBindingFaultElements(), des, pw);
                pw.println("  </" + tagName + '>');
            }
        }
    }
View Full Code Here

                    DOMUtils.printAttribute(Constants.ATTR_NAME,
                            name, pw);
                   
                }               

                BindingElement binding =endPoint.getBindingElement();
                if (binding != null){
                    DOMUtils.printQualifiedAttribute(Constants.ATTR_BINDING,
                            binding.getName(),
                            des,
                            pw);
                }

                URI address =endPoint.getAddress();
View Full Code Here

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

            BindingElement binding=bindings[ind];
            if (bindings != null){

                pw.print("  <" + tagName);
                QName name = binding.getName();
                if (name != null){
                    OMUtils.printAttribute(Constants.ATTR_NAME,
                            name.getLocalPart(),
                            pw);
                }
                InterfaceElement intrface = binding.getInterfaceElement();
                if (intrface != null){
                    QName interfaceName=intrface.getName();
                    if(interfaceName!=null)
                    OMUtils.printQualifiedAttribute(Constants.ATTR_INTERFACE,
                            interfaceName,
                            des,
                            pw);
                    OMUtils.printAttribute(Constants.ATTR_TYPE,
                            binding.getType().toString(),
                            pw);
                   printExtensibilityAttributes(binding.getExtensionAttributes(), binding, pw);                      

                }
                pw.println('>')
                printDocumentation(binding.getDocumentationElements(), des, pw);
                printExtensibilityElements(binding.getClass(), binding.getExtensionElements(), des, pw);
                printBindingOperations(binding.getBindingOperationElements(), des, pw);
                printBindingFaults(binding.getBindingFaultElements(), des, pw);
                pw.println("  </" + tagName + '>');
            }
        }
     
     
View Full Code Here

                    OMUtils.printAttribute(Constants.ATTR_NAME,
                            name, pw);
                   
                }
               
                BindingElement binding =endPoint.getBindingElement();
                if (binding != null){
                    OMUtils.printQualifiedAttribute(Constants.ATTR_BINDING,
                            binding.getName(),
                            des,
                            pw);
                }

                URI address =endPoint.getAddress();
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

TOP

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

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.