incubator-agila-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r178865 - in /incubator/agila/trunk/modules/bpel: client/api/src/java/org/apache/agila/bpel/client/ client/web/src/java/org/apache/agila/bpel/web/deployer/action/ client/web/src/webapp/ engine/deployer/ engine/deployer/src/java/org/apache/agila/bpel/deployer/ engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/ engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/bpel/ engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/wsdl/ engine/wsa/ engine/wsa/src/java/org/apache/agila/bpel/wsa/
Date Sat, 28 May 2005 10:40:20 GMT
Author: mriou
Date: Sat May 28 03:40:17 2005
New Revision: 178865

URL: http://svn.apache.org/viewcvs?rev=178865&view=rev
Log:
AGILA-14 WSDL deployment now uses WSDL4J simple reference validation instead of full WSVT
validation.

Modified:
    incubator/agila/trunk/modules/bpel/client/api/src/java/org/apache/agila/bpel/client/AgilaDeployer.java
    incubator/agila/trunk/modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/action/DeployProcess.java
    incubator/agila/trunk/modules/bpel/client/web/src/webapp/deployer.jsp
    incubator/agila/trunk/modules/bpel/engine/deployer/project.xml
    incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/AgilaDeployer.java
    incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/AgilaDeployerImpl.java
    incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/bpel/BPELValidator.java
    incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/wsdl/WSDLValidator.java
    incubator/agila/trunk/modules/bpel/engine/wsa/project.xml
    incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java

Modified: incubator/agila/trunk/modules/bpel/client/api/src/java/org/apache/agila/bpel/client/AgilaDeployer.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/client/api/src/java/org/apache/agila/bpel/client/AgilaDeployer.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/client/api/src/java/org/apache/agila/bpel/client/AgilaDeployer.java
(original)
+++ incubator/agila/trunk/modules/bpel/client/api/src/java/org/apache/agila/bpel/client/AgilaDeployer.java
Sat May 28 03:40:17 2005
@@ -65,12 +65,11 @@
      * Deploys a WSDL web service description and eventually validates it. The WSDL
      * description will be used by Agila's engine to invoke we services.
      * @param resourceContent
-     * @param validate
      * @return
      * @throws ServiceException
      * @throws RemoteException
      */
-    public String[] deployWSDL(String resourceContent, boolean validate) throws ServiceException,
RemoteException {
+    public String[] deployWSDL(String resourceContent) throws ServiceException, RemoteException
{
         log.debug("Calling WSDL deployment.");
         Service service = new Service();
         Call call = (Call) service.createCall();
@@ -82,7 +81,7 @@
         }
         call.setOperationName("deployWSDL");
 
-        Object result = call.invoke(new Object[]{resourceContent, new Boolean(validate)});
+        Object result = call.invoke(new Object[]{resourceContent});
         log.debug("WSDL deployment called.");
         return (String[]) result;
     }

