1 /* 2 * soapUI, copyright (C) 2004-2010 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 testInit() throws Exception 38 { 39 assertTrue( new WsdlProject().isCacheDefinitions() ); 40 } 41 42 43 // public void testImport() throws Exception 44 // { 45 // String url = "http://queue.amazonaws.com/doc/2006-04-01/QueueService.wsdl"; 46 // 47 // WsdlProject project = new WsdlProject(); 48 // 49 // // import amazon wsdl 50 // WsdlInterface[] result = project.importWsdl(url, true); 51 // 52 // assertEquals(2, result.length); 53 // } 54 /* 55 public void testImport2() throws Exception 56 { 57 String url = "file:forumwsdl/invoke.wsdl"; 58 59 SoapUI.getSettings().setString( ProxySettings.HOST, "intra0.frec.bull.fr" ); 60 SoapUI.getSettings().setString(ProxySettings.PORT, "8080" ); 61 SoapUI.getSettings().setString(ProxySettings.EXCLUDES, "localhost" ); 62 63 WsdlProject project = new WsdlProject(); 64 65 // import amazon wsdl 66 WsdlInterface[] result = project.importWsdl(url, true); 67 68 assertEquals(1, result.length); 69 }*/ 70 }