Examples of constructImportUrl()


Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDLLocatorImpl.constructImportUrl()

public class WSDLLocatorTest {

  @Test
  public void testResolveAbsoluteURL() {
    WSDLLocatorImpl wsdlLocatorImpl = new WSDLLocatorImpl(null);
    URL url = wsdlLocatorImpl.constructImportUrl(null, "http://localhost/file.wsdl");
    Assert.assertEquals("http://localhost/file.wsdl", url.toExternalForm());
  }
 
  @Test
  public void testResolveAbsoluteURL2() {
View Full Code Here

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDLLocatorImpl.constructImportUrl()

  }
 
  @Test
  public void testResolveAbsoluteURL2() {
    WSDLLocatorImpl wsdlLocatorImpl = new WSDLLocatorImpl(null);
    URL url = wsdlLocatorImpl.constructImportUrl("should get ignored", "http://localhost/file.wsdl");
    Assert.assertEquals("http://localhost/file.wsdl", url.toExternalForm());
  }
 
  @Test
  public void testResolveInCurrentDir() {
View Full Code Here

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDLLocatorImpl.constructImportUrl()

    WSDLLocatorImpl wsdlLocatorImpl = new WSDLLocatorImpl(null);
    URL wsdlFile = ClassUtil.getResource("wsdl/HelloWorld.wsdl", this.getClass());
    if (wsdlFile==null) Assert.fail("Can not find HelloWorld.wsdl file");
    String wsdlFileStr = wsdlFile.toExternalForm();
    String wsdlDir = wsdlFileStr.substring(0,wsdlFileStr.lastIndexOf("/"));
    URL url = wsdlLocatorImpl.constructImportUrl(wsdlFileStr, "child.wsdl");
    Assert.assertEquals(wsdlDir + "/child.wsdl", url.toExternalForm());
  }
 
  @Test
  public void testResolveInCurrentDir2() {
View Full Code Here

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDLLocatorImpl.constructImportUrl()

    WSDLLocatorImpl wsdlLocatorImpl = new WSDLLocatorImpl(null);
    URL wsdlFile = ClassUtil.getResource("wsdl/HelloWorld.wsdl", this.getClass());
    if (wsdlFile==null) Assert.fail("Can not find HelloWorld.wsdl file");
    String wsdlFileStr = wsdlFile.toExternalForm();
    String wsdlDir = wsdlFileStr.substring(0,wsdlFileStr.lastIndexOf("/"));
    URL url = wsdlLocatorImpl.constructImportUrl(wsdlFileStr, "./child.wsdl");
    Assert.assertEquals(wsdlDir + "/child.wsdl", url.toExternalForm());
  }
 
  @Test
  public void testResolveInParentDir() {
View Full Code Here

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDLLocatorImpl.constructImportUrl()

    URL wsdlFile = ClassUtil.getResource("wsdl/HelloWorld.wsdl", this.getClass());
    if (wsdlFile==null) Assert.fail("Can not find HelloWorld.wsdl file");
    String wsdlFileStr = wsdlFile.toExternalForm();
    String wsdlDir = wsdlFileStr.substring(0,wsdlFileStr.lastIndexOf("/"));
    wsdlDir = wsdlDir.substring(0, wsdlDir.lastIndexOf("/"));
    URL url = wsdlLocatorImpl.constructImportUrl(wsdlFileStr, "../child.wsdl");
    Assert.assertEquals(wsdlDir + "/child.wsdl", url.toExternalForm());
  }
 
  @Test
  public void testResolveInParentDir2() throws URISyntaxException {
View Full Code Here

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDLLocatorImpl.constructImportUrl()

    if (wsdlFile==null) Assert.fail("Can not find HelloWorld.wsdl file");
    String wsdlFileStr = wsdlFile.toExternalForm();
    String wsdlDir = wsdlFileStr.substring(0,wsdlFileStr.lastIndexOf("/"));
    wsdlDir = wsdlDir.substring(0, wsdlDir.lastIndexOf("/"));
    wsdlDir = wsdlDir.substring(0, wsdlDir.lastIndexOf("/"));
    URL url = wsdlLocatorImpl.constructImportUrl(wsdlFileStr, "../../child.wsdl");
    Assert.assertEquals(wsdlDir + "/child.wsdl", url.toExternalForm());
  }
 
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.