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
Expand all | Collapse all

Remove line break after XML declaration.

  • 1.  Remove line break after XML declaration.

    Posted Tue August 24, 2021 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 Tue August 24, 2021 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 Wed August 25, 2021 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 Wed October 06, 2021 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