-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I hope I am not late to answer this email.
Saminda Abeyruwan wrote:
> 1. protected MessageContext
> createAndSetInitialParamsToMsgCtxt(HttpServletResponse resp,
> HttpServletRequest req) throws
> AxisFault { ...}
>
> and
>
> protected MessageContext createMessageContext(HttpServletRequest req,
> HttpServletResponse
> resp) throws IOException {..}
>
> apparently above methods will do the same thing; but prior use in POST
> request and later use in GET request. Why? one method would be more than
> enough for the most cases.
+1 for refactoring. I think it was me who introduced the second method,
but didn't remove the other.
>
> 2. For a RESTFul invocation; it uses RESTUtil class. But to process a
> SOAP request it uses inline code [line 268 - 341] [doPost()]. There also
> exist an SOAPUtil (org.apache.axis2.transport.http.util.SOAPUtil) for
> processing SOAP request. But no one uses it. The worst scenario is;
> SOAPUtil has code for processing SOAP request but no one cares of
> updating the code when ever they change the code in doPost(). IMHO this
> is really bad and either we should move the logic to SOAPUtil and use it
> or just remove the obsolete class. But IMHO we should move the code to
> SOAPUtil and use that class instead. If some listener developer wants
> it; one could easily use it.
This is bit tricky. I also wanted to do the same but if you do that the
fault handling become chaotic in the AxisServlet. Once Azeez asked for
this and I was trying to do it, but have to give it up because of fault
handling problem.
I can not remember the exact details, but if you want I can dig in to
the code and see.
So I'm +1 to remove the SOAPUtil class. For the time being, I just
marked this class as deprecated. ( I think I can guess why you want to
keep this SOAPUtil class ;) )
>
> 3. It is apparent that most of the parts of the doPost(); doGet();
> doPut() and doDelete() are some. Most of the time code repeat itself.
> This is not good either in code "close for modification" or "open for
> extension". Should have moved to a util methods and reuse it.
+1
>
> 4. Same goes to handleFault methods as well.
What is the problem with this method? I'm sorry I can not understand it.
- -- Chinthaka
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF1+jYjON2uBzUhh8RAnR+AJ9FOAo+sV6AQL//69buQwO1b8TJuQCgkHXy
/FWhB9VrDoLg+O6LWYmQe9E=
=Gzr4
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]