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");
}
}
Aggregations