Skip to content

Commit 57e9411

Browse files
authored
Update SOAP Fault transformation to use namespace references (#2857)
- Added explicit namespace handling (`s11`) for SOAP Fault detection in XPath expressions. - Introduced a shared `$ref` to include namespace configuration in the YAML tutorial.
1 parent 7a5893c commit 57e9411

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

distribution/tutorials/transformation/80-SOAP-Fault-Groovy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
# curl -v -H "Content-Type: application/json" -d @plum.json http://localhost:2000/products
1212
# curl -v -H "Content-Type: application/json" -d @plum.json http://localhost:2000/products -H "X-Mock-Mode: fault"
1313

14+
components:
15+
ns:
16+
xmlConfig:
17+
namespaces:
18+
- prefix: s11
19+
uri: http://schemas.xmlsoap.org/soap/envelope/
20+
21+
---
1422
api:
1523
name: Products API
1624
port: 2000
@@ -22,8 +30,9 @@ api:
2230
location: json-to-soap-request.groovy
2331
- response:
2432
- if:
25-
test: //*[local-name()='Fault']
33+
test: //s11:Fault
2634
language: XPath
35+
$ref: "#/components/ns"
2736
flow:
2837
- groovy:
2938
location: soap-fault-to-json.groovy

0 commit comments

Comments
 (0)