mirror of
https://github.com/kerberos-io/onvif.git
synced 2026-08-23 15:08:33 +00:00
docs: fix WS-Addressing spec citations
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.
This commit is contained in:
@@ -72,7 +72,7 @@ func TestDevice_SendSoapWithHeader_InjectsHeaderXML(t *testing.T) {
|
||||
"body content must land inside SOAP <Body>")
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 <wsa:ReferenceParameters>
|
||||
// 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 <wsa:ReferenceParameters> child
|
||||
// WS-Addressing 1.0 SOAP Binding §3.4 requires each <wsa:ReferenceParameters> 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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user