use of com.sun.xml.ws.model.RuntimeModeler in project metro-jax-ws by eclipse-ee4j.
the class WrapperNSTest method testGenerateWsdl.
public void testGenerateWsdl() throws Exception {
Class<?> sei = MyHelloRPC.class;
DatabindingFactory fac = DatabindingFactory.newInstance();
Databinding.Builder b = fac.createBuilder(sei, null);
DatabindingModeFeature dbf = new DatabindingModeFeature("eclipselink.jaxb");
WebServiceFeature[] f = { dbf };
DatabindingConfig config = new DatabindingConfig();
config.setFeatures(f);
config.setEndpointClass(MyHelloClass.class);
MappingInfo mi = new MappingInfo();
mi.setServiceName(new QName("http://echo.org/", "helloService"));
mi.setPortName(new QName("http://echo.org/", "helloPort"));
config.setMappingInfo(mi);
config.setClassLoader(this.getClass().getClassLoader());
RuntimeModeler rtModeler = new RuntimeModeler(config);
rtModeler.buildRuntimeModel();
}
use of com.sun.xml.ws.model.RuntimeModeler in project metro-jax-ws by eclipse-ee4j.
the class RuntimeModelerDriver method main.
public static void main(String[] args) {
if (args.length != 1) {
System.out.println("Usage: RuntimeModelerDriver <sei_Class>");
System.exit(-1);
}
try {
Class sei = Class.forName(args[0]);
RuntimeModeler rm = new RuntimeModeler(sei, null, BindingID.SOAP11_HTTP);
SEIModel model = rm.buildRuntimeModel();
System.out.println("Model generated succesful!");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
Aggregations