Hi All,

Since this is a blocker to our dropbox connector download method. I'm
removing "<jsonObject/> "by adding below lines of code to detach the
element before sending the request[1] and method work as expected[2]. is
this ok?

<script language="js">
    <![CDATA[
        mc.getEnvelope().getBody().getFirstElement().detach();
    ]]>
</script>

[1]
https://github.com/wso2-extensions/esb-connector-dropbox/blob/master/src/main/resources/operation/download.xml#L25
[2]
https://www.dropbox.com/developers/documentation/http/documentation#files-download



On Mon, Nov 7, 2016 at 12:08 PM, Keerthika Mahendralingam <
keerth...@wso2.com> wrote:

> Since it is a blocker for us I have created a JIRA ticket[1] for this.
>
>
> [1]. https://wso2.org/jira/browse/ESBJAVA-4946
>
> Thanks,
>
> On Fri, Nov 4, 2016 at 1:20 PM, Malaka Silva <mal...@wso2.com> wrote:
>
>> It seems to me we may not be able to do this use case for post requests
>> with empty content.
>>
>> @ESB Team - Let us know if there is a way to handle this?
>>
>> On Wed, Nov 2, 2016 at 5:36 PM, Keerthika Mahendralingam <
>> keerth...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> Dropbox backend service expecting a POST request with empty body and
>>> without Content-Type header for download method[1].
>>>
>>> I am unable to remove the Content-Type header from the request. Is there
>>> any way to do this?
>>>
>>> I tried with the following:
>>> <header name="Content-Type" scope="transport" action="remove"/>
>>> It is working for GET methods but not for POST one.
>>>
>>> If I use <property name="messageType" scope="axis2" value=""/>, content
>>> type is set as null but it is sending "<jsonObject/>" in the body.
>>>
>>> Please find the configuration I used:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <proxy xmlns="http://ws.apache.org/ns/synapse";
>>>        name="testProxy"
>>>        startOnLoad="true"
>>>        statistics="disable"
>>>        trace="disable"
>>>        transports="https,http">
>>>    <target>
>>>       <inSequence>
>>>           <payloadFactory media-type="json">
>>>               <format></format>
>>>               <args></args>
>>>           </payloadFactory>
>>>           <property name="messageType" 
>>> value="application/x-www-form-urlencoded"
>>> scope="axis2"></property>
>>>           <property name="FORCE_POST_PUT_NOBODY" value="true"
>>> scope="axis2" type="BOOLEAN"></property>
>>>           <call>
>>>               <endpoint>
>>>                     <http method="post" uri-template="https://content.
>>> dropboxapi.com/2/files/download"/>
>>>               </endpoint>
>>>          </call>
>>>       </inSequence>
>>>    </target>
>>>    <description/>
>>> </proxy>
>>>
>>> [1]. https://www.dropbox.com/developers/documentation/http/d
>>> ocumentation#files-download
>>>
>>> Thanks,
>>> --
>>> <dev-requ...@wso2.org>
>>> Keerthika Mahendralingam
>>> Software Engineer
>>> Mobile :+94 (0) 776 121144
>>> keerth...@wso2.com
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Technical 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
>> https://wso2.com/signature
>> http://www.wso2.com/about/team/malaka-silva/
>> <http://wso2.com/about/team/malaka-silva/>
>> https://store.wso2.com/store/
>>
>> Don't make Trees rare, we should keep them with care
>>
>
>
>
> --
> <dev-requ...@wso2.org>
> Keerthika Mahendralingam
> Software Engineer
> Mobile :+94 (0) 776 121144 <+94%2077%20612%201144>
> keerth...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thank you
Best Regards

*Rajjaz HM*
Software Engineer
Platform Extension Team
WSO2 Inc. <http://wso2.com/>
lean | enterprise | middleware
Mobile | +94752833834|+94777226874
Email   | raj...@wso2.com
LinkedIn <https://lk.linkedin.com/in/hmohammedrajjaz> | Blogger
<http://rajjazhm.blogspot.com/> | WSO2 Profile
<http://wso2.com/about/team/mohammer-rajjaz/>
[image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to