none
Issue with Biztalk 2016 Json send pipeline RRS feed

  • Question

  • Hi All ,

    I am getting issue in Biztalk Json send pipeline while converting data from xml to Json, when executing the same code in Biztalk 2013 R2 there is no error .

    Error description as below 

    There was a failure executing the send pipeline: "xxx" Source: "JSON encoder" Send Port: "xxx" URI: "http://localhost/" Reason: Unable to cast object of type 'System.Xml.Schema.XmlSchemaSimpleType' to type 'System.Xml.Schema.XmlSchemaComplexType'.

    Any suggestions i am sure that the NewtonSoft version has been changed /updated in Biztalk 2016 platform .

    Regards,
    Navin



    Navin Jaiswal

    Monday, August 6, 2018 12:08 AM

All replies

  • Looks like a schema has changed?

    The problem is the same as if you are casting a string to an integer, the two types are incompatible

    XmlSchemaSimpleType <> XmlSchemaComplexType

    /Peter


    When asking a question please be as thoroughly as possible this will make it easier to assist you http://www.catb.org/esr/faqs/smart-questions.html

    Monday, August 6, 2018 6:38 AM
  • Hi Peter ,

    except  the platform nothing got changed in Biztalk 2016 but we are getting error in 2016 platform , But same code is working fine on BT2013.

    Regards,
    Navin


    Navin Jaiswal

    Monday, August 6, 2018 12:18 PM
  • The two types are not compatible
    Please check the schemas

    Quite possible the latest version has a stronger type check than BTS 2013

    If you need to change from simple type to complex type create add a record to then schema and set base data type
    Complex types can have attributes which simple types can't

    /Peter


    When asking a question please be as thoroughly as possible this will make it easier to assist you http://www.catb.org/esr/faqs/smart-questions.html

    Monday, August 6, 2018 12:28 PM
  • I had also many problems when using json in send port.

    I suggest watching some youtube videos if they help you.

    check this:

    https://www.youtube.com/watch?v=VFekXaKYJxw

    perhaps we have to redesign your schemas.


    Christos Giannoukos

    Tuesday, August 7, 2018 10:23 AM
  • Hi Navin,

    I've just encountered the same problem. Flow working perfectly in BTS2013 but fails in BTS2016 with the error message you provided.

    After some testing I found out that the JSON encoder doesn't like XML namespaces that don't end with a "/"
    When I edit my message and put a "/" at the end of my XML namespace, all works fine again.

    Kind regards

    Thursday, December 13, 2018 2:11 PM