Package org.apache.woden.wsdl20.xml

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


            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
        namespacemap = descriptionElement.getDeclaredNamespaces();
        this.description = description;
        this.serviceName = null;
        if (name != null) {
            serviceName = new QName(descriptionElement.getTargetNamespace().toString(), name);
        }
        this.interfaceName = interfaceName;
        this.axisService = new AxisService();
        setPolicyRegistryFromService(axisService);
    }
View Full Code Here


            // null));
            // }
            //
            // }

            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();
View Full Code Here

        }
        try {
            if (description == null) {

                Description description;
                DescriptionElement descriptionElement;
                if (wsdlURI != null && !"".equals(wsdlURI)) {
                    description = readInTheWSDLFile(wsdlURI);
                    descriptionElement = description.toElement();
                } else if (in != null) {
                    description = readInTheWSDLFile(in);
                    descriptionElement = description.toElement();
                } else {
                    throw new AxisFault("No resources found to read the wsdl");
                }

                savedTargetNamespace = descriptionElement.getTargetNamespace().toString();
                namespacemap = descriptionElement.getDeclaredNamespaces();
                this.description = description;

            }
            // Create the namespacemap
View Full Code Here

     */
    private void addDocumentation(AxisDescription axisDescription, DocumentableElement element) {
        DocumentationElement[] documentationElements = element.getDocumentationElements();
        String documentation = "";
        for (int i = 0; i < documentationElements.length; i++) {
            DocumentationElement documentationElement = documentationElements[i];
            XMLElement contentElement = documentationElement.getContent();
            Element content = (Element)contentElement.getSource();
            if (content != null) {
                documentation = documentation + DOM2Writer.nodeToString(content.getFirstChild());
            }
        }
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

            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

  {
  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

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.xml.BindingFaultElement#getInterfaceFaultElement()
     */
    public InterfaceFaultElement getInterfaceFaultElement()
    {
        InterfaceFaultElement fault = null;
        BindingElement binding = (BindingElement)getParentElement();
        InterfaceElement interfac = binding.getInterfaceElement();
        if(interfac != null) {
            InterfaceFault faultComp = ((Interface)interfac).getFromAllInterfaceFaults(fRef);
            if (faultComp != null) {
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.