Modified: incubator/agila/trunk/modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/action/DeployProcess.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/action/DeployProcess.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/action/DeployProcess.java
(original)
+++ incubator/agila/trunk/modules/bpel/client/web/src/java/org/apache/agila/bpel/web/deployer/action/DeployProcess.java
Sat May 28 03:40:17 2005
@@ -64,7 +64,7 @@
             FormFile definitionFile = form.getDefinitionFile();
             StringBuffer wsdlBuffer = getFileContent(definitionFile, errors);
             try {
-                messages = agilaDeployer.deployWSDL(wsdlBuffer.toString(), request.getParameter("validateWSDL")
!= null);
+                messages = agilaDeployer.deployWSDL(wsdlBuffer.toString());
             } catch (ServiceException e) {
                 log.error("A problem occured when deploying the process.", e);
                 errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.generic.server"));

Modified: incubator/agila/trunk/modules/bpel/client/web/src/webapp/deployer.jsp
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/client/web/src/webapp/deployer.jsp?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/client/web/src/webapp/deployer.jsp (original)
+++ incubator/agila/trunk/modules/bpel/client/web/src/webapp/deployer.jsp Sat May 28 03:40:17
2005
@@ -64,7 +64,6 @@
                     <tr class="b">
                         <td>
                             <bean:message key="text.deployer.processdef"/><html:file
property="definitionFile"/>
-                            <html:checkbox property="validateWSDL"/> <bean:message
key="text.deployer.validate"/>
                         </td>
                     </tr>
                 </table>

Modified: incubator/agila/trunk/modules/bpel/engine/deployer/project.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/deployer/project.xml?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/deployer/project.xml (original)
+++ incubator/agila/trunk/modules/bpel/engine/deployer/project.xml Sat May 28 03:40:17 2005
@@ -27,8 +27,7 @@
         &dependency-msv-isorelax;
         &dependency-msv-relaxdata;
         &dependency-msv-xsdlib;
-	    &dependency-wsvt-model;
-	    &dependency-wsvt-validator;
+	&dependency-wsdl4j;
         &dependency-xmldb-api;
     </dependencies>
 

Modified: incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/AgilaDeployer.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/AgilaDeployer.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/AgilaDeployer.java
(original)
+++ incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/AgilaDeployer.java
Sat May 28 03:40:17 2005
@@ -18,6 +18,7 @@
 import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.List;
 
 import org.apache.agila.bpel.deployer.exception.DeploymentException;
 
@@ -68,11 +69,10 @@
     /**
      * Deploys a WSDL description, applying neccessary validations.
      * @param resourceContent
-     * @param validate
      * @return an array containing all error messages
      * @throws DeploymentException
      */
-    public String[] deployWSDL(String resourceContent, boolean validate) throws DeploymentException;
+    public List deployWSDL(String resourceContent) throws DeploymentException;
 
     /**
      * Deploys a BPEL description, applying neccessary validations.
@@ -80,5 +80,5 @@
      * @return an array containing all error messages
      * @throws DeploymentException
      */
-    public String[] deployBPEL(String resourceContent) throws DeploymentException;
+    public List deployBPEL(String resourceContent) throws DeploymentException;
 }

Modified: incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/AgilaDeployerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/AgilaDeployerImpl.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/AgilaDeployerImpl.java
(original)
+++ incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/AgilaDeployerImpl.java
Sat May 28 03:40:17 2005
@@ -139,29 +139,27 @@
         log.debug("Resource " + filePath + " as been deployed properly.");
     }
 
