use of org.apache.tests.type_test.choice.SimpleChoice in project cxf by apache.
the class HeaderClientServerTest method testHolderOutIsTheFirstMessagePart.
@Test
public void testHolderOutIsTheFirstMessagePart() throws Exception {
URL wsdl = getClass().getResource("/wsdl/soapheader.wsdl");
assertNotNull(wsdl);
SOAPHeaderService service = new SOAPHeaderService(wsdl, serviceName);
assertNotNull(service);
TestHeader proxy = service.getPort(portName, TestHeader.class);
Holder<SimpleAll> simpleAll = new Holder<SimpleAll>();
SimpleAll sa = new SimpleAll();
sa.setVarAttrString("varAttrString");
sa.setVarInt(100);
sa.setVarString("varString");
simpleAll.value = sa;
SimpleChoice sc = new SimpleChoice();
sc.setVarString("scVarString");
SimpleStruct ss = proxy.sendReceiveAnyType(simpleAll, sc);
assertEquals(simpleAll.value.getVarString(), "scVarString");
assertEquals(ss.getVarInt(), 200);
assertEquals(ss.getVarAttrString(), "varAttrStringRet");
}
Aggregations