From 531b52955d80a600b096c090718f5c4ffd4d2a06 Mon Sep 17 00:00:00 2001 From: isc-pfp Date: Fri, 23 Sep 2022 15:27:51 +0200 Subject: [PATCH] improve namespace prefix evaluation logic This is probably still not perfect. However, sending a request with a prefixed root and un-prefixed child element to a web-service does _not_ work for me. And with this change, child elemnts are also prefixed, and the service call I am testing works now. I tested this by generating a request for a webservice I am working on and then submitting it, using a IntellIJ .http file that I generated using the SOARequestCreator.createRequest() util method. After this commit, the resulting request looks like this and works: 0 Before this commit, the resulting request looks like this and does not work - the service implementation code sees an empty list [] of "objectId"s instead of [1]: 0 FTR, the IntelliJ "request" in the test-service.http file I use, looks like this: POST http://localhost:12345/xyz/XyzV1 Content-Type: text/xml ... --- .../wstool/creator/RequestTemplateCreator.groovy | 5 ++++- .../groovy/com/predic8/schema/UnqualifiedTest.groovy | 10 +++++----- .../NamespacesInRequestTemplateCreatorTest.groovy | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/src/main/groovy/com/predic8/wstool/creator/RequestTemplateCreator.groovy b/core/src/main/groovy/com/predic8/wstool/creator/RequestTemplateCreator.groovy index 4a2ac6b2..ac201bf9 100755 --- a/core/src/main/groovy/com/predic8/wstool/creator/RequestTemplateCreator.groovy +++ b/core/src/main/groovy/com/predic8/wstool/creator/RequestTemplateCreator.groovy @@ -242,7 +242,10 @@ class RequestTemplateCreator extends AbstractSchemaCreator