Gateway GMU migrateIn error: "HTTP 400 Bad Request"

book

Article ID: 131343

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction

  • When running a GMU migrateIn command, the test it runs before doing the actual migration may end up with this output:
    • Test migrate in failed: Bad Request HTTP 400 Bad Request. Caused by: cvc-complex-type.2.4.a: Invalid content was found starting with element 'l7:Writable'. One of '{"http://ns.l7tech.com/2010/04/gateway-management":Extension, WC[##other:"http://ns.l7tech.com/2010/04/gateway-management"], "http://ns.l7tech.com/2010/04/gateway-management":SourceType, "http://ns.l7tech.com/2010/04/gateway-management":ServerUrls}' is expected.

Cause

  • This is most often seen caused by running an out-of-date GMU for the target version of Gateway.
    • For example, if running the GMU that came with Gateway 9.2 while trying to migrate data from that 9.2 environment to a new 9.4 environment, the above behaviour may be observed, especially if there were changes to the way Restman works as the expected XML format then changes and the older GMU tool will not account for those newer changes.

Environment

  • Any Gateway version with the Restman service deployed for GMU usage.

Resolution

  • It is considered best practice to always run the GMU that came with the latest version of API Gateway being run in the environment. So if the latest version of Gateway in the environment is 9.4, then the GMU that was included with 9.4 should be used rather than any older versions of GMU.
  • Using the latest GMU will often be the resolution, as it will account for backwards compatibility with older Gateway versions and also recognize the latest changes and updates in the newest Gateway version, thus is able to talk between versions when the source and target Gateway versions do not match.