1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wadl.support;
14
15 import com.eviware.soapui.impl.rest.RestService;
16 import com.eviware.soapui.impl.rest.WadlGenerator;
17 import com.eviware.soapui.impl.support.definition.support.AbstractDefinitionLoader;
18 import org.apache.xmlbeans.XmlObject;
19 import org.apache.xmlbeans.XmlOptions;
20
21 public class GeneratedWadlDefinitionLoader extends AbstractDefinitionLoader
22 {
23 private RestService restService;
24
25 public GeneratedWadlDefinitionLoader(RestService restService)
26 {
27 this.restService = restService;
28 }
29
30 public XmlObject loadXmlObject(String wsdlUrl, XmlOptions options) throws Exception
31 {
32 return new WadlGenerator(restService).generateWadl();
33 }
34
35 public String getBaseURI()
36 {
37 return restService.getName() + ".wadl";
38 }
39
40 public void setNewBaseURI(String uri)
41 {
42
43 }
44
45 public String getFirstNewURI()
46 {
47 return getBaseURI();
48 }
49 }