spring soap端点中未解析java soap头
<soapenv:Header>
<auth:Authentication xmlns:auth="https://memorynotfound.com/security">
<auth:username>username</auth:username>
<auth:password>password</auth:password>
</auth:Authentication>
</soapenv:Header>
当我在端点方法中处理请求头时,它无法工作。但当我在身份验证中设置小写字母“a”时工作。 以下是结束点片段:
@RequestPayload GetStudentRequest request, @SoapHeader("{" + Authentication.AUTH_NS + "}authentication") SoapHeaderElement auth
# 1 楼答案
只需在header类的顶部添加以下代码段
@annotation
值。希望有帮助