use of com.sun.xml.ws.test.xbeandoc.TypedXmlBeansDOC in project metro-jax-ws by eclipse-ee4j.
the class BasicDatabindingTestBase method testGlobalElementParamXmlBeansTopdown.
/**
* Test topdown xbean TypedXmlBeansDOC
*/
public void testGlobalElementParamXmlBeansTopdown() throws Exception {
Class endpointClass = TypedXmlBeansDOCImpl.class;
Class proxySEIClass = TypedXmlBeansDOC.class;
DatabindingConfig srvConfig = new DatabindingConfig();
srvConfig.setEndpointClass(endpointClass);
DatabindingModeFeature dbf = databindingMode();
dbf.getProperties().put("com.sun.xml.ws.api.model.DocWrappeeNamespapceQualified", true);
srvConfig.setMetadataReader(new JWSAnnotationReader());
WebServiceFeature[] f = { dbf };
srvConfig.setFeatures(f);
DatabindingConfig cliConfig = new DatabindingConfig();
cliConfig.setContractClass(proxySEIClass);
cliConfig.setFeatures(f);
cliConfig.setMetadataReader(new JWSAnnotationReader());
TypedXmlBeansDOC proxy = createProxy(TypedXmlBeansDOC.class, srvConfig, cliConfig, true);
{
Holder<Countries> countries = new Holder<Countries>(new Countries());
countries.value.getCountry().add(countryInfo("1", "banana"));
countries.value.getCountry().add(countryInfo("2", "apple"));
countries.value.getCountry().add(countryInfo("3", "peach"));
proxy.addCountry(countries, countryInfo("x", "foo"));
assertEquals(4, countries.value.getCountry().size());
}
{
Countries countries = new Countries();
countries.getCountry().add(countryInfo("1", "banana"));
countries.getCountry().add(countryInfo("2", "apple"));
String res = proxy.getCountryName(countries, "hello");
assertEquals("hello2", res);
}
}
Aggregations