-    public String[] deployWSDL(String resourceContent, boolean validate) throws DeploymentException
{
+    public List deployWSDL(String resourceContent) throws DeploymentException {
         String filePath = DeployerConfiguration.getDeployDir() + extractFileName(resourceContent);
         log.debug("Deploying WSDL document as " + filePath);
         deployFile(filePath, resourceContent);
 
         boolean validationFailed = false;
-        String[] validationMessages = null;
-        if (validate) {
-            try {
-                validationMessages = getWSDLValidator().validate("file:///" + filePath);
-            } catch (ValidationException e) {
-                validationFailed = true;
-            }
-            if (validationMessages.length > 0) validationFailed = true;
-            if (validationFailed) {
-                new File(filePath).delete();
-                log.debug("Deployment of WSDL document " + filePath
-                              + " has failed, returned error have been provided.");
-                return validationMessages;
-            }
+        List validationMessages = null;
+        try {
+            validationMessages = getWSDLValidator().validate("file:///" + filePath);
+            if (validationMessages.size() > 0) validationFailed = true;
+        } catch (ValidationException e) {
+            validationFailed = true;
+        }
+        if (validationFailed) {
+            new File(filePath).delete();
+            log.debug("Deployment of WSDL document " + filePath
+                          + " has failed, returned error have been provided.");
+            return validationMessages;
         }
 
-        Document doc = null;
+        Document doc;
         try {
             doc = getDocument(resourceContent);
         } catch (DocumentException e) {
@@ -174,10 +172,10 @@
         return validationMessages;
     }
 
-    public String[] deployBPEL(String resourceContent) throws DeploymentException {
+    public List deployBPEL(String resourceContent) throws DeploymentException {
         // Loading all documents referenced in the process description and finding out
         // which one is the WSDL definition.
-        Document bpelDoc = null;
+        Document bpelDoc;
         try {
             bpelDoc = getDocument(resourceContent);
         } catch (DocumentException e) {
@@ -192,7 +190,7 @@
             String referencedFilePath = NSUtil.extractFileNameFromNS(ns.getURI());
             File referencedFile = new File(DeployerConfiguration.getDeployDir() + referencedFilePath);
             if (referencedFile.exists()) {
-                Document referencedDoc = null;
+                Document referencedDoc;
                 try {
                     referencedDoc = getDocument(referencedFile.toURL());
                 } catch (DocumentException e) {
@@ -213,8 +211,8 @@
         log.debug("Deploying BPEL document as " + filePath);
         deployFile(filePath, resourceContent);
 
-        String[] validationMessages = getBPELValidator().validate("file:///" + filePath);
-        if (validationMessages.length > 0) {
+        List validationMessages = getBPELValidator().validate("file:///" + filePath);
+        if (validationMessages.size() > 0) {
             new File(filePath).delete();
             return validationMessages;
         }
@@ -268,7 +266,7 @@
      */
     private String extractFileName(String resourceContent) throws DeploymentException {
         // Extracting the namespace
-        Document document = null;
+        Document document;
         try {
             document = getDocument(resourceContent);
         } catch (DocumentException e) {
@@ -313,11 +311,10 @@
     }
 
     public void deploy(InputStream xmlProcessDescription) throws DeploymentException {
-        String methodName = "deploy";
         try {
             BufferedReader reader = new BufferedReader(new InputStreamReader(xmlProcessDescription));
             StringBuffer buffer = new StringBuffer();
-            String str = null;
+            String str;
             while ((str = reader.readLine()) != null) {
                 buffer.append(str);
             }
@@ -332,7 +329,6 @@
     }
 
     public void deploy(URL xmlProcessDescription) throws DeploymentException {
-        String methodName = "deploy";
         try {
             deploy(getDocument(xmlProcessDescription), null);
         } catch (Exception e) {
@@ -342,7 +338,6 @@
     }
 
     public void deploy(File xmlProcessDescription) throws DeploymentException {
-        String methodName = "deploy";
         try {
             deploy(getDocument(xmlProcessDescription.toURL()), null);
         } catch (Exception e) {
@@ -352,8 +347,6 @@
     }
 
     private void deploy(Document processDoc, Document definitionDoc) throws DeploymentException
{
-        String methodName = "deploy";
-
         try {
             log.debug("begin transaction");
             TransactionManager.beginTransaction();

Modified: incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/bpel/BPELValidator.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/bpel/BPELValidator.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/bpel/BPELValidator.java
(original)
+++ incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/bpel/BPELValidator.java
Sat May 28 03:40:17 2005
@@ -41,7 +41,7 @@
      * @param bpelDocLocation
      * @return the error code ("0" if no error).
      */
-    public String[] validate(String bpelDocLocation) {
+    public List validate(String bpelDocLocation) {
         ArrayList result = new ArrayList();
         Document bpelDoc = null;
         try {
@@ -65,7 +65,7 @@
             }
             result.addAll(nodeValidator.validate(bpelDoc));
         }
-        return StringUtil.toStringArray(result);
+        return result;
     }
 
     private SAXReader reader;

Modified: incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/wsdl/WSDLValidator.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/wsdl/WSDLValidator.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/wsdl/WSDLValidator.java
(original)
+++ incubator/agila/trunk/modules/bpel/engine/deployer/src/java/org/apache/agila/bpel/deployer/priv/validate/wsdl/WSDLValidator.java
Sat May 28 03:40:17 2005
@@ -16,14 +16,19 @@
 package org.apache.agila.bpel.deployer.priv.validate.wsdl;
 
 import org.apache.agila.bpel.deployer.priv.validate.ValidationException;
-import org.apache.agila.bpel.common.configuration.DeployerConfiguration;
-import org.apache.agila.bpel.common.configuration.XMLConfigurationReader;
-import org.eclipse.wsdl.validate.ValidationReport;
-import org.eclipse.wsdl.validate.ValidationMessage;
-import org.eclipse.wsdl.validate.wsdl11.internal.WSDL11ValidatorDelegate;
-import org.eclipse.wsdl.validate.internal.xml.XMLCatalog;
-import org.eclipse.wsdl.validate.internal.ValidatorRegistry;
-import org.eclipse.wsdl.validate.internal.WSDLValidatorDelegate;
+import org.apache.agila.bpel.engine.priv.messaging.InvocationException;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.PortType;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
 
 /**
  * Validates the WSDL description of a Web Service. Basically delegates to Eclipse WSVT.
@@ -36,55 +41,127 @@
      * @param wsdlDocLocation the lcoation of the WSDL document once deployed
      * @return a List of String containing all errors or warnings
      */
-    public String[] validate(String wsdlDocLocation) throws ValidationException {
-        XMLCatalog.addSchemaDir(DeployerConfiguration.getSchemasDir());
-        XMLCatalog.addSchemaDir(DeployerConfiguration.getDeployDir());
-        XMLCatalog.getInstance(); // Force schemas loading
-        WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(
-                "org.eclipse.wsdl.validate.wsdl11.internal.WSDL11ValidatorController", "validatewsdl");
-        WSDL11ValidatorDelegate delegate11 = new WSDL11ValidatorDelegate(
-                "org.eclipse.wsdl.validate.wsdl11.internal.WSDL11BasicValidator", "validatewsdl");
-
-        ValidatorRegistry.getInstance().registerValidator("http://schemas.xmlsoap.org/wsdl/",
delegate
-                , ValidatorRegistry.WSDL_VALIDATOR);
-        org.eclipse.wsdl.validate.wsdl11.internal.ValidatorRegistry.getInstance().registerValidator(
-                "http://schemas.xmlsoap.org/wsdl/", delegate11);
-
-        org.eclipse.wsdl.validate.WSDLValidator validator = org.eclipse.wsdl.validate.WSDLValidator.getInstance();
-        ValidationReport report = validator.validate(wsdlDocLocation);
-
-        int msgcount = 0;
-        for (int m = 0; m < report.getValidationMessages().length; m++) {
-            ValidationMessage validationMessage = report.getValidationMessages()[m];
-            if (validationMessage.getMessage().indexOf("invalid value 'workitem'") < 0)
{
-                msgcount++;
-            }
+//    public String[] validate(String wsdlDocLocation) throws ValidationException {
+//        XMLCatalog.addSchemaDir(DeployerConfiguration.getSchemasDir());
+//        XMLCatalog.addSchemaDir(DeployerConfiguration.getDeployDir());
+//        XMLCatalog.getInstance(); // Force schemas loading
+//        WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(
+//                "org.eclipse.wsdl.validate.wsdl11.internal.WSDL11ValidatorController",
"validatewsdl");
+//        WSDL11ValidatorDelegate delegate11 = new WSDL11ValidatorDelegate(
+//                "org.eclipse.wsdl.validate.wsdl11.internal.WSDL11BasicValidator", "validatewsdl");
+//
+//        ValidatorRegistry.getInstance().registerValidator("http://schemas.xmlsoap.org/wsdl/",
delegate
+//                , ValidatorRegistry.WSDL_VALIDATOR);
+//        org.eclipse.wsdl.validate.wsdl11.internal.ValidatorRegistry.getInstance().registerValidator(
+//                "http://schemas.xmlsoap.org/wsdl/", delegate11);
+//
+//        org.eclipse.wsdl.validate.WSDLValidator validator = org.eclipse.wsdl.validate.WSDLValidator.getInstance();
+//        ValidationReport report = validator.validate(wsdlDocLocation);
+//
+//        int msgcount = 0;
+//        for (int m = 0; m < report.getValidationMessages().length; m++) {
+//            ValidationMessage validationMessage = report.getValidationMessages()[m];
+//            if (validationMessage.getMessage().indexOf("invalid value 'workitem'") <
0) {
+//                msgcount++;
+//            }
+//        }
+//        String[] result = new String[msgcount];
+//        int counter = 0;
+//        for (int m = 0; m < report.getValidationMessages().length; m++) {
+//            ValidationMessage validationMessage = report.getValidationMessages()[m];
+//            // Couldn't get WSVT to validate workitem parts for an unknown reason, nasty
fix.
+//            if (validationMessage.getMessage().indexOf("invalid value 'workitem'") <
0) {
+//                result[counter] = ((validationMessage.getSeverity() == ValidationMessage.SEV_ERROR
? "ERROR: " : "WARNING: ") +
+//                        validationMessage.getMessage() + " at line " + validationMessage.getLine()
+
+//                        ", column " + validationMessage.getColumn());
+//                counter++;
+//            }
+//        }
+//        return result;
+//    }
+
+    /**
+     * Simple validation of a WSDL description. Just checking that all references contained
in the WSDL
+     * document have valid names (bindinds, messages, portTypes and operations). This is
not enough for
+     * a formal validation but it is for Agila BPEL usage.
+     * @param wsdlLocation the lcoation of the WSDL document once deployed
+     * @return a List of String containing all errors or warnings
+     */
+    public List validate(String wsdlLocation) throws ValidationException {
+        Definition def = readWSDL(wsdlLocation);
+        ArrayList defineables = new ArrayList();
+        defineables.addAll(def.getBindings().values());
+        defineables.addAll(def.getMessages().values());
+        defineables.addAll(def.getPortTypes().values());
+        for (Iterator portIter = def.getPortTypes().values().iterator(); portIter.hasNext();)
{
+            PortType portType = (PortType) portIter.next();
+            defineables.addAll(portType.getOperations());
         }
-        String[] result = new String[msgcount];
-        int counter = 0;
-        for (int m = 0; m < report.getValidationMessages().length; m++) {
-            ValidationMessage validationMessage = report.getValidationMessages()[m];
-            // Couldn't get WSVT to validate workitem parts for an unknown reason, nasty
fix.
-            if (validationMessage.getMessage().indexOf("invalid value 'workitem'") < 0)
{
-                result[counter] = ((validationMessage.getSeverity() == ValidationMessage.SEV_ERROR
? "ERROR: " : "WARNING: ") +
-                        validationMessage.getMessage() + " at line " + validationMessage.getLine()
+
-                        ", column " + validationMessage.getColumn());
-                counter++;
+
+        List messages = checkUndefined(defineables);
+        return messages;
+    }
+
+    /**
+     * Invoking the method 'isUndefined' on each object ot the provided list using the reflection
API. If
+     * the result of the call is false, adding a simple error message to the list.
+     * @param defineables
+     * @return
+     */
+    private List checkUndefined(List defineables) {
+        ArrayList messages = new ArrayList();
+        for (int m = 0; m < defineables.size(); m++) {
+            Object defineable = defineables.get(m);
+            Method isUndefined;
+            try {
+                isUndefined = defineable.getClass().getDeclaredMethod("isUndefined", null);
+            } catch (NoSuchMethodException e) {
+                // We're only stuffing objects we know have the undefined method, so this
should NEVER occur
+                throw new RuntimeException("Object " + defineable + " can't be validated!");
+            }
+            Object result;
+            try {
+                 result = isUndefined.invoke(defineable, null);
+            } catch (IllegalAccessException e) {
+                throw new RuntimeException("Couldn't access method isUndefined, object "
+ defineable + " can't be validated!");
+            } catch (InvocationTargetException e) {
+                throw new RuntimeException("Couldn't invoke method isUndefined, object "
+ defineable + " can't be validated!");
+            }
+            if (((Boolean)result).booleanValue()) {
+                String str = defineable.toString();
+                // PortTypes toString also shows operations, we don't need them so let's
cut that string
+                int eol = str.indexOf("\n");
+                messages.add("Couldn't find a definition for " + str.substring(0, eol >
0 ? eol : str.length()));
             }
+
         }
-        return result;
+
+        return messages;
     }
 
-/*
-    public static void main(String[] args) {
-        WSDLValidator validator = new WSDLValidator();
+    /**
+     * Reading the WSDL document using WSDL4J.
+     * @param filePath
+     * @return
+     */
+    private static Definition readWSDL(String filePath) {
+        WSDLFactory factory;
         try {
-            DeployerConfiguration.setDeployDir("C:\\Dev\\Tools\\Platform\\jakarta-tomcat-5.0.28\\webapps\\agila-ws\\WEB-INF\\deploy");
-            DeployerConfiguration.setSchemasDir("C:\\Dev\\Tools\\Platform\\jakarta-tomcat-5.0.28\\webapps\\agila-ws\\WEB-INF\\schema");
-            validator.validate("file:///C:/Perso/src/agila/samples/src/xml/example2/wsdef.xml");
-        } catch (ValidationException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+            factory = WSDLFactory.newInstance();
+        } catch (WSDLException e) {
+            throw new InvocationException("Could not find WSDL factory.", e);
         }
+        WSDLReader reader = factory.newWSDLReader();
+        reader.setFeature("javax.wsdl.verbose", true);
+        reader.setFeature("javax.wsdl.importDocuments", false);
+
+        Definition def;
+        try {
+            def = reader.readWSDL(null, filePath);
+        } catch (WSDLException e) {
+            throw new InvocationException("Could not read a WSDL document.", e);
+        }
+        return def;
     }
-*/
+
 }

Modified: incubator/agila/trunk/modules/bpel/engine/wsa/project.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/project.xml?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/project.xml (original)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/project.xml Sat May 28 03:40:17 2005
@@ -62,8 +62,7 @@
         &dependency-wsdl4j;
         &dependency-xerces;
         &dependency-xindice;
-        &dependency-wsvt-model;
-        &dependency-wsvt-validator;
+	&dependency-wsdl4j;
         &dependency-xml-apis;
         &dependency-xmldb-api;
         &dependency-xmldb-api-sdk;

Modified: incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java?rev=178865&r1=178864&r2=178865&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java
(original)
+++ incubator/agila/trunk/modules/bpel/engine/wsa/src/java/org/apache/agila/bpel/wsa/DeployerWSA.java
Sat May 28 03:40:17 2005
@@ -17,9 +17,11 @@
 
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.List;
 
 import org.apache.agila.bpel.deployer.AgilaDeployerFactory;
 import org.apache.agila.bpel.deployer.exception.DeploymentException;
+import org.apache.agila.bpel.common.util.StringUtil;
 import org.apache.log4j.Logger;
 
 /**
@@ -42,10 +44,10 @@
         }
     }
 
-    public String[] deployWSDL(String resourceContent, boolean validate) throws DeploymentException
{
-        String [] result = null;
+    public String[] deployWSDL(String resourceContent) throws DeploymentException {
+        List result;
         try {
-            result = AgilaDeployerFactory.getAgilaDeployer().deployWSDL(resourceContent,
validate);
+            result = AgilaDeployerFactory.getAgilaDeployer().deployWSDL(resourceContent);
         } catch (DeploymentException de) {
             log.error("A DeploymentException has been caught in DeployerWSA", de);
             throw de;
@@ -53,11 +55,11 @@
             log.error("A RuntimeException has been caught in DeployerWSA", re);
             throw re;
         }
-        return result;
+        return StringUtil.toStringArray(result);
     }
 
     public String[] deployBPEL(String resourceContent) throws DeploymentException {
-        String [] result = null;
+        List result;
         try {
             result = AgilaDeployerFactory.getAgilaDeployer().deployBPEL(resourceContent);
         } catch (DeploymentException de) {
@@ -67,12 +69,12 @@
             log.error("A RuntimeException has been caught in DeployerWSA", re);
             throw re;
         }
-        return result;
+        return StringUtil.toStringArray(result);
     }
 
     /** @deprecated **/
     public void deployURL(String url) throws DeploymentException {
-        URL descURL = null;
+        URL descURL;
         try {
             descURL = new URL(url);
         } catch (MalformedURLException e) {



Mime
View raw message