Author: jkaputin
Date: Fri Oct  6 18:53:15 2006
New Revision: 453833

URL: http://svn.apache.org/viewvc?view=rev&rev=453833
Log:
Changed WSDLSource.setSource to throw an 

IllegalArgumentException if the source object 

type is invalid rather than a WSDLException.

Modified:
    incubator/woden/branches/WODEN-44/src/org/apache/woden/WSDLSource.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLSource.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLSource.java

Modified: incubator/woden/branches/WODEN-44/src/org/apache/woden/WSDLSource.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/WSDLSource.java?view=diff&rev=453833&r1=453832&r2=453833
==============================================================================
--- incubator/woden/branches/WODEN-44/src/org/apache/woden/WSDLSource.java 
(original)
+++ incubator/woden/branches/WODEN-44/src/org/apache/woden/WSDLSource.java Fri 
Oct  6 18:53:15 2006
@@ -54,11 +54,35 @@
  */

 public interface WSDLSource {

     

-    public void setSource(Object wsdlSource) throws WSDLException;

+       /**

+        * Store the specified source object representing the WSDL.

+        * 

+        * @param wsdlSource the WSDL source object

+        * 

+        * @throws IllegalArgumentException if the specified object type is not 

+        * recognized by the WSDLSource implementation. 

+        */

+    public void setSource(Object wsdlSource);

     

+    /**

+     * Returns the implementation specific object representing the WSDL source

+     * (e.g. a DOM Element or Document or an Axiom OMElement). The caller 
should

+     * cast this object to the appropriate type to use its interface.

+     * 

+     * @return the Object representing the WSDL source

+     */

     public Object getSource();

     

+    /**

+     * Store the base URI of the WSDL source document.

+     * 

+     * @param baseURI the URI of the WSDL document.

+     */

     public void setBaseURI(URI baseURI);

     

+    /**

+     * 

+     * @return the base URI of the WSDL

+     */

     public URI getBaseURI();

 }


Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLSource.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLSource.java?view=diff&rev=453833&r1=453832&r2=453833
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLSource.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLSource.java
 Fri Oct  6 18:53:15 2006
@@ -18,7 +18,6 @@
 import java.net.URI;

 

 import org.apache.woden.ErrorReporter;

-import org.apache.woden.WSDLException;

 import org.apache.woden.WSDLSource;

 

 /**

@@ -42,7 +41,7 @@
     /* (non-Javadoc)

      * @see org.apache.woden.WSDLSource#setSource(java.lang.Object)

      */

-    abstract public void setSource(Object wsdlSource) throws WSDLException;

+    abstract public void setSource(Object wsdlSource);

 

     /* (non-Javadoc)

      * @see org.apache.woden.WSDLSource#getSource()


Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLSource.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLSource.java?view=diff&rev=453833&r1=453832&r2=453833
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLSource.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLSource.java
 Fri Oct  6 18:53:15 2006
@@ -16,7 +16,6 @@
 package org.apache.woden.internal;

 

 import org.apache.woden.ErrorReporter;

-import org.apache.woden.WSDLException;

 import org.w3c.dom.Document;

 import org.w3c.dom.Element;

 import org.xml.sax.InputSource;

@@ -41,7 +40,7 @@
     /* (non-Javadoc)

      * @see org.apache.woden.WSDLSource#setSource(java.lang.Object)

      */

-    public void setSource(Object wsdlSource) throws WSDLException {

+    public void setSource(Object wsdlSource) {

         

         //TODO check if any other types of wsdl source should be supported

         if(wsdlSource instanceof Element ||

@@ -56,8 +55,7 @@
             String wsdlSourceClass = this.getClass().getName();

             String msg = fErrorReporter.getFormattedMessage(

                     "WSDL018", new Object[] {sourceClass, wsdlSourceClass});

-            //TODO throw IllegalArgumentException instead of WSDLException.

-            throw new WSDLException(WSDLException.PARSER_ERROR, msg);

+            throw new IllegalArgumentException(msg);

         }

     }

 




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

Reply via email to