Search in sources :

Example 1 with HelloRequest

use of client.dispatch.null_jaxb.client.HelloRequest in project metro-jax-ws by eclipse-ee4j.

the class DispatchHelloClientTest method testNoParamHelloRequestResponseJAXBNegative.

// should send empty SOAPBody here - no argument returned or perhaps server side exception
// nillable allowed message
public void testNoParamHelloRequestResponseJAXBNegative() throws Throwable {
    JAXBContext jc = null;
    HelloRequest hello = null;
    HelloResponse helloResult = null;
    try {
        jc = createJAXBContext();
    } catch (Exception jbe) {
        fail("Problem creating jaxb context");
    }
    try {
        // no hello args
        Dispatch dispatch = getDispatchJAXB();
        Object result = dispatch.invoke(null);
        assertTrue(result == null);
    } catch (Exception e) {
        assertTrue(e instanceof SOAPFaultException);
        System.out.println("NoParamHelloRequestResponseJAXBNegative PASSED");
    }
}
Also used : HelloResponse(client.dispatch.null_jaxb.client.HelloResponse) HelloRequest(client.dispatch.null_jaxb.client.HelloRequest) Dispatch(jakarta.xml.ws.Dispatch) JAXBContext(jakarta.xml.bind.JAXBContext) SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException) MalformedURLException(java.net.MalformedURLException) WebServiceException(jakarta.xml.ws.WebServiceException) SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException)

Aggregations

HelloRequest (client.dispatch.null_jaxb.client.HelloRequest)1 HelloResponse (client.dispatch.null_jaxb.client.HelloResponse)1 JAXBContext (jakarta.xml.bind.JAXBContext)1 Dispatch (jakarta.xml.ws.Dispatch)1 WebServiceException (jakarta.xml.ws.WebServiceException)1 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)1 MalformedURLException (java.net.MalformedURLException)1