use of org.apache.tests.type_test.sequence.SimpleStruct 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");
}
use of org.apache.tests.type_test.sequence.SimpleStruct in project cxf by apache.
the class TestHeaderImpl method sendReceiveAnyType.
public SimpleStruct sendReceiveAnyType(Holder<SimpleAll> x, SimpleChoice y) {
SimpleAll sa = new SimpleAll();
sa.setVarString(y.getVarString());
SimpleStruct ss = new SimpleStruct();
ss.setVarAttrString(x.value.getVarAttrString() + "Ret");
ss.setVarInt(x.value.getVarInt() + 100);
x.value = sa;
return ss;
}
Aggregations