You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ms...@apache.org on 2007/04/04 21:09:28 UTC
svn commit: r525580 -
/incubator/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java
Author: mszefler
Date: Wed Apr 4 12:09:27 2007
New Revision: 525580
URL: http://svn.apache.org/viewvc?view=rev&rev=525580
Log:
test case fixes
Modified:
incubator/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java
Modified: incubator/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java?view=diff&rev=525580&r1=525579&r2=525580
==============================================================================
--- incubator/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java (original)
+++ incubator/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java Wed Apr 4 12:09:27 2007
@@ -18,14 +18,19 @@
*/
package org.apache.ode.bpel.compiler;
-import junit.framework.TestCase;
+import org.apache.ode.bpel.compiler.wsdl.Definition4BPEL;
import org.apache.ode.bpel.compiler.wsdl.WSDLFactory4BPEL;
import org.apache.ode.bpel.compiler.wsdl.WSDLFactoryBPEL11;
import org.apache.ode.utils.xsd.SchemaModel;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+
import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
-import java.net.URL;
+
+import junit.framework.TestCase;
public class WSDLRegistryTest extends TestCase {
@@ -64,9 +69,10 @@
// load & register wsdl
WSDLFactory4BPEL factory = (WSDLFactory4BPEL)WSDLFactoryBPEL11.newInstance();
WSDLReader reader = factory.newWSDLReader();
- ResourceFinder finder = new DefaultResourceFinder();
- //Definition4BPEL def = finder.loadDefinition(reader, null, wsd.toURI());
- //_registry.addDefinition(def);
+ ResourceFinder finder = new DefaultResourceFinder(new File(wsd.getPath()).getParentFile());
+ WSDLLocatorImpl loc = new WSDLLocatorImpl(finder,wsd.toURI());
+ Definition4BPEL wsdl = (Definition4BPEL) reader.readWSDL(loc);
+ _registry.addDefinition(wsdl, finder, wsd.toURI());
// access model
SchemaModel m = _registry.getSchemaModel();