Package org.apache.woden.wsdl20.xml

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


            XMLElement endpointEl,
            DescriptionElement desc,
            ServiceElement parent)
            throws WSDLException {

        EndpointElement endpoint = parent.addEndpointElement();

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

        QName bindingQN = null;
        String binding = endpointEl.getAttributeValue(Constants.ATTR_BINDING);
        if(binding != null)
        {
            try {
                bindingQN = endpointEl.getQName(binding);
                endpoint.setBindingName(bindingQN);
            } catch (WSDLException e) {
                getErrorReporter().reportError(
                        new ErrorLocatorImpl()//TODO line&col nos.
                        "WSDL505",
                        new Object[] {binding, endpointEl.getQName()},
                        ErrorReporter.SEVERITY_ERROR);
            }
        }

        String address = endpointEl.getAttributeValue(Constants.ATTR_ADDRESS);

        if(address != null)
        {
            endpoint.setAddress(getURI(address));
        }

        parseExtensionAttributes(endpointEl, EndpointElement.class, endpoint, desc);

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

        XMLElement[] children = endpointEl.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, endpoint);
            }
            else
            {
                endpoint.addExtensionElement(
                        parseExtensionElement(EndpointElement.class, endpoint, tempEl, desc) );
            }
        }

        return endpoint;
View Full Code Here


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

            EndpointElement endPoint=endpoints[ind];
            if(endPoint!=null){

                pw.print("    <" + tagName);
                NCName ncName=endPoint.getName();
                if(ncName!=null){
                    String name=ncName.toString();
                    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();
                if (address != null){
                    DOMUtils.printAttribute(Constants.ATTR_ADDRESS,
                            address.toString(),
                            pw);
                }
                printExtensibilityAttributes(endPoint.getExtensionAttributes(), endPoint, pw);
                pw.println('>');
                printDocumentation(endPoint.getDocumentationElements(), des, pw);
                printExtensibilityElements(endPoint.getClass(), endPoint.getExtensionElements(), des, pw);
                pw.println("    </" + tagName + '>');
            }
        }
      }
View Full Code Here

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

            EndpointElement endPoint=endpoints[ind];
            if(endPoint!=null){

                pw.print("    <" + tagName);
                NCName ncName=endPoint.getName();
                if(ncName!=null){
                    String name=ncName.toString();
                    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();
                if (address != null){
                    OMUtils.printAttribute(Constants.ATTR_ADDRESS,
                            address.toString(),
                            pw);
                }


                printExtensibilityAttributes(endPoint.getExtensionAttributes(), endPoint, pw);
                pw.println('>');
                printDocumentation(endPoint.getDocumentationElements(), des, pw);
                printExtensibilityElements(endPoint.getClass(), endPoint.getExtensionElements(), des, pw);
                pw.println("    </" + tagName + '>');
            }
        }  
      }
View Full Code Here

     */
    public InterfaceFaultElement getInterfaceFaultElement()
    {
        InterfaceFaultElement fault = null;
        InterfaceOperationElement oper = (InterfaceOperationElement)getParentElement();
        InterfaceElement interfac = (InterfaceElement)oper.getParentElement();
        if (interfac != null) {
            InterfaceFault faultComp = ((Interface)interfac).getFromAllInterfaceFaults(fRef);
            if (faultComp != null) {
                fault = faultComp.toElement();
            }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.xml.InterfaceFaultReferenceElement#getInterfaceFaultElement()
     */
    public InterfaceFaultElement getInterfaceFaultElement()
    {
        InterfaceFaultElement fault = null;
        InterfaceOperationElement oper = (InterfaceOperationElement)getParentElement();
        InterfaceElement interfac = (InterfaceElement)oper.getParentElement();
        if (interfac != null) {
            InterfaceFault faultComp = ((Interface)interfac).getFromAllInterfaceFaults(fRef);
            if (faultComp != null) {
View Full Code Here

        QName elementQName = null;

        if (WSDL2Constants.NMTOKEN_ELEMENT.equals(messageContentModelName)) {
            ElementDeclaration elementDeclaration = messageReference.getElementDeclaration();
            if (elementDeclaration == null) {
                InterfaceMessageReferenceElement messageReferenceElement =
                        messageReference.toElement();
                QName qName = messageReferenceElement.getElement().getQName();
                throw new AxisFault("Unable to find element " + qName.toString() + " reffered to by operation " + axisOperation.getName().getLocalPart());
            }
            elementQName = elementDeclaration.getName();
        } else if (WSDL2Constants.NMTOKEN_ANY.equals(messageContentModelName)) {
            elementQName = Constants.XSD_ANY;
View Full Code Here

   
    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.xml.BindingMessageReferenceElement#getInterfaceMessageReferenceElement()
     */
    public InterfaceMessageReferenceElement getInterfaceMessageReferenceElement() {
        InterfaceMessageReferenceElement intMsgRef = null;
        BindingOperationElement bindOp = (BindingOperationElement)getParentElement();
        InterfaceOperationElement intOp = bindOp.getInterfaceOperationElement();
        if(intOp != null)
        {
            //Determine the "effective" msg label for this binding msg ref.
View Full Code Here

     * @see org.apache.woden.wsdl20.xml.BindingMessageReferenceElement#getInterfaceMessageReferenceElement()
     */
    public InterfaceMessageReferenceElement getInterfaceMessageReferenceElement() {
        InterfaceMessageReferenceElement intMsgRef = null;
        BindingOperationElement bindOp = (BindingOperationElement)getParentElement();
        InterfaceOperationElement intOp = bindOp.getInterfaceOperationElement();
        if(intOp != null)
        {
            //Determine the "effective" msg label for this binding msg ref.
            NCName effectiveMsgLabel = null;
            if(fMessageLabel != null)
            {
                effectiveMsgLabel = fMessageLabel;
            }
            else
            {
                //TODO: implement placeholder effective msg label, as per Part 1 of spec section 2.10.3
            }
           
            //Now match the effective msg label against the msg label of an interface msg reference.
            if(effectiveMsgLabel != null)
            {
                InterfaceMessageReferenceElement[] intMsgRefs = intOp.getInterfaceMessageReferenceElements();
                for(int i=0; i<intMsgRefs.length; i++)
                {
                    if( effectiveMsgLabel.equals(intMsgRefs[i].getMessageLabel()) )
                    {
                        intMsgRef = intMsgRefs[i];
View Full Code Here

            // }
            //
            // }

            DescriptionElement descriptionElement = description.toElement();
            TypesElement typesElement = descriptionElement
                    .getTypesElement();
            if (typesElement != null) {
                Schema[] schemas = typesElement.getSchemas();
                for (int i = 0; i < schemas.length; i++) {
                    XmlSchema schemaDefinition = schemas[i].getSchemaDefinition();

                    // WSDL 2.0 spec requires that even the built-in schema should be returned
                    // once asked for schema definitions. But for data binding purposes we can ignore that
View Full Code Here

        XmlSchemaElement xse = null;
        if(fElement != null && fElement.isQName()) {
            InterfaceOperationElement oper = (InterfaceOperationElement)getParentElement();
            InterfaceElement interfac = (InterfaceElement)oper.getParentElement();
            DescriptionElement desc = (DescriptionElement)interfac.getParentElement();
            TypesElement types = desc.getTypesElement();
            if(types != null) {
                xse = ((TypesImpl)types).getElementDeclaration(fElement.getQName());
            }
        }
        return xse;
View Full Code Here

TOP

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

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.