Author: jkaputin
Date: Fri Oct 20 08:53:05 2006
New Revision: 466156

URL: http://svn.apache.org/viewvc?view=rev&rev=466156
Log:
Deleted the refactored methods that were previously
commented out in OMWSDLReader.

Modified:
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMWSDLReader.java

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMWSDLReader.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMWSDLReader.java?view=diff&rev=466156&r1=466155&r2=466156
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMWSDLReader.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMWSDLReader.java
 Fri Oct 20 08:53:05 2006
@@ -82,874 +82,6 @@
         return parseDescription(url.toString(), descEl, null);
     }
 
-    /*
-    private DescriptionElement parseDescription(String documentBaseURI,
-                                                OMElement omDescription,
-                                                Map wsdlModules)
-                                                throws WSDLException {
-
-        checkElementName(omDescription,Constants.Q_ELEM_DESCRIPTION);
-
-        //Get the description element that the components to be assigned to
-        DescriptionElement desc = getFactory().newDescription();
-
-        if(wsdlModules == null){
-            //This is the initial WSDL document. No imports or includes yet.
-            //TODO this might be the place to flag the initial Desc if 
necessary.
-            wsdlModules = new HashMap();
-        }
-
-        if(getExtensionRegistry() != null){
-            desc.setExtensionRegistry(getExtensionRegistry());
-        }
-        if(getErrorReporter() != null){
-            (desc.getExtensionRegistry()).setErrorReporter(getErrorReporter());
-        }
-
-        desc.setDocumentBaseURI(getURI(documentBaseURI));
-
-        //Set the target namespace
-        String targetNamespace = OMUtils.getAttribute(omDescription, 
Constants.ATTR_TARGET_NAMESPACE);
-        if(targetNamespace != null){
-            desc.setTargetNamespace(getURI(targetNamespace));
-        }
-
-        //Parse namespace declarations
-        Iterator namespaces = omDescription.getAllDeclaredNamespaces();
-        while(namespaces.hasNext()){
-            OMNamespace namespace = (OMNamespace)namespaces.next();
-            String localPart = namespace.getPrefix();
-            String value = namespace.getNamespaceURI();
-
-          if (!(Constants.ATTR_XMLNS).equals(localPart)){
-            desc.addNamespace(localPart, getURI(value));  //a prefixed 
namespace
-          }
-          else{
-            desc.addNamespace(null, getURI(value));       //the default 
namespace
-          }
-        }
-
-        //todo - XMLAttr have to be fixed by removing the DOM dependencies
-        parseExtensionAttributes(omDescription, DescriptionElement.class, 
desc, desc);
-
-        //Parse the child elements found in the WSDL Description
-        Iterator wsdlComponents = omDescription.getChildElements();
-        while (wsdlComponents.hasNext()){
-            OMElement wsdlComponent = ((OMElement)wsdlComponents.next());
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
wsdlComponent)){
-                parseDocumentation(wsdlComponent, desc, desc);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_TYPES, 
wsdlComponent)){
-                parseTypes(wsdlComponent, desc);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_INTERFACE, 
wsdlComponent)){
-                parseInterface(wsdlComponent, desc);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_BINDING, 
wsdlComponent)){
-                parseBinding(wsdlComponent, desc);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_SERVICE, 
wsdlComponent)){
-                parseService(wsdlComponent, desc);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_IMPORT, 
wsdlComponent)){
-                if(documentBaseURI != null && 
!wsdlModules.containsKey(documentBaseURI)){
-                    wsdlModules.put(documentBaseURI, desc);
-                }
-                parseImport(wsdlComponent, desc, wsdlModules);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_INCLUDE, 
wsdlComponent)){
-                if(documentBaseURI != null && 
!wsdlModules.containsKey(documentBaseURI)){
-                    wsdlModules.put(documentBaseURI, desc);
-                }
-                parseInclude(wsdlComponent, desc, wsdlModules);
-            }
-            else{
-                
desc.addExtensionElement(parseExtensionElement(DescriptionElement.class, desc, 
wsdlComponent, desc) );
-            }
-        }
-
-        // TODO: Parse the schema for schema to include the built in schema 
types from the spec in the Woden model.
-
-        return desc;
-    }
-    */
-
-   /*
-   private DocumentationElement parseDocumentation(OMElement docEl,
-                                                    DescriptionElement desc,
-                                                    DocumentableElement parent)
-                                                    throws WSDLException {
-
-        DocumentationElement documentation = parent.addDocumentationElement();
-
-        //Stores the documentation values as a string
-        documentation.setContent(docEl.getText());
-
-        //Now parse any extensibility attributes or elements
-        parseExtensionAttributes(docEl, DocumentationElement.class, 
documentation, desc);
-
-        //And then any child elements
-        Iterator docElChildren = docEl.getChildElements();
-        while (docElChildren.hasNext()){
-            OMElement docChildElement = (OMElement)docElChildren.next();
-            documentation.addExtensionElement(parseExtensionElement(
-                    DocumentationElement.class, documentation, 
docChildElement, desc) );
-        }
-        return documentation;
-    }
-    */
-
-   /*
-   private TypesElement parseTypes(OMElement typesEl,
-                                    DescriptionElement desc)
-                                    throws WSDLException {
-
-        TypesElement types = desc.getTypesElement();
-
-        //TODO for now set to W3 XML Schema. Later, add support for non-XML 
Schema type systems
-        types.setTypeSystem(Constants.TYPE_XSD_2001);
-
-        parseExtensionAttributes(typesEl, TypesElement.class, types, desc);
-
-        //Get the first element within the types (which is xs:schema)
-        //TODO validate
-        OMElement typesChildElement = typesEl.getFirstElement();
-
-        if (typesChildElement != null) {
-            QName elementType = OMQNameUtils.newQName(typesChildElement);
-
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
typesChildElement)){
-                parseDocumentation(typesChildElement, desc, types);
-            }
-            else if 
(SchemaConstants.XSD_IMPORT_QNAME_LIST.contains(typesChildElement)){
-                types.addSchema(parseSchemaImport(typesChildElement, desc));
-            }
-            else if 
(SchemaConstants.XSD_SCHEMA_QNAME_LIST.contains(elementType)){
-                types.addSchema(parseSchemaInline(typesChildElement, desc));
-            }
-            else {
-                types.addExtensionElement(parseExtensionElement(
-                        TypesElement.class, types, typesChildElement, desc) );
-            }
-        }
-        return types;
-    }
-    */
-
-   /*
-   private ServiceElement parseService(OMElement serviceEl,
-                                       DescriptionElement desc)
-                                       throws WSDLException{
-
-        ServiceElement service = desc.addServiceElement();
-
-        String name = OMUtils.getAttribute(serviceEl, Constants.ATTR_NAME);
-        if(name != null){
-            service.setName(new NCName(name));
-        }
-
-        QName intfaceQN;
-        String intface = OMUtils.getAttribute(serviceEl, 
Constants.ATTR_INTERFACE);
-        if(intface != null){
-            try{
-                intfaceQN = OMUtils.getQName(intface, serviceEl);
-                service.setInterfaceName(intfaceQN);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),
-                        "WSDL505",
-                        serviceEl.getLocalName(),
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        parseExtensionAttributes(serviceEl, ServiceElement.class, service, 
desc);
-
-        // Parse the child elements of <service>.
-        Iterator serviceElChildren = serviceEl.getChildElements();
-        while (serviceElChildren.hasNext()){
-            OMElement serviceElChild = (OMElement)serviceElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
serviceElChild)){
-                parseDocumentation(serviceElChild, desc, service);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_ENDPOINT, 
serviceElChild)){
-                parseEndpoint(serviceElChild, desc, service);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
serviceElChild)){
-                parseFeature(serviceElChild, desc, service);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
serviceElChild)){
-                parseProperty(serviceElChild, desc, service);
-            }
-            else{
-                
service.addExtensionElement(parseExtensionElement(ServiceElement.class, 
service, serviceElChild, desc) );
-            }
-        }
-        return service;
-    }
-    */
-
-   /*
-   private EndpointElement parseEndpoint(OMElement endpointEl,
-                                          DescriptionElement desc,
-                                          ServiceElement parent)
-                                          throws WSDLException{
-
-        EndpointElement endpoint = parent.addEndpointElement();
-        endpoint.setParentElement(parent);
-
-        String name = OMUtils.getAttribute(endpointEl, Constants.ATTR_NAME);
-        if(name != null){
-            NCName ncname = new NCName(name);
-            endpoint.setName(ncname);
-        }
-
-        QName bindingQN;
-        String binding = OMUtils.getAttribute(endpointEl, 
Constants.ATTR_BINDING);
-        if(binding != null){
-            try{
-                bindingQN = OMUtils.getQName(binding, endpointEl);
-                endpoint.setBindingName(bindingQN);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),
-                        "WSDL505",
-                        new Object[] {binding, 
OMQNameUtils.newQName(endpointEl)},
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        String address = OMUtils.getAttribute(endpointEl, 
Constants.ATTR_ADDRESS);
-        if(address != null){
-            endpoint.setAddress(getURI(address));
-        }
-
-        parseExtensionAttributes(endpointEl, EndpointElement.class, endpoint, 
desc);
-
-        // Parse the child elements of <endpoint>
-        Iterator endpointElChildren = endpointEl.getChildElements();
-        while (endpointElChildren.hasNext()){
-            OMElement endpointElChild = (OMElement)endpointElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
endpointElChild)){
-                parseDocumentation(endpointElChild, desc, endpoint);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
endpointElChild)){
-                parseFeature(endpointElChild, desc, endpoint);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
endpointElChild)){
-                parseProperty(endpointElChild, desc, endpoint);
-            }
-            else{
-                endpoint.addExtensionElement(
-                    parseExtensionElement(ServiceElement.class, endpoint, 
endpointElChild, desc) );
-            }
-        }
-        return endpoint;
-    }
-    */
-
-    /*
-    private BindingElement parseBinding(OMElement bindEl,
-                                        DescriptionElement desc)
-                                        throws WSDLException{
-
-        BindingElement binding = desc.addBindingElement();
-
-        String name = OMUtils.getAttribute(bindEl, Constants.ATTR_NAME);
-        if(name != null){
-            binding.setName(new NCName(name));
-        }
-
-        QName intfaceQN = null;
-        String intface = OMUtils.getAttribute(bindEl, 
Constants.ATTR_INTERFACE);
-        if(intface != null){
-            try{
-                intfaceQN = OMUtils.getQName(intface, bindEl);
-                binding.setInterfaceName(intfaceQN);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                    new ErrorLocatorImpl(),
-                    "WSDL505",
-                    new Object[] {intface, OMQNameUtils.newQName(bindEl)},
-                    ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        String type = OMUtils.getAttribute(bindEl, Constants.ATTR_TYPE);
-        if(type != null) {
-            binding.setType(getURI(type));
-        }
-
-        parseExtensionAttributes(bindEl, BindingElement.class, binding, desc);
-
-        // Parse the child elements of <binding>.
-        Iterator bindElChildren = bindEl.getChildElements();
-        while (bindElChildren.hasNext()){
-            OMElement bindElChild = (OMElement)bindElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
bindElChild)){
-                parseDocumentation(bindElChild, desc, binding);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FAULT, 
bindElChild)){
-                parseBindingFault(bindElChild, desc, binding);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_OPERATION, 
bindElChild)){
-                parseBindingOperation(bindElChild, desc, binding);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
bindElChild)){
-                parseFeature(bindElChild, desc, binding);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
bindElChild)){
-                parseProperty(bindElChild, desc, binding);
-            }
-            else{
-                
binding.addExtensionElement(parseExtensionElement(BindingElement.class, 
binding, bindElChild, desc) );
-            }
-        }
-        return binding;
-    }
-    */
-
-    /*
-    private BindingOperationElement parseBindingOperation(OMElement bindOpEl,
-                                                          DescriptionElement 
desc,
-                                                          BindingElement 
parent)
-                                                          throws WSDLException{
-
-        BindingOperationElement oper = parent.addBindingOperationElement();
-        oper.setParentElement(parent);
-
-        QName refQN = null;
-        String ref = OMUtils.getAttribute(bindOpEl, Constants.ATTR_REF);
-        if(ref != null){
-            try{
-                refQN = OMUtils.getQName(ref, bindOpEl);
-                oper.setRef(refQN);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),
-                        "WSDL505",
-                        new Object[] {ref, OMQNameUtils.newQName(bindOpEl)},
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        parseExtensionAttributes(bindOpEl, BindingOperationElement.class, 
oper, desc);
-
-        // Parse the child elements of binding <operation>.
-        Iterator bindOpElChildren = bindOpEl.getChildElements();
-        while (bindOpElChildren.hasNext()){
-            OMElement bindOpElChild = (OMElement)bindOpElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
bindOpElChild)){
-                parseDocumentation(bindOpElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
bindOpElChild)){
-                parseFeature(bindOpElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
bindOpElChild)){
-                parseProperty(bindOpElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_INPUT, 
bindOpElChild)){
-                parseBindingMessageReference(bindOpElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_OUTPUT, 
bindOpElChild)){
-                parseBindingMessageReference(bindOpElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_INFAULT, 
bindOpElChild)){
-                parseBindingFaultReference(bindOpElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_OUTFAULT, 
bindOpElChild)){
-                parseBindingFaultReference(bindOpElChild, desc, oper);
-            }
-            else{
-                oper.addExtensionElement(
-                    parseExtensionElement(BindingOperationElement.class, oper, 
bindOpElChild, desc) );
-            }
-        }
-        return oper;
-    }
-    */
-
-    /*
-    private BindingFaultReferenceElement parseBindingFaultReference(
-                                                  OMElement faultRefEl,
-                                                  DescriptionElement desc,
-                                                  BindingOperationElement 
parent)
-                                                  throws WSDLException{
-
-        BindingFaultReferenceElement faultRef = 
parent.addBindingFaultReferenceElement();
-        faultRef.setParentElement(parent);
-
-        QName refQN = null;
-        String ref = OMUtils.getAttribute(faultRefEl, Constants.ATTR_REF);
-        if(ref != null){
-            try{
-                refQN = OMUtils.getQName(ref, faultRefEl);
-                faultRef.setRef(refQN);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),
-                        "WSDL505",
-                        new Object[] {ref, OMQNameUtils.newQName(faultRefEl)},
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        String msgLabel = OMUtils.getAttribute(faultRefEl, 
Constants.ATTR_MESSAGE_LABEL);
-        if(msgLabel != null){
-            faultRef.setMessageLabel(new NCName(msgLabel));
-        }
-
-        parseExtensionAttributes(faultRefEl, 
BindingFaultReferenceElement.class, faultRef, desc);
-
-        // Parse the child elements of binding operation <infault> or 
<outfault>.
-        Iterator faultRefElChildren = faultRefEl.getChildElements();
-        while (faultRefElChildren.hasNext()){
-            OMElement faultRefChild = (OMElement)faultRefElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
faultRefChild)){
-                parseDocumentation(faultRefChild, desc, faultRef);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
faultRefChild)){
-                parseFeature(faultRefChild, desc, faultRef);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
faultRefChild)){
-                parseProperty(faultRefChild, desc, faultRef);
-            }
-            else{
-                
faultRef.addExtensionElement(parseExtensionElement(BindingFaultReferenceElement.class,
 faultRef, faultRefChild, desc) );
-            }
-        }
-        return faultRef;
-    }
-    */
-
-    /*
-    private BindingMessageReferenceElement parseBindingMessageReference(
-                                                 OMElement msgRefEl,
-                                                 DescriptionElement desc,
-                                                 BindingOperationElement 
parent)
-                                                 throws WSDLException {
-
-        BindingMessageReferenceElement message = 
parent.addBindingMessageReferenceElement();
-        message.setParentElement(parent);
-
-        if(Constants.ELEM_INPUT.equals(msgRefEl.getLocalName())) {
-            message.setDirection(Direction.IN);
-        }
-        else if(Constants.ELEM_OUTPUT.equals(msgRefEl.getLocalName())) {
-            message.setDirection(Direction.OUT);
-        }
-
-        String msgLabel = OMUtils.getAttribute(msgRefEl, 
Constants.ATTR_MESSAGE_LABEL);
-        if(msgLabel != null){
-            message.setMessageLabel(new NCName(msgLabel));
-        }
-        else{
-            //TODO this is a temp fix, correct action to use MEP to determine 
default
-            if(message.getDirection().equals(Direction.IN)){
-                message.setMessageLabel(MessageLabel.IN);
-            }
-            else{
-                message.setMessageLabel(MessageLabel.OUT);
-            }
-        }
-
-        parseExtensionAttributes(msgRefEl, 
BindingMessageReferenceElement.class, message, desc);
-
-        // Parse the child elements of binding operation <input> or <output>.
-        Iterator msgRefElChildren = msgRefEl.getChildElements();
-        while (msgRefElChildren.hasNext()){
-            OMElement msgRefChild = (OMElement)msgRefElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
msgRefChild)){
-                parseDocumentation(msgRefChild, desc, message);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
msgRefChild)){
-                parseFeature(msgRefChild, desc, message);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
msgRefChild)){
-                parseProperty(msgRefChild, desc, message);
-            }
-            else{
-                
message.addExtensionElement(parseExtensionElement(BindingMessageReferenceElement.class,
 message, msgRefChild, desc) );
-            }
-        }
-        return message;
-    }
-    */
-
-    /*
-    private BindingFaultElement parseBindingFault(OMElement bindFaultEl,
-                                                  DescriptionElement desc,
-                                                  BindingElement parent)
-                                                  throws WSDLException{
-
-        BindingFaultElement fault = parent.addBindingFaultElement();
-        fault.setParentElement(parent);
-
-        QName intFltQN = null;
-        String ref = OMUtils.getAttribute(bindFaultEl, Constants.ATTR_REF);
-        if(ref != null){
-            try{
-                intFltQN = OMUtils.getQName(ref, bindFaultEl);
-                fault.setRef(intFltQN);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),
-                        "WSDL505",
-                        new Object[] {ref, OMQNameUtils.newQName(bindFaultEl)},
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        parseExtensionAttributes(bindFaultEl, BindingFaultElement.class, 
fault, desc);
-
-        // Parse the child elements of binding <fault>.
-        Iterator bindFaultElChildren = bindFaultEl.getChildElements();
-        while (bindFaultElChildren.hasNext()){
-            OMElement bindFaultChild = (OMElement)bindFaultElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
bindFaultChild)){
-                parseDocumentation(bindFaultChild, desc, fault);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
bindFaultChild)){
-                parseFeature(bindFaultChild, desc, fault);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
bindFaultChild)){
-                parseProperty(bindFaultChild, desc, fault);
-            }
-            else{
-                
fault.addExtensionElement(parseExtensionElement(BindingFaultElement.class, 
fault, bindFaultChild, desc) );
-            }
-        }
-        return fault;
-    }
-    */
-
-    /*
-    private InterfaceElement parseInterface(OMElement interfaceEl,
-                                            DescriptionElement desc)
-                                            throws WSDLException {
-
-        InterfaceElement intface = desc.addInterfaceElement();
-        String name = OMUtils.getAttribute(interfaceEl, Constants.ATTR_NAME);
-        if(name != null){
-            intface.setName(new NCName(name));
-        }
-        String styleDefault = OMUtils.getAttribute(interfaceEl, 
Constants.ATTR_STYLE_DEFAULT);
-        if(styleDefault != null){
-            List stringList = StringUtils.parseNMTokens(styleDefault);
-            String uriString = null;
-            Iterator it = stringList.iterator();
-            while(it.hasNext()){
-                uriString = (String)it.next();
-                intface.addStyleDefaultURI(getURI(uriString));
-            }
-        }
-
-        String extendsAttr = OMUtils.getAttribute(interfaceEl, 
Constants.ATTR_EXTENDS);
-        if(extendsAttr != null){
-            List stringList = StringUtils.parseNMTokens(extendsAttr);
-            String qnString = null;
-            Iterator it = stringList.iterator();
-            while(it.hasNext()){
-                qnString = (String)it.next();
-                intface.addExtendedInterfaceName(OMUtils.getQName(qnString, 
interfaceEl));
-            }
-        }
-
-        parseExtensionAttributes(interfaceEl, InterfaceElement.class, intface, 
desc);
-
-        // Parse the child elements of <interface>.
-        Iterator interfaceChildren = interfaceEl.getChildElements();
-        while (interfaceChildren.hasNext()){
-            OMElement interfaceChild = (OMElement)interfaceChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
interfaceChild)){
-                parseDocumentation(interfaceChild, desc, intface);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FAULT, 
interfaceChild)){
-                parseInterfaceFault(interfaceChild, desc, intface);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_OPERATION, 
interfaceChild)){
-                parseInterfaceOperation(interfaceChild, desc, intface);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
interfaceChild)){
-                parseFeature(interfaceChild, desc, intface);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
interfaceChild)){
-                parseProperty(interfaceChild, desc, intface);
-            }
-            else{
-                intface.addExtensionElement(
-                    parseExtensionElement(InterfaceElement.class, intface, 
interfaceChild, desc) );
-            }
-        }
-        return intface;
-    }
-    */
-
-    /*
-    private InterfaceOperationElement parseInterfaceOperation(
-                                                 OMElement operEl,
-                                                 DescriptionElement desc,
-                                                 InterfaceElement parent)
-                                                 throws WSDLException{
-
-        InterfaceOperationElement oper = parent.addInterfaceOperationElement();
-        oper.setParentElement(parent);
-
-        String name = OMUtils.getAttribute(operEl, Constants.ATTR_NAME);
-        if(name != null){
-            oper.setName(new NCName(name));
-        }
-
-        String style = OMUtils.getAttribute(operEl, Constants.ATTR_STYLE);
-        if(style != null){
-            List stringList = StringUtils.parseNMTokens(style);
-            String uriString = null;
-            Iterator it = stringList.iterator();
-            while(it.hasNext()){
-                uriString = (String)it.next();
-                oper.addStyleURI(getURI(uriString));
-            }
-        }
-
-        String pat = OMUtils.getAttribute(operEl, Constants.ATTR_PATTERN);
-        if(pat != null){
-            oper.setPattern(getURI(pat));
-        }
-
-        parseExtensionAttributes(operEl, InterfaceOperationElement.class, 
oper, desc);
-
-        // Parse the child elements of interface <operation>.
-        Iterator operElChildren = operEl.getChildElements();
-        while (operElChildren.hasNext()){
-            OMElement operElChild = (OMElement)operElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
operElChild)){
-                parseDocumentation(operElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
operElChild)){
-                parseFeature(operElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
operElChild)){
-                parseProperty(operElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_INPUT, 
operElChild)){
-                parseInterfaceMessageReference(operElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_OUTPUT, 
operElChild)){
-                parseInterfaceMessageReference(operElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_INFAULT, 
operElChild)){
-                parseInterfaceFaultReference(operElChild, desc, oper);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_OUTFAULT, 
operElChild)){
-                parseInterfaceFaultReference(operElChild, desc, oper);
-            }
-            else{
-                oper.addExtensionElement(
-                    parseExtensionElement(InterfaceOperationElement.class, 
oper, operElChild, desc) );
-            }
-        }
-        return oper;
-    }
-    */
-
-    /*
-    private InterfaceFaultReferenceElement parseInterfaceFaultReference(
-                                                 OMElement faultRefEl,
-                                                 DescriptionElement desc,
-                                                 InterfaceOperationElement 
parent)
-                                                 throws WSDLException{
-
-        InterfaceFaultReferenceElement faultRef = 
parent.addInterfaceFaultReferenceElement();
-        faultRef.setParentElement(parent);
-
-        if(Constants.ELEM_INFAULT.equals(faultRefEl.getLocalName())) {
-            faultRef.setDirection(Direction.IN);
-        }
-        else if(Constants.ELEM_OUTFAULT.equals(faultRefEl.getLocalName())){
-            faultRef.setDirection(Direction.OUT);
-        }
-
-        String ref = OMUtils.getAttribute(faultRefEl, Constants.ATTR_REF);
-        if(ref != null){
-            try{
-                QName qname = OMUtils.getQName(ref, faultRefEl);
-                faultRef.setRef(qname);
-            }
-            catch(WSDLException e){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),
-                        "WSDL505",
-                        new Object[] {ref, OMQNameUtils.newQName(faultRefEl)},
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        String msgLabel = OMUtils.getAttribute(faultRefEl, 
Constants.ATTR_MESSAGE_LABEL);
-        if(msgLabel != null){
-            faultRef.setMessageLabel(new NCName(msgLabel));
-        }
-
-        parseExtensionAttributes(faultRefEl, 
InterfaceFaultReferenceElement.class, faultRef, desc);
-
-        Iterator faultRefElChildren = faultRefEl.getChildElements();
-
-        while (faultRefElChildren.hasNext()){
-            OMElement faultRefElChild = (OMElement)faultRefElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
faultRefElChild)){
-                parseDocumentation(faultRefElChild, desc, faultRef);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
faultRefElChild)){
-                parseFeature(faultRefElChild, desc, faultRef);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
faultRefElChild)){
-                parseProperty(faultRefElChild, desc, faultRef);
-            }
-            else{
-                faultRef.addExtensionElement(
-                    
parseExtensionElement(InterfaceFaultReferenceElement.class, faultRef, 
faultRefElChild, desc) );
-            }
-        }
-        return faultRef;
-    }
-    */
-
-    /*
-    private InterfaceMessageReferenceElement parseInterfaceMessageReference(
-                                                 OMElement msgRefEl,
-                                                 DescriptionElement desc,
-                                                 InterfaceOperationElement 
parent)
-                                                 throws WSDLException{
-
-        InterfaceMessageReferenceElement message = 
parent.addInterfaceMessageReferenceElement();
-        message.setParentElement(parent);
-
-        if(Constants.ELEM_INPUT.equals(msgRefEl.getLocalName())) {
-            message.setDirection(Direction.IN);
-        }
-        else if(Constants.ELEM_OUTPUT.equals(msgRefEl.getLocalName())) {
-            message.setDirection(Direction.OUT);
-        }
-
-        String msgLabel = OMUtils.getAttribute(msgRefEl, 
Constants.ATTR_MESSAGE_LABEL);
-        if(msgLabel != null){
-            message.setMessageLabel(new NCName(msgLabel));
-        }
-        else{
-            //TODO this is a temp fix, correct action to use MEP to determine 
default
-            if(message.getDirection().equals(Direction.IN)){
-                message.setMessageLabel(MessageLabel.IN);
-            }
-            else{
-                message.setMessageLabel(MessageLabel.OUT);
-            }
-        }
-
-        String element = OMUtils.getAttribute(msgRefEl, 
Constants.ATTR_ELEMENT);
-        if(element != null){
-            if(element.equals(Constants.NMTOKEN_ANY) ||
-               element.equals(Constants.NMTOKEN_NONE) ||
-               element.equals(Constants.NMTOKEN_OTHER)){
-                message.setMessageContentModel(element);
-            }
-            else{
-                //element is not #any, #none or #other, so it must be an 
element qname
-                message.setMessageContentModel(Constants.NMTOKEN_ELEMENT);
-                QName qname = OMUtils.getQName(element, msgRefEl);
-                message.setElementName(qname);
-            }
-        }
-        else{
-            //Per mapping defined in WSDL 2.0 Part 2 spec section 2.5.3,
-            //if element attribute not present, message content model is #other
-            message.setMessageContentModel(Constants.NMTOKEN_OTHER);
-        }
-
-        parseExtensionAttributes(msgRefEl, 
InterfaceMessageReferenceElement.class, message, desc);
-
-        Iterator msgRefElChildren = msgRefEl.getChildElements();
-
-        while(msgRefElChildren.hasNext()){
-            OMElement msgRefChild = (OMElement)msgRefElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
msgRefChild)){
-                parseDocumentation(msgRefChild, desc, message);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
msgRefChild)){
-                parseFeature(msgRefChild, desc, message);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
msgRefChild)){
-                parseProperty(msgRefChild, desc, message);
-            }
-            else{
-                message.addExtensionElement(
-                    
parseExtensionElement(InterfaceMessageReferenceElement.class, message, 
msgRefChild, desc) );
-            }
-        }
-        return message;
-    }
-    */
-
-    /*
-    private InterfaceFaultElement parseInterfaceFault(
-                                             OMElement faultEl,
-                                             DescriptionElement desc,
-                                             InterfaceElement parent)
-                                             throws WSDLException{
-
-        InterfaceFaultElement fault = parent.addInterfaceFaultElement();
-        fault.setParentElement(parent);
-
-        String name = OMUtils.getAttribute(faultEl, Constants.ATTR_NAME);
-
-        if(name != null){
-            fault.setName(new NCName(name));
-        }
-
-        String element = OMUtils.getAttribute(faultEl, Constants.ATTR_ELEMENT);
-
-        if(element != null){
-            try {
-                QName qname = OMUtils.getQName(element, faultEl);
-                fault.setElementName(qname);
-            }
-            catch (WSDLException e) {
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),  //TODO line&col nos.
-                        "WSDL505",
-                        new Object[] {element, OMQNameUtils.newQName(faultEl)},
-                        ErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        parseExtensionAttributes(faultEl, InterfaceFaultElement.class, fault, 
desc);
-
-        Iterator faultElChildren = faultEl.getChildElements();
-        while(faultElChildren.hasNext()){
-            OMElement faultElChild = (OMElement)faultElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
faultElChild)){
-                parseDocumentation(faultElChild, desc, fault);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_FEATURE, 
faultElChild)){
-                parseFeature(faultElChild, desc, fault);
-            }
-            else if (OMQNameUtils.matches(Constants.Q_ELEM_PROPERTY, 
faultElChild)){
-                parseProperty(faultElChild, desc, fault);
-            }
-            else{
-                fault.addExtensionElement(
-                    parseExtensionElement(InterfaceFaultElement.class, fault, 
faultElChild, desc) );
-            }
-        }
-        return fault;
-    }
-    */
-
-
     protected PropertyElement parseProperty(XMLElement propEl,
                                           DescriptionElement desc,
                                           ConfigurableElement parent)
