Forum Discussion

Westpac_Banking's avatar
Westpac_Banking
Occasional Contributor
13 years ago

[Resolved] Assertion - Ignore namespace prefixes

Is Ignore namespace prefixes does not ignore the namespaces prefixes in xsi type?

Example:
Assertion:
<svc:paymentInstruction xsi:type="v11:PaymentInstruction">

Actual service Output:
<svc:paymentInstruction xsi:type="io5:PaymentInstruction">

I have checked the ignore the namespaces prefixes check-box.
Even then I am getting an error in assertion "Expected attribute value 'v11:PaymentInstructionGroup' but was 'io5:PaymentInstruction'".

Could you please suggest.

4 Replies

  • Well in the example you posted the it's not just the name space prefixes which are different:
    v11:PaymentInstructionGroup
    io5:PaymentInstruction

    Looks like you need to change the test (or the test was correct to fail)?
  • Westpac_Banking's avatar
    Westpac_Banking
    Occasional Contributor
    Sorry for the typo error. Below is the actual error which I am getting.

    "Expected attribute value 'v11:PaymentInstruction' but was 'io5:PaymentInstruction'"
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    the "Ignore Namespace Prefixes" option will not fail the assertion if the defined prefixes are different - as long as the actual namespace are still the same. In your case maybe you could check the "Wildcards" option and specify a * in the expected response for this attribute value?

    regards!

    /Ole
    SmartBear Software
  • Westpac_Banking's avatar
    Westpac_Banking
    Occasional Contributor
    Hi Ole,
    Ignore Namespace prefix is not helping out. But wildcard "*" helped out to ignore that.
    Thankyou for your support.

    Udhaya