使用ApacheServiceMix实现SOAP/HTTP Web服务中的TCP连接行为
我们已经使用ApacheServiceMix版本5.1.0实现了一个SOAP/HTTPWeb服务(端点如下所示) 终点:使用ApacheServiceMix实现SOAP/HTTP Web服务中的TCP连接行为,tcp,apache-camel,jetty,cxf,apache-servicemix,Tcp,Apache Camel,Jetty,Cxf,Apache Servicemix,我们已经使用ApacheServiceMix版本5.1.0实现了一个SOAP/HTTPWeb服务(端点如下所示) 终点: <cxf:cxfEndpoint id="SampleService" address="http://127.0.0.1:8081/Sample" endpointName="c:SoapPort" serviceName="c:SampleService" wsdlURL="wsdl/SampleService.wsdl" xmlns:c="
<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配置(我假设下面的默认连接器适用于所有暴露的端点,如果我错了请更正):
300000
1.
假的
8443
默认配置用于所有其他情况
在本例中,当接收到同步SOAP请求并发送响应时,我们观察到TCP[FIN]立即从web服务发送,但在本例中,jetty中maxIdleTime:300000的意义是什么 您能否检查您的客户端是否将“连接:保持活动”头发送到服务器?如果没有,则在将响应发送回客户端后,jetty服务器关闭连接是有意义的。是的,您是正确的。客户端发送一个“Connection:close”头,这就是发送[FIN]信号的原因。
<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>