NHibernate中是否有一种方法可以检查数据库中是否存在对象而无需获取/加载对象?
首先,我将从摘要开始.我正在使用Apache CXF客户端通过SSL与使用自签名证书的Apache CXF服务提供商进行通信.我将证书导入到客户端服务器的WebSphere信任,但我仍然收到"javax.net.ssl.SSLHandshakeException:出现SSLHandshakeException调用https://somesvcprovider.com/appname/svc/myservice:com.ibm.jsse2.util .h:找不到可信证书"例外.
现在,这是详细信息:
我有一个Apache CXF Web服务客户端,我使用Spring进行配置,客户端部署到WebSphere 6.1应用程序服务器.CXF客户端与不同WebSphere服务器上的Apache CXF服务提供程序进行通信.通信使用SSL.
服务提供商使用自签名证书.我已经通过管理控制台将提供者的证书导入客户端服务器上的WebSphere信任库.我通过SSL证书和密钥管理> SSL配置> NodeDefaultSSLSettings>密钥库和证书> NodeDefaultTrustStore>签署者证书完成了这项工作; 然后我使用"从端口检索"工具导入证书.
但是,在尝试联系服务提供者时仍然收到此错误:"javax.net.ssl.SSLHandshakeException:SSLHandshakeException调用https://somesvcprovider.com/appname/svc/myservice:com.ibm.jsse2.util.h:找不到可信证书".
Spring配置文件如下:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<http:conduit name="*.http-conduit">
<!-- deactivate HTTPS url hostname verification (localhost, etc) -->
<!-- WARNING ! disableCNcheck=true should not used in production. -->
<http:tlsClientParameters disableCNCheck="true" />
</http:conduit>
<!-- Read properties from property file(s). -->
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<!-- The *.spring.properties files are prefixed …Run Code Online (Sandbox Code Playgroud) 为什么 HttpContext.Current.Request.Url.Host 返回的 URL 与 Web 浏览器中使用的 URL 不同?例如,在浏览器中输入“www.someurl.com”时,HttpContext.Current.Request.Url.Host 变量等于“www.someotherurl.com”。