comment added

On Wed, May 27, 2015 at 11:05 AM, Shakila Sivagnanarajah <[email protected]>
wrote:

> Hi Malaka,
>
> Please find the pull request [1].
>
> [1] https://github.com/wso2/wso2-synapse/pull/212/
>
> On Tue, May 26, 2015 at 11:08 AM, Malaka Silva <[email protected]> wrote:
>
>> Hi Shakila,
>>
>> I have reviewed your fix.
>>
>> msgContext.getProperty(PassThroughConstants.FAULTS_AS_HTTP_200).
>> toString().toUpperCase());
>>
>> we need to check
>> msgContext.getProperty(PassThroughConstants.FAULTS_AS_HTTP_200) for null.
>>
>> I think this may throw nullpointer exception if the FAULTS_AS_HTTP_200
>> property is not set?
>>
>> On Tue, May 26, 2015 at 10:43 AM, Shakila Sivagnanarajah <
>> [email protected]> wrote:
>>
>>> Hi Malaka,
>>>
>>> The FAULTS_AS_HTTP_200 property is working fine with the sample [2] with
>>> a minor modification [3]. And one mistake in the sample given in the JIRA
>>> ticket [1]. It doesn't has FAULTS_AS_HTTP_200 property in inSequence. Find
>>> the issue [1].
>>>
>>> [1] https://wso2.org/jira/browse/ESBJAVA-3384
>>> [2]
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <definitions xmlns="http://ws.apache.org/ns/synapse";>
>>>    <proxy xmlns="http://ws.apache.org/ns/synapse"; name="Faultproxy"
>>>           transports="https http"
>>>           startOnLoad="true"
>>>           trace="disable">
>>>       <description/>
>>>       <target>
>>>          <inSequence>
>>>             <makefault version="soap11">
>>>                <code xmlns:soap11Env="
>>> http://schemas.xmlsoap.org/soap/envelope/";
>>>                      value="soap11Env:VersionMismatch"/>
>>>                <reason value="500"/>
>>>                <role/>
>>>             </makefault>
>>>          <property name="FAULTS_AS_HTTP_200" value="true"
>>> scope="axis2"/>
>>>             <respond/>
>>>          </inSequence>
>>>       </target>
>>>    </proxy>
>>>    <proxy xmlns="http://ws.apache.org/ns/synapse";
>>>  name="Axis2ProxyService"
>>>           transports="https http"
>>>           startOnLoad="true"
>>>           trace="disable">
>>>       <description/>
>>>       <target>
>>>          <inSequence>
>>>             <send>
>>>                <endpoint key="Axis2EP"/>
>>>             </send>
>>>          </inSequence>
>>>          <outSequence>
>>>          <property name="FAULTS_AS_HTTP_200" value="true" scope="axis2"/>
>>>             <send/>
>>>          </outSequence>
>>>       </target>
>>>    </proxy>
>>>    <endpoint name="Axis2EP">
>>>       <address uri="http://localhost:8280/services/Faultproxy"/>
>>>    </endpoint>
>>>    <sequence name="fault">
>>>       <log level="full">
>>>          <property name="MESSAGE" value="Executing default
>>> &#34;fault&#34; sequence"/>
>>>          <property name="ERROR_CODE"
>>> expression="get-property('ERROR_CODE')"/>
>>>          <property name="ERROR_MESSAGE"
>>> expression="get-property('ERROR_MESSAGE')"/>
>>>       </log>
>>>       <drop/>
>>>    </sequence>
>>>    <sequence name="main">
>>>       <log/>
>>>       <drop/>
>>>    </sequence>
>>> </definitions>
>>>
>>> [3] https://github.com/wso2/wso2-synapse/pull/207
>>>
>>>
>>> Thank you.
>>>
>>> On Tue, May 19, 2015 at 8:31 PM, Malaka Silva <[email protected]> wrote:
>>>
>>>> Hi Shakila,
>>>>
>>>> I don't think this will work if some one added the property mediator in
>>>> IN_FLOW. Also this sets the status to 200 always.
>>>>
>>>> Did you check a scenario where backend sends a status code other than
>>>> 200 or 500?
>>>>
>>>> Please check the code [1] and [2]. Check the
>>>> method determineHttpStatusCode(). I think fix should go there.
>>>>
>>>> Also above will fix for PTT. Same needs to be done for NHTTP as well.
>>>>
>>>> [1]
>>>> https://github.com/wso2/wso2-synapse/blob/master/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/util/PassThroughTransportUtils.java
>>>> [2]
>>>> https://github.com/wso2/wso2-synapse/blob/master/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/util/SourceResponseFactory.java
>>>>
>>>> On Tue, May 19, 2015 at 4:35 PM, Shakila Sivagnanarajah <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have fixed the issue ESBJAVA-3384. Please find the PR [1].
>>>>> [1] https://github.com/wso2/wso2-synapse/pull/199
>>>>>
>>>>> Thank you
>>>>>
>>>>> --
>>>>> Shakila Sivagnanarajah
>>>>> Associate Software Engineer
>>>>> Mobile :+94 (0) 770 760240
>>>>> [email protected]
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Best Regards,
>>>>
>>>> Malaka Silva
>>>> Senior Tech Lead
>>>> M: +94 777 219 791
>>>> Tel : 94 11 214 5345
>>>> Fax :94 11 2145300
>>>> Skype : malaka.sampath.silva
>>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>>> Blog : http://mrmalakasilva.blogspot.com/
>>>>
>>>> WSO2, Inc.
>>>> lean . enterprise . middleware
>>>> http://www.wso2.com/
>>>> http://www.wso2.com/about/team/malaka-silva/
>>>> <http://wso2.com/about/team/malaka-silva/>
>>>>
>>>> Save a tree -Conserve nature & Save the world for your future. Print
>>>> this email only if it is absolutely necessary.
>>>>
>>>
>>>
>>>
>>> --
>>> Shakila Sivagnanarajah
>>> Associate Software Engineer
>>> Mobile :+94 (0) 770 760240
>>> [email protected]
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Tech Lead
>> M: +94 777 219 791
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>> Skype : malaka.sampath.silva
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>> http://www.wso2.com/about/team/malaka-silva/
>> <http://wso2.com/about/team/malaka-silva/>
>>
>> Save a tree -Conserve nature & Save the world for your future. Print this
>> email only if it is absolutely necessary.
>>
>
>
>
> --
> Shakila Sivagnanarajah
> Associate Software Engineer
> Mobile :+94 (0) 770 760240
> [email protected]
>



-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>

Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to