Skip to content

Commit 4bc8c00

Browse files
committed
fix: address SOAP statement review feedback
Symptom: the call web service doctype example used a skipped .test.mdl suffix, and the grammar/docs did not explain why structured SOAP references are quoted strings. Root cause: legacy SOAP support intentionally accepts both Module.Document text and raw dangling IDs, but that design choice was only implicit in examples. Fix: rename the doctype example to a checked .mdl fixture and document the STRING_LITERAL reference choice in the grammar, skill, proposal, and quick reference. Tests: ran make build, mxcli check on the doctype fixture, and make test.
1 parent 9f7c123 commit 4bc8c00

5 files changed

Lines changed: 16 additions & 5 deletions

File tree

.claude/skills/mendix/write-microflows.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,9 @@ for new integrations; this syntax exists mainly so existing projects can
736736
round-trip without dropping SOAP actions.
737737

738738
```mdl
739-
-- Structured form. DESCRIBE prefers Module.Document names when references are resolvable.
739+
-- Structured form. SOAP references are quoted strings by design: DESCRIBE
740+
-- prefers Module.Document names when references are resolvable, but raw IDs
741+
-- and legacy document names must also round-trip.
740742
$Root = call web service 'SampleSOAP.OrderService'
741743
operation 'FetchSampleItems'
742744
send mapping 'SampleSOAP.OrderRequest'

docs/01-project/MDL_QUICK_REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ authentication basic, session
228228
| Call nanoflow | `$Result = call nanoflow Module.Name (Param = $value);` | |
229229
| Call JS action | `$Result = call javascript action Module.Name (Param = $value);` | JavaScript action (nanoflow/microflow) |
230230
| Call Java action | `$Result = call java action Module.Name (Param = $value);` | Java action (microflow only) |
231-
| Call web service | `$Result = call web service 'Module.Service' operation 'OperationName';` | Legacy SOAP; unresolved dangling refs fall back to raw IDs |
231+
| Call web service | `$Result = call web service 'Module.Service' operation 'OperationName';` | Legacy SOAP; quoted refs preserve raw IDs and legacy names |
232232
| Call web service raw | `$Result = call web service raw 'base64-bson';` | Escape hatch for byte-for-byte legacy SOAP round-trip |
233233
| Show page | `show page Module.PageName ($Param = $value);` | Also accepts `(Param: $value)` |
234234
| Close page | `close page;` | |

docs/11-proposals/PROPOSAL_microflow_call_web_service_statement.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,18 @@ syntax covers them.
7575
- Builder/writer coverage for real `WebServiceCallAction` construction and raw
7676
BSON preservation.
7777
- Formatter coverage for qualified-name resolution and raw-ID fallback.
78-
- Example script: `mdl-examples/doctype-tests/call_web_service.test.mdl`.
78+
- Example script: `mdl-examples/doctype-tests/call_web_service.mdl`.
7979

8080
## Resolved Questions
8181

8282
- Service and mapping references are emitted as `Module.Document` names when
8383
the backend can resolve them. Raw IDs remain the fallback for dangling
8484
references and incomplete project metadata.
85+
- The structured syntax uses quoted strings for service and mapping references
86+
instead of `qualifiedName` tokens because legacy SOAP projects can contain
87+
raw IDs or document names that are not valid MDL identifiers. Resolved
88+
references should still be written as `Module.Document` text inside the
89+
string literal.
8590

8691
## Open Questions
8792

File renamed without changes.

mdl/grammar/MDLParser.g4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,8 +1490,12 @@ callJavaScriptActionStatement
14901490
: (VARIABLE EQUALS)? CALL JAVASCRIPT ACTION qualifiedName LPAREN callArgumentList? RPAREN onErrorClause?
14911491
;
14921492

1493-
// Legacy SOAP call. The preferred structured form uses Module.Document names;
1494-
// raw IDs remain accepted for dangling references and old round-trip output.
1493+
// Legacy SOAP call. The preferred structured form stores service and mapping
1494+
// references in STRING_LITERAL tokens rather than qualifiedName tokens because
1495+
// old projects can contain raw IDs or SOAP document names that are not valid
1496+
// MDL identifiers. DESCRIBE still prefers Module.Document text when references
1497+
// resolve; unresolved values pass through as strings. Raw BSON remains the
1498+
// escape hatch for unsupported SOAP payload details.
14951499
callWebServiceStatement
14961500
: (VARIABLE EQUALS)? CALL WEB SERVICE
14971501
(RAW STRING_LITERAL

0 commit comments

Comments
 (0)