AnsweredAssumed Answered

validate full soap request against wsdl (with multiple schemas)

Question asked by res13 on May 16, 2017
Latest reply on May 24, 2017 by res13



I am looking for a generic way to validate all soap requests against the corresponding wsdl on the API Gateway.


Of course, the assertion 'Validate XML Schema' should do this, but it only works with wsdls having one schema inside. As soon as there are multiple schemas inside the wsdl which refer each other and have imports from external xsd files on top, this assertion cannot handle it, because only one schema can be selected.


I am aware of the fact, that I could write my own xsd file for each wsdl by hand, but with more than 100 soap services which are updated almost weekly, this is not a good idea.


Therefore, I tried to write an encapsulated assertion which should be called in each soap service and does the following:

  1. obtain the corresponding wsdl and its dependencies with the ${service.oid} --> No problem
  2. extract all internal and external schemas with xslt and flatten it to one xsd --> Difficult to implement (I am not an xslt pro)
  3. validate the incoming soap request against this xsd --> This is also impossible with the 'Validate XML Schema' assertion, because it only takes manually tiped in xsd and no context variables


So is my aproach the right one? And if so, how can I make it work?


Thanks and regards,