Search in sources :

Example 21 with DatabindingModeFeature

use of com.oracle.webservices.api.databinding.DatabindingModeFeature in project metro-jax-ws by eclipse-ee4j.

the class WebParamTest method testWebParam1.

void testWebParam1(String dbmode) throws Exception {
    DatabindingConfig srvConfig = new DatabindingConfig();
    srvConfig.setEndpointClass(WebParamWebServiceImpl.class);
    srvConfig.getMappingInfo().setDefaultSchemaNamespaceSuffix("types");
    DatabindingModeFeature dbf = new DatabindingModeFeature(dbmode);
    WebServiceFeatureList wsfeatures = new WebServiceFeatureList(WebParamWebServiceImpl.class);
    WebServiceFeature[] f = { dbf };
    srvConfig.setFeatures(f);
    DatabindingConfig cliConfig = new DatabindingConfig();
    cliConfig.setContractClass(WebParamWebService.class);
    cliConfig.setFeatures(f);
    WebParamWebService port = createProxy(WebParamWebService.class, srvConfig, cliConfig, debug);
    {
        jakarta.xml.ws.Holder<Employee> employeeHolder = new jakarta.xml.ws.Holder<Employee>();
        port.helloString4("jsr181", employeeHolder);
        Employee employee = (Employee) employeeHolder.value;
        Name output = employee.getName();
        assertEquals(output.getFirstName(), "jsr181");
        assertEquals(output.getLastName(), "jaxws");
    }
    {
        jakarta.xml.ws.Holder<Employee> employeeHolder = new jakarta.xml.ws.Holder<Employee>();
        Name name = new Name();
        name.setFirstName("jsr181");
        name.setLastName("jsr109");
        port.helloString7("jsr181", name, employeeHolder);
        Employee employee = (Employee) employeeHolder.value;
        Name output = employee.getName();
        assertEquals(output.getFirstName(), "jsr181");
        assertEquals(output.getLastName(), "jsr109");
    }
}
Also used : DatabindingModeFeature(com.oracle.webservices.api.databinding.DatabindingModeFeature) WebServiceFeatureList(com.sun.xml.ws.binding.WebServiceFeatureList) DatabindingConfig(com.sun.xml.ws.api.databinding.DatabindingConfig) WebServiceFeature(jakarta.xml.ws.WebServiceFeature)

Aggregations

DatabindingModeFeature (com.oracle.webservices.api.databinding.DatabindingModeFeature)21 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)19 DatabindingConfig (com.sun.xml.ws.api.databinding.DatabindingConfig)15 QName (javax.xml.namespace.QName)7 SchemaInfo (com.sun.xml.ws.db.sdo.SchemaInfo)6 Databinding (com.oracle.webservices.api.databinding.Databinding)4 DatabindingFactory (com.oracle.webservices.api.databinding.DatabindingFactory)4 WebServiceFeatureList (com.sun.xml.ws.binding.WebServiceFeatureList)4 HelperContext (commonj.sdo.helper.HelperContext)4 Map (java.util.Map)4 SDOHelperContext (org.eclipse.persistence.sdo.helper.SDOHelperContext)4 HelperContextResolver (com.sun.xml.ws.db.sdo.HelperContextResolver)3 BindingContext (com.sun.xml.ws.spi.db.BindingContext)3 File (java.io.File)3 List (java.util.List)3 JavaCallInfo (com.oracle.webservices.api.databinding.JavaCallInfo)2 MessageContext (com.oracle.webservices.api.message.MessageContext)2 BindingID (com.sun.xml.ws.api.BindingID)2 DummyAnnotations (com.sun.xml.ws.base.DummyAnnotations)2 MySDO (com.sun.xml.ws.sdo.test.helloSDO.MySDO)2