Search in sources :

Example 1 with RuntimeModeler

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();
}
Also used : DatabindingConfig(com.sun.xml.ws.api.databinding.DatabindingConfig) DatabindingFactory(com.oracle.webservices.api.databinding.DatabindingFactory) QName(javax.xml.namespace.QName) WebServiceFeature(jakarta.xml.ws.WebServiceFeature) RuntimeModeler(com.sun.xml.ws.model.RuntimeModeler) DatabindingModeFeature(com.oracle.webservices.api.databinding.DatabindingModeFeature) Databinding(com.oracle.webservices.api.databinding.Databinding) MappingInfo(com.sun.xml.ws.api.databinding.MappingInfo)

Example 2 with RuntimeModeler

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();
    }
}
Also used : SEIModel(com.sun.xml.ws.api.model.SEIModel) RuntimeModeler(com.sun.xml.ws.model.RuntimeModeler)

Aggregations

RuntimeModeler (com.sun.xml.ws.model.RuntimeModeler)2 Databinding (com.oracle.webservices.api.databinding.Databinding)1 DatabindingFactory (com.oracle.webservices.api.databinding.DatabindingFactory)1 DatabindingModeFeature (com.oracle.webservices.api.databinding.DatabindingModeFeature)1 DatabindingConfig (com.sun.xml.ws.api.databinding.DatabindingConfig)1 MappingInfo (com.sun.xml.ws.api.databinding.MappingInfo)1 SEIModel (com.sun.xml.ws.api.model.SEIModel)1 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)1 QName (javax.xml.namespace.QName)1