1 /* 2 * soapUI, copyright (C) 2004-2008 eviware.com 3 * 4 * soapUI is free software; you can redistribute it and/or modify it under the 5 * terms of version 2.1 of the GNU Lesser General Public License as published by 6 * the Free Software Foundation. 7 * 8 * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 * See the GNU Lesser General Public License for more details at gnu.org. 11 */ 12 13 package com.eviware.soapui.impl.wsdl; 14 15 import com.eviware.soapui.SoapUI; 16 import com.eviware.soapui.impl.wsdl.support.wsdl.WsdlImporter; 17 import com.eviware.soapui.support.TestCaseWithJetty; 18 19 public class WsdlProjectTestCase extends TestCaseWithJetty 20 { 21 public void testComplexLoad() throws Exception 22 { 23 WsdlProject project = new WsdlProject(); 24 WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, 25 "http://localhost:8082/test8/TestService.wsdl"); 26 27 assertEquals(1, wsdls.length); 28 } 29 30 public void testClasspathLoad() throws Exception 31 { 32 String str = SoapUI.class.getResource( "/sample-soapui-project.xml" ).toURI().toString(); 33 34 WsdlProject project = new WsdlProject( str ); 35 } 36 37 // public void testImport() throws Exception 38 // { 39 // String url = "http://queue.amazonaws.com/doc/2006-04-01/QueueService.wsdl"; 40 // 41 // WsdlProject project = new WsdlProject(); 42 // 43 // // import amazon wsdl 44 // WsdlInterface[] result = project.importWsdl(url, true); 45 // 46 // assertEquals(2, result.length); 47 // } 48 /* 49 public void testImport2() throws Exception 50 { 51 String url = "file:forumwsdl/invoke.wsdl"; 52 53 SoapUI.getSettings().setString( ProxySettings.HOST, "intra0.frec.bull.fr" ); 54 SoapUI.getSettings().setString(ProxySettings.PORT, "8080" ); 55 SoapUI.getSettings().setString(ProxySettings.EXCLUDES, "localhost" ); 56 57 WsdlProject project = new WsdlProject(); 58 59 // import amazon wsdl 60 WsdlInterface[] result = project.importWsdl(url, true); 61 62 assertEquals(1, result.length); 63 }*/ 64 }