Search in sources :

Example 96 with Dispatch

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

the class ClientTest method testResponseContext4.

public void testResponseContext4() throws Exception {
    Dispatch dispatch = createDispatchJAXB();
    assertNull(dispatch.getResponseContext());
}
Also used : Dispatch(jakarta.xml.ws.Dispatch)

Example 97 with Dispatch

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

the class ClientTest method testResponseContext3.

public void testResponseContext3() throws Exception {
    Dispatch dispatch = createDispatchJAXB();
    try {
        Hello_Type req = new Hello_Type();
        req.setArgument("foo");
        req.setExtra("bar");
        dispatch.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, helloPortAddress.toString());
        dispatch.invoke(req);
    } catch (Exception e) {
        Map rc = dispatch.getResponseContext();
        assertEquals(200, rc.get(jakarta.xml.ws.handler.MessageContext.HTTP_RESPONSE_CODE));
    }
}
Also used : Dispatch(jakarta.xml.ws.Dispatch) Map(java.util.Map) JAXBException(jakarta.xml.bind.JAXBException)

Aggregations

Dispatch (jakarta.xml.ws.Dispatch)97 WebServiceException (jakarta.xml.ws.WebServiceException)41 Source (javax.xml.transform.Source)32 JAXBContext (jakarta.xml.bind.JAXBContext)30 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)27 MalformedURLException (java.net.MalformedURLException)24 JAXBException (jakarta.xml.bind.JAXBException)22 StreamSource (javax.xml.transform.stream.StreamSource)18 Service (jakarta.xml.ws.Service)16 DOMSource (javax.xml.transform.dom.DOMSource)13 SAXSource (javax.xml.transform.sax.SAXSource)13 InputSource (org.xml.sax.InputSource)13 SOAPMessage (jakarta.xml.soap.SOAPMessage)10 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)10 SAXException (org.xml.sax.SAXException)10 Response (jakarta.xml.ws.Response)9 Iterator (java.util.Iterator)8 URISyntaxException (java.net.URISyntaxException)7 WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)6 WSBindingProvider (com.sun.xml.ws.developer.WSBindingProvider)6