Return-Path: Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 93418 invoked by uid 500); 14 Jul 2003 17:17:24 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 93403 invoked from network); 14 Jul 2003 17:17:23 -0000 Date: 14 Jul 2003 17:19:55 -0000 Message-ID: <20030714171955.29936.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: axis-dev@ws.apache.org Cc: Subject: DO NOT REPLY [Bug 21578] New: - Message Style Service and Exception Handling X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21578 Message Style Service and Exception Handling Summary: Message Style Service and Exception Handling Product: Axis Version: 1.1 Platform: PC OS/Version: Windows XP Status: NEW Severity: Major Priority: Other Component: Deployment / Registries AssignedTo: axis-dev@ws.apache.org ReportedBy: pabreja@infigroup.com Hello Everyone, I have a MessageStyle service which has the following signatures: Document sendData(Document doc) throws RemoteException{} Everything works fine till I get an exception: I wrote a method like this where I access the SOAPBody on the server side and set the faultString and errorCode and return it to the client. public static RemoteException setSOAPFaultElement(Exception ex) throws RemoteException{ try{ javax.xml.soap.SOAPBody sb1 = null; sb1 = MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnv elope().getBody(); System.out.println(sb1.getClass()); javax.xml.soap.SOAPFault fault = sb1.addFault(); fault.setFaultString("Exception " + ex.toString()); System.out.println(fault.getFaultString()); fault.setFaultCode("Server"); System.out.println("Exception is being set in the fault body"); return new RemoteException(ex.toString()); }catch(SOAPException e){ throw new RemoteException(ex.toString()); } } But on the client side when I get an exception and in the Exception block I try to access the exception from the SOAPBody object I get a NullPointerExcption and the SOAPBody is empty. Then probing further I turned on the SOAPMonitor and discovered that the there was no response message in cases where there is exception. Looks like in case of message style service there are no capabilities to generate SOAPFault which is actually a MUST element by w3c in case of a exception. As said by dims I am opening this bugzilla report and I hope we will be able to have a solution for the same. Thanx in advance. Bhanu Pabreja.