+1 .. but I'm a bit confused. I assume by "REST" you meant that the response has media type text/xml instead of application/soap+xml, right?

If we think about it that way, can we get rid of the "isDoingREST" flag??

(I've hated that from day 1 and haven't had a chance to really dig thru it and figure out how to get rid of. Maybe this is an opportunity to get it right ..)

Sanjiva.

keith chapman wrote:
Any input on this would be appreciated.

Thanks,
Keith.

On Thu, Sep 4, 2008 at 8:40 AM, keith chapman <[EMAIL PROTECTED]> wrote:
Hi devs,

This idea came up because of the following scenario.

Currently the logic for creating a AxisFault  for a fault received lies in org.apache.axis2.util.Utils.java (lines 507 - 530). This works perfectly when the received fault is SOAP or REST. But it does not work as expected when the response is JSON ( rather a exception is thrown saying "The MessageContext does not have an associated SOAPFault."). The reason is the logic we use to build the AxisFault. If the fault message is not a SOAP message we check for the flag messageContext.isDoingREST() and get the first element of the SOAPBody as the fault message.

When the fault message is JSON its neither SOAP and the messageContext.isDoingREST() returns false. Should we consider  JSON messages as REST messages? I believe so.

WDYT?

Thanks,
Keith.

--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org



--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to