Forum Discussion

DavidH's avatar
DavidH
New Contributor
14 years ago

Problem Using Message Content Assertion with diff endpoints

It seems that the Message Content Assertion type sets the namespace to the current endpoint when the assertion is created which means the assertion fails against any other endpoint. Is there a way to use the Message Content Assertion so that RESTful APIs can be tested on multiple endpoints?

7 Replies

  • Hi,

    this is an unfortunate limitation in how soapUI generates XML from REST (JSON) responses - it will use the endpoint of the service as the namespace, which results in what you are seeing - ie XPath-assertions that are tied to namespaces will fail when switching endpoints. Unfortunately for the MCA assertion there is currently no workaround - you would have to use standard XPath assertions instead which would allow you to either create namespace-agnostic XPath statements or use property-expansion for the namespace.

    Hope this helps!

    /Ole
    SmartBear Software
  • Just ran into this. Are there plan to address this limitation in the future?
  • Hi,

    yes - but unfortunately it hasn't been scheduled yet internally...

    How would you like to see this solved? By being able to add a fixed namespace for the generated XML at the Service level? Or request level?

    regards,

    /Ole
    SmartBear Software
  • Hi,
    Iam also having the same issues.I dont know what other options we have got.It seems like there are not much support for REST in soapui

    Regards
  • Hi!

    This is still and open issue for us (SOAPUI-2068) and currently there is not set date for fixing it.


    --
    Regards

    Erik
    SmartBear Sweden