← Back to Pull requests

Explain why LoggingSOAPHandler calls getMessage() #510

Closed
unknown closed this pull request without merging on Oct 31, 2026 04:27 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 14:19 UTC
Author

LoggingSOAPHandler.handleMessage() calls smc.getMessage() and ignores the result, so the call looks safe to remove. It isn't. In the JAX-WS RI, getMessage() converts the message to an in-memory SAAJ copy, and once the handler chain finishes, that copy replaces the original message. Two behaviors depend on this.

Converting to SAAJ parses the entire request. Without the call, JAX-WS reads only as far as it needs to bind the parameters, so a request with malformed XML after the payload element is processed and answered with 200 instead of being rejected with a fault. Comparing the call present and removed on JDK 17:

  • unclosed element after the payload: 500 / 200

  • mismatched tags after the payload: 500 / 200

  • markup after </Envelope>: 500 / 200

  • truncated right after the payload: 500 / 500

  • valid request: 200 / 200
  • Responses are serialized from the SAAJ copy. Without the call, every response would lose the empty SOAP-ENV:Header, the extra xmlns:SOAP-ENV declaration and the xmlns="" on the return element. The XML means the same thing, but clients that compare raw text would see a difference.

    The channel receives the same payload from a valid request either way, and mustUnderstand faults and faults raised by the service are unchanged, because handleFault() doesn't call getMessage().

    Removing the call would save building a DOM for each request and response. But keeping the current strictness would need another full parse, which gives most of that saving back.

    Found while looking into #509.

    Assisted-by: Claude:claude-opus-5-5

    Diff: 194 lines (+145 / -49) across 2 files Reviewer: pacmano1 Review duration: 10927m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 194 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.315
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #510"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36% (MEDIUM) · Higher = larger blast radius
    36%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.2% · Safe to merge
    14.2%