Search in sources :

Example 1 with BareDocumentResponse

use of org.apache.hello_world_soap_http.types.BareDocumentResponse in project cxf by apache.

the class ClientServerTest method testDocLitBareConnection.

@Test
public void testDocLitBareConnection() throws Exception {
    SOAPServiceDocLitBare service = new SOAPServiceDocLitBare();
    assertNotNull(service);
    DocLitBare greeter = service.getPort(portName1, DocLitBare.class);
    updateAddressPort(greeter, BARE_PORT);
    try {
        BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
        assertNotNull("no response for operation testDocLitBare", bareres);
        assertEquals("CXF", bareres.getCompany());
        assertTrue(bareres.getId() == 1);
    } catch (UndeclaredThrowableException ex) {
        throw (Exception) ex.getCause();
    }
}
Also used : BareDocumentResponse(org.apache.hello_world_soap_http.types.BareDocumentResponse) SOAPServiceDocLitBare(org.apache.hello_world_soap_http.SOAPServiceDocLitBare) UndeclaredThrowableException(java.lang.reflect.UndeclaredThrowableException) DocLitBare(org.apache.hello_world_soap_http.DocLitBare) SOAPServiceDocLitBare(org.apache.hello_world_soap_http.SOAPServiceDocLitBare) SOAPServiceMultiPortTypeTest(org.apache.hello_world_soap_http.SOAPServiceMultiPortTypeTest) SOAPServiceBogusAddressTest(org.apache.hello_world_soap_http.SOAPServiceBogusAddressTest) Test(org.junit.Test)

Example 2 with BareDocumentResponse

use of org.apache.hello_world_soap_http.types.BareDocumentResponse in project cxf by apache.

the class ClientServerTest method testMultiPorts.

@Test
public void testMultiPorts() throws Exception {
    URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
    assertNotNull(wsdl);
    QName sname = new QName("http://apache.org/hello_world_soap_http", "SOAPServiceMultiPortTypeTest");
    SOAPServiceMultiPortTypeTest service = new SOAPServiceMultiPortTypeTest(wsdl, sname);
    DocLitBare b = service.getDocLitBarePort();
    updateAddressPort(b, PORT);
    BareDocumentResponse resp = b.testDocLitBare("CXF");
    assertNotNull(resp);
    assertEquals("CXF", resp.getCompany());
    Greeter g = service.getGreeterPort();
    updateAddressPort(g, PORT);
    String result = g.greetMe("CXF");
    assertEquals("Hello CXF", result);
}
Also used : BareDocumentResponse(org.apache.hello_world_soap_http.types.BareDocumentResponse) QName(javax.xml.namespace.QName) Greeter(org.apache.hello_world_soap_http.Greeter) DocLitBare(org.apache.hello_world_soap_http.DocLitBare) SOAPServiceDocLitBare(org.apache.hello_world_soap_http.SOAPServiceDocLitBare) URL(java.net.URL) SOAPServiceMultiPortTypeTest(org.apache.hello_world_soap_http.SOAPServiceMultiPortTypeTest) SOAPServiceMultiPortTypeTest(org.apache.hello_world_soap_http.SOAPServiceMultiPortTypeTest) SOAPServiceBogusAddressTest(org.apache.hello_world_soap_http.SOAPServiceBogusAddressTest) Test(org.junit.Test)

Example 3 with BareDocumentResponse

use of org.apache.hello_world_soap_http.types.BareDocumentResponse in project cxf by apache.

the class AnotherDerivedGreeterImpl method testDocLitBare.

public BareDocumentResponse testDocLitBare(String in) {
    incrementInvocationCount("testDocLitBare");
    BareDocumentResponse res = new BareDocumentResponse();
    res.setCompany("CXF");
    res.setId(1);
    return res;
}
Also used : BareDocumentResponse(org.apache.hello_world_soap_http.types.BareDocumentResponse)

Example 4 with BareDocumentResponse

use of org.apache.hello_world_soap_http.types.BareDocumentResponse in project cxf by apache.

the class BaseGreeterImpl method testDocLitBare.

@WebMethod
public BareDocumentResponse testDocLitBare(String in) {
    invocationCount++;
    BareDocumentResponse res = new BareDocumentResponse();
    res.setCompany("CXF");
    res.setId(1);
    return res;
}
Also used : BareDocumentResponse(org.apache.hello_world_soap_http.types.BareDocumentResponse) WebMethod(javax.jws.WebMethod)

Example 5 with BareDocumentResponse

use of org.apache.hello_world_soap_http.types.BareDocumentResponse in project cxf by apache.

the class DocLitBareGreeterImpl method testDocLitBare.

public BareDocumentResponse testDocLitBare(String in) {
    invocationCount++;
    BareDocumentResponse res = new BareDocumentResponse();
    res.setCompany("CXF");
    res.setId(1);
    return res;
}
Also used : BareDocumentResponse(org.apache.hello_world_soap_http.types.BareDocumentResponse)

Aggregations

BareDocumentResponse (org.apache.hello_world_soap_http.types.BareDocumentResponse)9 DocLitBare (org.apache.hello_world_soap_http.DocLitBare)3 Test (org.junit.Test)3 SOAPServiceBogusAddressTest (org.apache.hello_world_soap_http.SOAPServiceBogusAddressTest)2 SOAPServiceDocLitBare (org.apache.hello_world_soap_http.SOAPServiceDocLitBare)2 SOAPServiceMultiPortTypeTest (org.apache.hello_world_soap_http.SOAPServiceMultiPortTypeTest)2 UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 URL (java.net.URL)1 WebMethod (javax.jws.WebMethod)1 QName (javax.xml.namespace.QName)1 SpringBusFactory (org.apache.cxf.bus.spring.SpringBusFactory)1 Greeter (org.apache.hello_world_soap_http.Greeter)1 SOAPServiceAddressingDocLitBare (org.apache.hello_world_soap_http.SOAPServiceAddressingDocLitBare)1