This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes soapfaultexception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "soapfaultexception" Watch "soapfaultexception" New topic


gilbert engle

Joined: Jun 03, 2009
Posts: 24
[service side code]
QName faultCode = new QName("", "Server.Fault");
String faultString = "this is my fault";
String faultActor = "";
Detail faultDetail = SOAPFactory.newInstance().createDetail();

throw new SOAPFaultException(faultCode, faultString, faultActor, faultDetail); // exception with Details

SOAP message includes faultString but no details (AXIS2, Tomcat)

<soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>this is my fault</faultstring><detail /></soapenv:Fault></soapenv:Body>

faultCode at the client side is not what I specified in the service code. faultActor arrives as null. It seems that the use of SOAPFaultException does not work, except for the faultMessage, which you can specify with any thrown Exception from the service side

Any ideas as to what I am misunderstanding?

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: soapfaultexception
Similar Threads
throwing our own soap fault code
soap fault return empty <detail> element.
AxisFault: could not find deserializer for type ...
Axis problem
Soap Fault Implementation