JAX-WS: when input soap validation fails
- by Jakob
I have created a web service with JAX-WS. When the input SOAP message is not well formed or can not be validated, a soap fault is returned automatically to the caller. I dont want the caller to receive this standard SOAP message but i want to create an own custom SOAP fault.
So if the call looks like this (note Envelope1, its not valid):
hello
a default return message is something like this:
S:Client
Couldn't create SOAP message due to exception: unexpected XML tag. expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/soap/envelope/}Envelope1
I want the return message to be something like this:
S:Client
My own custom SOAP message!
I have tried to get this to work the whole day, but i cant figure out how to do it. So if someone could help me I would be really glad!