Search in sources :

Example 1 with SimpleChoice

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

Aggregations

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 SimpleAll (org.apache.tests.type_test.all.SimpleAll)1 SimpleChoice (org.apache.tests.type_test.choice.SimpleChoice)1 SimpleStruct (org.apache.tests.type_test.sequence.SimpleStruct)1 Test (org.junit.Test)1