Search in sources :

Example 11 with Response

use of jakarta.xml.ws.Response in project metro-jax-ws by eclipse-ee4j.

the class HelloLiteralTest method testHelloRequestResponseSourceAsyncPoll.

public void testHelloRequestResponseSourceAsyncPoll() throws Exception {
    Dispatch<Source> dispatch = createDispatchSource();
    Source source = getSource();
    Response result = dispatch.invokeAsync(source);
    Object obj = result.get();
    assertTrue(obj instanceof Source);
    HelloResponse response = (HelloResponse) jaxbContext.createUnmarshaller().unmarshal((Source) obj);
    assertTrue("foo".equals(response.getArgument()));
    assertTrue("bar".equals(response.getExtra()));
}
Also used : Response(jakarta.xml.ws.Response) StreamSource(javax.xml.transform.stream.StreamSource) Source(javax.xml.transform.Source)

Aggregations

Response (jakarta.xml.ws.Response)11 Dispatch (jakarta.xml.ws.Dispatch)9 JAXBContext (jakarta.xml.bind.JAXBContext)7 StreamSource (javax.xml.transform.stream.StreamSource)4 JAXBException (jakarta.xml.bind.JAXBException)2 WebServiceException (jakarta.xml.ws.WebServiceException)2 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)2 MalformedURLException (java.net.MalformedURLException)2 Iterator (java.util.Iterator)2 DOMSource (javax.xml.transform.dom.DOMSource)2 SAXSource (javax.xml.transform.sax.SAXSource)2 InputSource (org.xml.sax.InputSource)2 SOAPTestHandler (async.wsdl_hello_lit.client.handlers.SOAPTestHandler)1 AsyncHandler (jakarta.xml.ws.AsyncHandler)1 URISyntaxException (java.net.URISyntaxException)1 ExecutionException (java.util.concurrent.ExecutionException)1 Source (javax.xml.transform.Source)1