DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Remove line break after XML declaration.

    Posted 08/24/21 09:30 AM

    Hi.

    Is there a way to remove the line break after XML declaration?

    Indata has no linebreak but even if I set Input=INPUT in the Result action DataPower adds a linebreak after the XML declaration.

    Is there a way to avoid that?

    I can't omit the XML declaration.

    The break messes with checksum calculation at back end. :)

    Regards

    Jocke D



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: Remove line break after XML declaration.
    Best Answer

    Posted 08/24/21 09:32 AM

    Addition:

    I want it to look like this:

    <?xml version="1.0" encoding="UTF-8"?> <Document xmlns:...

    Not:

    <?xml version="1.0" encoding="UTF-8"?>

    <Document xmlns:...



    #DataPower
    #Support
    #SupportMigration


  • 3.  RE: Remove line break after XML declaration.
    Best Answer

    Posted 08/25/21 10:13 AM

    I did find a solution.

    For all actions on the request rule I did set INPUT:NULL and OUTPUT: NULL

    Request Type: Non XML

    I had to use Gateway Script to set some headers and service variables, couldn't make it work with XSLT.



    #DataPower
    #Support
    #SupportMigration


  • 4.  RE: Remove line break after XML declaration.
    Best Answer

    Posted 10/06/21 01:35 PM

    While your request might be valid, it is a Non-XML request not backed by XML spec.

    Therefore you need Non-XML processing like GatewayScript to remove the newline eg. in a chained service.



    #DataPower
    #Support
    #SupportMigration