soap header无法在spring soap端点解析

时间:2017-11-21 11:31:08

标签: java xml soap xsd

2017-11-21 09:58:59,947 ERROR c.e.s.c.f.k.s.p.Sample[sample-app-0.0.1-3675e4df-5e08-466e-98fe-c4f92d24df89-StreamThread-1] task [2_0] exception caught when producing org.apache.kafka.streams.errors.StreamsException: task [2_0] exception caught when producing
        at org.apache.kafka.streams.processor.internals.RecordCollectorImpl.checkForException(RecordCollectorImpl.java:136)
        at org.apache.kafka.streams.processor.internals.RecordCollectorImpl.flush(RecordCollectorImpl.java:144)
        at org.apache.kafka.streams.processor.internals.StreamTask.flushState(StreamTask.java:283)
        at org.apache.kafka.streams.processor.internals.StreamTask$1.run(StreamTask.java:264)
        at org.apache.kafka.streams.processor.internals.StreamsMetricsImpl.measureLatencyNs(StreamsMetricsImpl.java:187)
        at org.apache.kafka.streams.processor.internals.StreamTask.commitImpl(StreamTask.java:259)
        at org.apache.kafka.streams.processor.internals.StreamTask.commit(StreamTask.java:253)
        at org.apache.kafka.streams.processor.internals.StreamThread.commitOne(StreamThread.java:815)
        at org.apache.kafka.streams.processor.internals.StreamThread.access$2800(StreamThread.java:73)
        at org.apache.kafka.streams.processor.internals.StreamThread$2.apply(StreamThread.java:797)
        at org.apache.kafka.streams.processor.internals.StreamThread.performOnStreamTasks(StreamThread.java:1448)
        at org.apache.kafka.streams.processor.internals.StreamThread.commitAll(StreamThread.java:789)
        at org.apache.kafka.streams.processor.internals.StreamThread.maybeCommit(StreamThread.java:778)
        at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:567)
        at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:527)
Caused by: org.apache.kafka.common.errors.TimeoutException: Expiring 10 record(s) for sample-0: 31894 ms has passed since last append

当我在我的端点方法中处理请求标头时,它无法工作。但是当我设置一个小写字母时,就会工作。在身份验证。 以下是终点摘要:

<soapenv:Header> <auth:Authentication xmlns:auth="https://memorynotfound.com/security"> <auth:username>username</auth:username> <auth:password>password</auth:password> </auth:Authentication> </soapenv:Header>

1 个答案:

答案 0 :(得分:0)

只需在标题类的顶部添加以下代码段@annotation即可。希望它有所帮助

@XmlRootElement(namespace = "http://www.gooogle.com", name = "Authentication")
public class Authentication{
.....
}