@@ -1172,141 +304,7 @@
 
         return schema;
     }
-
-
-    /*
-    private FeatureElement parseFeature(OMElement featEl,
-                                        DescriptionElement desc,
-                                        ConfigurableElement parent)
-                                        throws WSDLException {
-
-        FeatureElement feature = parent.addFeatureElement();
-        feature.setParentElement(parent);
-
-        String ref = OMUtils.getAttribute(featEl, Constants.ATTR_REF);
-        if(ref != null){
-            feature.setRef(getURI(ref));
-        }
-
-        String req = OMUtils.getAttribute(featEl, Constants.ATTR_REQUIRED);
-        feature.setRequired(Constants.VALUE_TRUE.equals(req));
-
-        //TODO t.b.c. what if attr value is not 'true' or 'false'? (eg, 
missing, mispelt or not lower case.
-
-        parseExtensionAttributes(featEl, FeatureElement.class, feature, desc);
-
-        // Parse the child elements of the <feature> element.
-        Iterator featElChildren = featEl.getChildElements();
-        while (featElChildren.hasNext()){
-            OMElement featElChild = (OMElement)featElChildren.next();
-            if (OMQNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, 
featElChild)){
-                parseDocumentation(featElChild, desc, feature);
-            }
-            else{
-                feature.addExtensionElement(parseExtensionElement(
-                        FeatureElement.class, feature, featElChild, desc) );
-            }
-        }
-        return feature;
-    }
-    */
-
-    /*
-    private ImportElement parseImport(OMElement importEl,
-                                      DescriptionElement desc,
-                                      Map wsdlModules)
-                                      throws WSDLException{
-        ImportElement imp = desc.addImportElement();
-
-        String namespaceURI = OMUtils.getAttribute(importEl, 
Constants.ATTR_NAMESPACE);
-        String locationURI = OMUtils.getAttribute(importEl, 
Constants.ATTR_LOCATION);
-
-        parseExtensionAttributes(importEl, ImportElement.class, imp, desc);
-
-        if(namespaceURI != null){
-            //TODO handle missing namespace attribute (REQUIRED attr)
-            imp.setNamespace(getURI(namespaceURI));
-        }
-
-        if(locationURI != null){
-            //TODO handle missing locationURI (OPTIONAL attr)
-            imp.setLocation(getURI(locationURI));
-            DescriptionElement importedDesc =
-                getWSDLFromLocation(locationURI, desc, wsdlModules);
-            imp.setDescriptionElement(importedDesc);
-        }
-
-        return imp;
-    }
-    */
-
-    /*
-    private IncludeElement parseInclude(OMElement includeEl,
-                                        DescriptionElement desc,
-                                        Map wsdlModules)
-                                        throws WSDLException{
-        IncludeElement include = desc.addIncludeElement();
-
-        String locationURI = OMUtils.getAttribute(includeEl, 
Constants.ATTR_LOCATION);
-
-        parseExtensionAttributes(includeEl, IncludeElement.class, include, 
desc);
-
-        if(locationURI != null){
-            include.setLocation(getURI(locationURI));
-            DescriptionElement includedDesc =
-                getWSDLFromLocation(locationURI, desc, wsdlModules);
-            include.setDescriptionElement(includedDesc);
-        }
-
-        return include;
-    }
-    */
-
-
-    /*
-    //TODO
-    private ExtensionElement parseExtensionElement(Class parentType,
-                                                   WSDLElement parent,
-                                                   OMElement el,
-                                                   DescriptionElement desc)
-                                                   throws WSDLException {
-
-        QName elementType = OMQNameUtils.newQName(el);
-        String namespaceURI = el.getNamespace().getNamespaceURI();
-        try{
-            if (namespaceURI == null || 
namespaceURI.equals(Constants.NS_URI_WSDL20)){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),  //TODO line&col nos.
-                        "WSDL520",
-                        new Object[] {elementType, parentType.getName()},
-                        ErrorReporter.SEVERITY_ERROR);
-                return null;
-            }
-
-            ExtensionRegistry extReg = desc.getExtensionRegistry();
-
-            if (extReg == null){
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),  //TODO line&col nos.
-                        "WSDL514",
-                        new Object[] {elementType, parentType.getName()},
-                        ErrorReporter.SEVERITY_ERROR);
-                return null;
-            }
-
-            ExtensionDeserializer extDS = 
extReg.queryDeserializer(parentType,elementType);
-
-            //TODO FIXME unmarshall method to accept OMElements?
-//            return extDS.unmarshall(parentType, parent, elementType, el, 
desc, extReg);
-
-            return null;
-        }
-        catch (WSDLException e){
-            throw e;
-        }
-    }
-    */
-
+    
 
     //TODO
     protected void parseExtensionAttributes(XMLElement domEl,
@@ -1349,52 +347,6 @@
     //  HELPER METHODS
     //////////////////////////
 
-    /*
-     * Convert a string of type xs:anyURI to a java.net.URI.
-     * An empty string argument will return an empty string URI.
-     * A null argument will return a null.
-     *
-    private URI getURI(String anyURI) throws WSDLException{
-        URI uri = null;
-        if(anyURI != null){
-            try {
-                uri = new URI(anyURI);
-            }
-            catch (URISyntaxException e) {
-                getErrorReporter().reportError(
-                        new ErrorLocatorImpl(),  //TODO line&col nos.
-                        "WSDL506",
-                        new Object[] {anyURI},
-                        ErrorReporter.SEVERITY_ERROR,
-                        e);
-            }
-        }
-        return uri;
-    }
-    */
-
-    /*
-     * Check the actual OM element encountered against the expected qname
-     *
-     * @param el actual element encountered
-     * @param qname expected element's qname
-     * @throws WSDLException
-     *
-    private void checkElementName(OMElement el,
-                                  QName qname)
-                                  throws WSDLException {
-
-        if (!OMQNameUtils.matches(qname, el)){
-            getErrorReporter().reportError(
-                new ErrorLocatorImpl(),  //TODO line&col nos.
-                "WSDL501",
-                new Object[] {qname, OMQNameUtils.newQName(el)},
-                ErrorReporter.SEVERITY_FATAL_ERROR);
-
-            //TODO wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el));
-        }
-    }
-    */
 
     /*
      * Retrieve a WSDL document by resolving the location URI specified



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to