On Sun, Mar 30, 2014 at 6:31 PM, Vanjikumaran Sivajothy <[email protected]>wrote:

>
>
> On Sunday, March 30, 2014, Chanaka Fernando <[email protected]> wrote:
>
>> Hi Isuru,
>>
>> If that is the case, then that should be documented somewhere such that
>> users can understand that properly. Otherwise, most of the people getting
>> confused about these two properties.
>>
>> Thanks,
>> Chanaka
>>
>
> +1 Chanaka,
>
> yes there are serveral other properties out there with out proper
> documentation in detail and  comparation.
>
> When ever we encounter such a situation, we have to write down it and pass
> through the doc team. Else this kind a issue will be there.

+1.

@Chanaka,

Can you please do necessary modifications to make it clear.

Thanks.

>
>
>
>>
>>
>> On Sun, Mar 30, 2014 at 9:49 AM, Isuru Udana <[email protected]> wrote:
>>
>> Hi Chanaka,
>>
>>
>> On Sun, Mar 30, 2014 at 9:34 AM, Chanaka Fernando <[email protected]>wrote:
>>
>> Hi All,
>>
>> As per the ESB documentation, both messageType and ContentType properties
>> are used to select the messageFormatter. See the description section of the
>> properties below.
>>
>> messageType
>>
>>  Message formatter is selected based on this property. This property
>> should have the content type, such as text/xml, application/xml, or
>> application/json.
>>
>>
>> ContentType
>>
>>  This property will be in effect only if the messageType property is
>> set. If the messageType is set, the value of Content-Type HTTP header of
>> the outgoing request will be chosen based on this property. Note that, this
>> will be dependent on the Message Formatter implementation.
>>
>>
>> According to the above description, we are using the ContentType property
>> to set the Content-Type http header of the outgoing message. But this can
>> be achieved only through the messageType property itself. For example, In
>> the JSON documentation, we are using the messageType property to change the
>> Content-Type of the message from application/xml to application/json.
>>
>>
>> We could find a lot of samples where we use messageType property only for
>> this Content-Type conversion. With this capability of the messageType
>> property, do we really need the ContentType property anymore?
>>
>>
>> Yes. as given in the description, messageType is used to select the
>> MessageFormatter. Most of the message formatters set the Content-Type to
>> it's default Content-Type. But some message formatters has given an extra
>> flexibility to set a different Content-Type using the Content-Type property
>> which is totally depend on the MessageFormatter implementation.
>>
>>
>
> --
> Sent from Gmail Mobile
>



-- 
*Isuru Udana*
Senior
* Software Engineer*
WSO2 Inc.; http://wso2.com
email: [email protected] cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
twitter: http://twitter.com/isudana
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to