Hello Li the biggest problem with a contract is you are bound to fixed record
doc-literal-encoded has been around for 7 years and has been deployed numerous times on numerous production sites Here is a good whitepaper to read on the advantages of doc-literal over RPC http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ also DOC-LITERAL (with encoding) is clearly the best choice for complex structures over any RPC based implementation ALSO rpc is using a remote procedure call to call the function with the parameters leaving a HUGE security hole in your webservice with the open port you are using to the RPC method AXIS2 is heavily favoring doc-literal over RPC for above stated reasons when you state ..it definitely worked under axis1 ..are you stating you must specify RPC over doc-literal? Is the use of RPC a stated business requirement? Martin Gainty ______________________________________________ please do not modify or disrupt this transmission. Thank You Date: Fri, 19 Feb 2010 09:15:03 -0500 Subject: Re: Axis2-1.5.1 and user exceptions From: lim...@gmail.com To: axis-user@ws.apache.org I have been puzzled by this issue for long time. Seams like at this point, using contract-first approach is the only solution for now. But it will still be very very helpful if something can be done so code-first approach can work too. Axis1 definitely worked. I can imagine lots of people are using code-first approach because of its simplicity. Thanks! Li On Fri, Feb 19, 2010 at 6:42 AM, Mauro Molinari <mauro.molin...@cardinis.com> wrote: Il 17/02/2010 3.53, glopezm ha scritto: Any thoughts/experiences with a similar issues with axis2? I use contract-first approach. My user exceptions extend Exception and have a field called faultMessage with getter getFaultMessage and setter setFaultMessage. The constructor prepares the faultMessage and sets it via setFaultMessage. The faultMessage is an object of a class generated by WSDL2Code from an XMLSchema type that describes my fault message, so that it implements ADBBean. In this way, when my code raises my user defined exception, Axis2 recognizes the existence of the fault message and attaches it correctly to the fault returned to the client code. This is the result of my trial-and-errors researches of some years ago with Axis2 1.3 and it is working with Axis2 1.5 too. I think that you may find something else in this mailing list archive by me on this subject. -- Mauro Molinari Software Designer & Developer E-mail: mauro.molin...@cardinis.com -- Li Ma lim...@gmail.com _________________________________________________________________ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. http://clk.atdmt.com/GBL/go/201469229/direct/01/