Search in sources :

Example 1 with SimpleAll

use of org.apache.tests.type_test.all.SimpleAll 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");
}
Also used : SimpleChoice(org.apache.tests.type_test.choice.SimpleChoice) TestHeader(org.apache.header_test.TestHeader) Holder(javax.xml.ws.Holder) SOAPHeaderService(org.apache.header_test.SOAPHeaderService) SimpleAll(org.apache.tests.type_test.all.SimpleAll) SimpleStruct(org.apache.tests.type_test.sequence.SimpleStruct) URL(java.net.URL) Test(org.junit.Test) AbstractJaxWsTest(org.apache.cxf.jaxws.AbstractJaxWsTest)

Example 2 with SimpleAll

use of org.apache.tests.type_test.all.SimpleAll 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;
}
Also used : SimpleAll(org.apache.tests.type_test.all.SimpleAll) SimpleStruct(org.apache.tests.type_test.sequence.SimpleStruct)

Aggregations

SimpleAll (org.apache.tests.type_test.all.SimpleAll)2 SimpleStruct (org.apache.tests.type_test.sequence.SimpleStruct)2 URL (java.net.URL)1 Holder (javax.xml.ws.Holder)1 AbstractJaxWsTest (org.apache.cxf.jaxws.AbstractJaxWsTest)1 SOAPHeaderService (org.apache.header_test.SOAPHeaderService)1 TestHeader (org.apache.header_test.TestHeader)1 SimpleChoice (org.apache.tests.type_test.choice.SimpleChoice)1 Test (org.junit.Test)1