【问题标题】:TCP connection Behavior in SOAP/HTTP webservice implemented using Apache servicemix使用 Apache servicemix 实现的 SOAP/HTTP Web 服务中的 TCP 连接行为
【发布时间】:2018-09-29 06:35:54
【问题描述】:

我们已经使用 Apache Servicemix 5.1.0 版实现了 SOAP/HTTP Web 服务(端点如下)。

端点:

<cxf:cxfEndpoint id="SampleService"
    address="http://127.0.0.1:8081/Sample"
    endpointName="c:SoapPort" serviceName="c:SampleService" wsdlURL="wsdl/SampleService.wsdl"
    xmlns:c="http://sample.com/url"
    serviceClass="com.sample.common.SAXSourceService">
<cxf:properties>
    <entry key="ws-security.ut.validator" value-ref="PasswordHandler" />
    <entry key="ws-security.validate.token " value="false" />
</cxf:properties>
<cxf:features>
    <wsa:addressing addressingRequired="false"
            xmlns:wsa="http://cxf.apache.org/ws/addressing" />
</cxf:features>

Jetty 配置(我的假设是以下默认连接器适用于所有暴露的端点,如果我错了,请纠正我):

<Call name="addConnector">
    <Arg>
        <New class="org.eclipse.jetty.server.nio.BlockingChannelConnector">
            <Set name="host">
                <Property name="jetty.host" />
            </Set>
            <Set name="port">
                <Property name="jetty.port" default="8181"/>
            </Set>
            <Set name="maxIdleTime">300000</Set>
            <Set name="Acceptors">1</Set>
            <Set name="statsOn">false</Set>
            <Set name="confidentialPort">8443</Set>
        </New>
    </Arg>
</Call>

默认配置用于所有其他情况。

在这种情况下,当接收到同步 SOAP 请求并发送响应时,我们观察到 TCP [FIN] 立即从 Web 服务发送,但在这种情况下 maxIdleTime 的意义是什么: 300000 in jetty ?

【问题讨论】:

    标签: tcp apache-camel jetty cxf apache-servicemix


    【解决方案1】:

    您能否检查您的客户端是否将“Connection: Keep-Alive”标头发送到服务器?如果不是,则在将响应发送回客户端后,码头服务器关闭连接是有意义的。

    【讨论】:

    • 是的,你是对的。客户端发送“Connection: close”标头,这就是发送 [FIN] 信号的原因。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-12
    • 1970-01-01
    • 2018-04-21
    • 2019-06-21
    • 2015-05-06
    相关资源
    最近更新 更多