none
How to customize the output in biztalk server 2013 R2 RRS feed

  • Question

  • Hi ,

    I want to customize my json output based the requirement.can i do this using map?


    __________________________________________________

    Regards,

    Rajeshwari


    Tuesday, June 21, 2016 12:32 PM

Answers

  • Hi Rajeshwari

    1. In your output XML schema that is going as response to the client can you change the Person_Id and Employee_Id field types from xs:string to xs:integer and check ? Hopefully, it will be serialized without quotes by the JSONEncoder. To do this, select the field in schema editor in Visual Studio, and from properties page, you can change the element type-

    2. For the 2nd requirement, you have to handle this within BizTalk in a map before sending the response to the port. Check the Error_Code field in the map, and based on 0 or 1 value, map Error_Msg to "Login Success" or "Login Failed". You have to use a Equals functoid along with Value Mapping functoids to achieve this. Refer below link on how to use Value Mapping functoids to do conditional field mapping-

    http://www.nullskull.com/a/1437/biztalk-incorporating-conditional-if--else-functoid-logic-in-a-map.aspx


    Thanks Arindam




    Tuesday, June 21, 2016 12:40 PM
    Moderator

All replies

  • Hi Rajeshwari

    1. In your output XML schema that is going as response to the client can you change the Person_Id and Employee_Id field types from xs:string to xs:integer and check ? Hopefully, it will be serialized without quotes by the JSONEncoder. To do this, select the field in schema editor in Visual Studio, and from properties page, you can change the element type-

    2. For the 2nd requirement, you have to handle this within BizTalk in a map before sending the response to the port. Check the Error_Code field in the map, and based on 0 or 1 value, map Error_Msg to "Login Success" or "Login Failed". You have to use a Equals functoid along with Value Mapping functoids to achieve this. Refer below link on how to use Value Mapping functoids to do conditional field mapping-

    http://www.nullskull.com/a/1437/biztalk-incorporating-conditional-if--else-functoid-logic-in-a-map.aspx


    Thanks Arindam




    Tuesday, June 21, 2016 12:40 PM
    Moderator
  • Hi Rajeshwari,

    Yes, Arindam is right here.

    - Change the data type to Int or Integer.

    - In your BizTalk mapping, you need to handle or apply all the logic, send the message to send port haveing JSON Encoder.

    Try, Let us know if you face any issues.

    Thanks, SMSVikasK

    Tuesday, June 21, 2016 2:12 PM