Package org.apache.woden.wsdl20.xml

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


            if (interfaceFault == null) {
                throw new AxisFault("Interface Fault reference defined in operation " + opName + " cannot be found in interface");
            }
           
            // retrieve interface fault element
            InterfaceFaultElement interfaceFaultElement = interfaceFault.toElement();
            // drill down to get actual interface fault element definition
            QNameTokenUnion interfaceFaultElementDef = interfaceFaultElement.getElement();
            QName qName = interfaceFaultElementDef.getQName();
            String name = qName.getLocalPart();
           
            faultMessage.setElementQName(qName);
            faultMessage.setName(name);
View Full Code Here


  {
  boolean isValid = true;
  int numFaultElements = faultElements.length;
  for(int j = 0; j < numFaultElements; j++)
  {
    InterfaceFaultElement faultElement = faultElements[j];
    if(!testAssertionSchema1066(descElement, faultElement.getElement().getQName(), errorReporter))
      isValid = false;
   
  return isValid;
  }
View Full Code Here

  protected boolean testAssertionQNameResolution1064ForInterfaceFaultReference(InterfaceFaultReferenceElement faultReference, ErrorReporter errorReporter) throws WSDLException
  {
  QName ref = faultReference.getRef();
  if(ref != null)
  {
    InterfaceFaultElement fault = faultReference.getInterfaceFaultElement();
    if(fault == null)
    {
      errorReporter.reportError(new ErrorLocatorImpl(),
              "QName-resolution-1064",
              new Object[]{ref.toString(), "interface fault reference", "interface fault"},
View Full Code Here

    /*
     * @see org.apache.woden.wsdl20.xml.InterfaceElement#getInterfaceFaultElement(javax.xml.namespace.QName)
     */
    public InterfaceFaultElement getInterfaceFaultElement(QName faultName)
    {
        InterfaceFaultElement fault = null;
       
        if(faultName != null)
        {
            InterfaceFaultElement tempFault = null;
            for(Iterator i=fInterfaceFaultElements.iterator(); i.hasNext(); )
            {
                tempFault = (InterfaceFaultElement)i.next();
                if(faultName.equals(tempFault.getName()))
                {
                    fault = tempFault;
                    break;
                }
            }
View Full Code Here

            XMLElement faultEl,
            DescriptionElement desc,
            InterfaceElement parent)
            throws WSDLException {

        InterfaceFaultElement fault = parent.addInterfaceFaultElement();

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

        String element = faultEl.getAttributeValue(Constants.ATTR_ELEMENT);
        if(element != null)
        {
            if(element.equals(Constants.NMTOKEN_ANY)) {
                fault.setElement(QNameTokenUnion.ANY);
            } else if(element.equals(Constants.NMTOKEN_NONE)) {
                fault.setElement(QNameTokenUnion.NONE);
            } else if(element.equals(Constants.NMTOKEN_OTHER)) {
                fault.setElement(QNameTokenUnion.OTHER);
            } else {
                //It is not one of the allowed xs:Token values, so it must be an xs:QName
                try {
                    QName qname = faultEl.getQName(element);
                    fault.setElement(new QNameTokenUnion(qname));
                } catch (WSDLException e) {
                    getErrorReporter().reportError(
                            new ErrorLocatorImpl()//TODO line&col nos.
                            "WSDL505",
                            new Object[] {element, faultEl.getQName()},
                            ErrorReporter.SEVERITY_ERROR);
                }
            }
        }

        parseExtensionAttributes(faultEl, InterfaceFaultElement.class, fault, desc);

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

        return fault;
View Full Code Here

                                                        DescriptionElement des,
                                                        PrintWriter pw)
                                                        throws WSDLException{
        for(int ind=0;ind<faulEles.length;ind++){

          InterfaceFaultElement faulEle=faulEles[ind];
            if(faulEle!=null){

                String tagName =null;
               
                    tagName=DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                            Constants.ELEM_FAULT,
                            faulEle);
              

               

                pw.print("      <" + tagName);
               
                String attrName=faulEle.getName().getLocalPart();                  
                DOMUtils.printAttribute(Constants.ATTR_NAME, attrName, pw);
                //TODO check here - returns  QNameTokenUnion but only take QName
                QName attrElement=faulEle.getElement().getQName();
                String attrEle=
                    DOMUtils.getQualifiedValue(faulEle.getNamespaceURI(attrElement.getPrefix()).toString(),
                        attrElement.getLocalPart(),
                        faulEle);
                DOMUtils.printAttribute(Constants.ATTR_ELEMENT, attrEle, pw);
               
                printExtensibilityAttributes(faulEle.getExtensionAttributes(), faulEle, pw);
                pw.println('>');
                printDocumentation(faulEle.getDocumentationElements(), des, pw);
                printExtensibilityElements(faulEle.getClass(), faulEle.getExtensionElements(), des, pw);
                pw.println("    </" + tagName + '>');
            }


View Full Code Here

                                                        DescriptionElement des,
                                                        PrintWriter pw)
                                                        throws WSDLException{
        for(int ind=0;ind<faulEles.length;ind++){

          InterfaceFaultElement faulEle=faulEles[ind];
            if(faulEle!=null){

                String tagName =null;
               
                    tagName=OMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                            Constants.ELEM_FAULT,
                            faulEle);
              

               

                pw.print("      <" + tagName);

               
                String attrName=faulEle.getName().getLocalPart();                  
                OMUtils.printAttribute(Constants.ATTR_NAME, attrName, pw);
                //TODO check here - returns  QNameTokenUnion but only take QName
                QName attrElement=faulEle.getElement().getQName();
                String attrEle=
                    OMUtils.getQualifiedValue(faulEle.getNamespaceURI(attrElement.getPrefix()).toString(),
                        attrElement.getLocalPart(),
                        faulEle);
                OMUtils.printAttribute(Constants.ATTR_ELEMENT, attrEle, pw);


                printExtensibilityAttributes(faulEle.getExtensionAttributes(), faulEle, pw);
                pw.println('>');
                printDocumentation(faulEle.getDocumentationElements(), des, pw);
                printExtensibilityElements(faulEle.getClass(), faulEle.getExtensionElements(), des, pw);
                pw.println("    </" + tagName + '>');
            }


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

            // }
            //
            // }

            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.InterfaceFaultElement

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.