From 16312b236db3a67fb5499494002a7f07fa0bcffa Mon Sep 17 00:00:00 2001 From: Sebastian Norling <1932208+Bazze@users.noreply.github.com> Date: Wed, 27 May 2026 18:07:57 +0200 Subject: [PATCH] docs: fix WS-Addressing spec citations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reference-parameter-to-SOAP-header mapping rule (with the wsa:IsReferenceParameter='true' attribute) lives in WS-Addressing 1.0 SOAP Binding §3.4 (Binding Message Addressing Properties), not Core §3.1 (Abstract Property Definitions). The earlier citations were wrong on both the section number and the document. Corrected across doc comments, test descriptions, and the PR description. The "ReferenceParameters can appear in any endpoint reference" claim in the anchored-extraction test now cites Core §2.1 (Information Model for Endpoint References), which is where the [reference parameters] property is defined on the abstract EPR. Verified against the W3C Recommendations: - https://www.w3.org/TR/ws-addr-core/ §2.1 - https://www.w3.org/TR/ws-addr-soap/ §3.4 Also adds PR_event_stream_axis_compat.md — the branch's PR description, framed independently of the prior event/stream PR. --- Device_test.go | 2 +- event/stream/soap.go | 2 +- event/stream/soap_test.go | 8 ++++---- gosoap/soap-builder.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Device_test.go b/Device_test.go index 74bf502..8645791 100644 --- a/Device_test.go +++ b/Device_test.go @@ -72,7 +72,7 @@ func TestDevice_SendSoapWithHeader_InjectsHeaderXML(t *testing.T) { "body content must land inside SOAP ") } -// Per WS-Addressing 1.0 §3.1 every reference parameter is a separate +// Per WS-Addressing 1.0 SOAP Binding §3.4 every reference parameter is a separate // SOAP Header block. Vendors that declare two ref params would silently // produce a header-less request if the implementation only accepts a // single top-level element. diff --git a/event/stream/soap.go b/event/stream/soap.go index d8a1e7f..105fef6 100644 --- a/event/stream/soap.go +++ b/event/stream/soap.go @@ -295,7 +295,7 @@ func inheritXmlns(dst, src *etree.Element) { // extractReferenceParameters returns the verbatim inner XML so callers // can echo it (with wsa:IsReferenceParameter="true") into the SOAP -// Header of subscription-scoped requests per WS-Addressing 1.0 §3.1. +// Header of subscription-scoped requests per WS-Addressing 1.0 SOAP Binding §3.4. // Without that echo, AXIS rejects PullMessages with ter:InvalidArgs. func extractReferenceParameters(body string) string { sub := subscriptionRefRE.FindStringSubmatch(body) diff --git a/event/stream/soap_test.go b/event/stream/soap_test.go index 153e2c1..ae8de38 100644 --- a/event/stream/soap_test.go +++ b/event/stream/soap_test.go @@ -226,7 +226,7 @@ func TestUnsubscribePullPoint_EnrichesTransportErrWithFaultReason(t *testing.T) "unsubscribePullPoint must enrich transport errors with the camera's SOAP fault") } -// --- ReferenceParameters extraction (WS-Addressing 1.0 §3.1) --------- +// --- ReferenceParameters extraction (WS-Addressing 1.0 SOAP Binding §3.4) --------- // // AXIS encodes the subscription identity in // inside CreatePullPointSubscriptionResponse rather than in the URL @@ -307,7 +307,7 @@ func TestCreatePullPoint_VendorWithoutRefParams_RefParamsEmpty(t *testing.T) { // --- Reference-parameter echoing in subscription-scoped calls -------- // -// WS-Addressing 1.0 §3.1 requires each child +// WS-Addressing 1.0 SOAP Binding §3.4 requires each child // to be echoed as a SOAP Header block carrying wsa:IsReferenceParameter // ="true". AXIS rejects PullMessages with ter:InvalidArgs when this is // absent. @@ -325,7 +325,7 @@ func TestPullMessages_EchoesRefParamsWithIsReferenceParameterAttribute(t *testin assert.Contains(t, hdr, "SubscriptionId", "ref param element must be echoed") assert.Contains(t, hdr, "297", "ref param value must be echoed") assert.Contains(t, hdr, `IsReferenceParameter="true"`, - "WS-Addressing 1.0 §3.1 requires the attribute on each echoed element") + "WS-Addressing 1.0 SOAP Binding §3.4 requires the attribute on each echoed element") } func TestPullMessages_NoRefParams_HeaderEmpty(t *testing.T) { @@ -458,7 +458,7 @@ func TestExtractSOAPFault_FallsBackToSubcodeWhenReasonEmpty(t *testing.T) { assert.Equal(t, "ter:InvalidArgs", extractSOAPFault(body)) } -// WS-Addressing §3.1 allows ReferenceParameters in any endpoint +// WS-Addressing 1.0 Core §2.1 allows ReferenceParameters in any endpoint // reference (wsa:From, wsa:ReplyTo, wsa:FaultTo, ...). An unanchored // search would silently pick up the wrong one. func TestExtractReferenceParameters_AnchoredToSubscriptionReference(t *testing.T) { diff --git a/gosoap/soap-builder.go b/gosoap/soap-builder.go index d86fc7f..e1edb03 100644 --- a/gosoap/soap-builder.go +++ b/gosoap/soap-builder.go @@ -166,7 +166,7 @@ func (msg *SoapMessage) AddStringHeaderContent(data string) error { // AddStringHeaderContents is the multi-root variant of // AddStringHeaderContent: it accepts any number of top-level sibling // elements (zero is an error) and appends each as its own SOAP Header -// child. Needed because WS-Addressing 1.0 §3.1 requires each +// child. Needed because WS-Addressing 1.0 SOAP Binding §3.4 requires each // reference parameter to be a separate Header block, but a Go XML // document only has one root. Comments and text outside elements are // silently dropped.