scalaxb soap does not capture soap fault exceptions (HTTP 500 error) #204

dportabella opened this Issue Mar 21, 2013 · 2 comments


None yet

2 participants


Soap faults over HTTP must return a 500 response code with the fault:

with scalaxb:

val remote = new MyServicePortBindings with Soap11Clients with DispatchHttpClients {};
val result = remote.service.myFunction();
if (result.isLeft)
   throw new MyServiceException("");

we don't have a chance to throw the MyServiceException,
because the dispatchclient throws an exception that is not captured by scalaxb (and so scalaxb does not transform it to result.left).

16:14:46.996 [New I/O  worker #9] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider - Unexpected response status: 500
dispatch.StatusCode: Unexpected response status: 500
    at dispatch.OkHandler$class.onStatusReceived(handlers.scala:37) ~[dispatch-core_2.10-0.9.5.jar:0.9.5]
    at dispatch.OkFunctionHandler.onStatusReceived(handlers.scala:29) ~[dispatch-core_2.10-0.9.5.jar:0.9.5]
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.updateStatusAndInterrupt( [async-http-client-1.7.5.jar:na]

However, if a modify the webserver to return a fault exception with a 200 code (instead of the 500 error code),
than scalaxb transforms the fault exception to result.left.
(but, again, it should capture 500 error codes, as it is specified by the soap specification)


That's my bug in DispatchHttpClients.

val s = Http(req OK as.String)

This is filtering only to OK (200). I wonder if it works if you get rid of OK and just say val s = Http(req as.String).


correct, it works with:
val s = Http(req > as.String);


@eed3si9n eed3si9n closed this in 13046ac Mar 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment