我们在Glassfish上部署了一个java ws,与另一个部署在glassfish上的java ws交谈(两者都是Java EE 5,两者都是在netbeans 6.7.1上开发的)。所以这些w都不使用SSL,但是当主ws调用另一个时,我们会收到这个错误:
WSTX-COORDINATOR-3005: registerResponse sent to EPR '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><Address>https://trinity2.its.local:8181/__wstx-services/wscoor/coordinator/registerResponse</Address><ReferenceParameters><jaxws:objectId xmlns:jaxws="http://jax-ws.dev.java.net/xml/ns/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">4e470037-57c9-4903-9b32-fafc6da84ec7</jaxws:objectId></ReferenceParameters></EndpointReference>' failed. activityId 'uuid:WSCOOR-SUN-2ade62a8-d476-474b-9b9d-a0c1fdeb069f' and msg 'uuid:41c6e179-af20-47da-bbfd-e73519000765'. Nested exception: 'HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target'
HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
com.sun.xml.ws.client.ClientTransportException: HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:134)
我们如何防止玻璃鱼通过SSL互相交谈?当我们做一个常规的Java应用程序作为第二个WS的客户端时它工作正常,所以它似乎是glassfish所做的事情。
答案 0 :(得分:0)
好的,我对我的问题有部分答案。因此,在netbeans中,我在客户端项目中打开了服务器的wsdl并删除了所有策略信息。
所以这个:
<operation name="jobNote">
<ns216:PolicyReference xmlns:ns216="http://www.w3.org/ns/ws-policy" URI="#MetaPortBinding_jobNote_WSAT_Policy"></ns216:PolicyReference>
<soap:operation soapAction=""></soap:operation>
成了这个:
它工作得很好......我有什么办法可以自动删除这个政策信息,我猜这个构建了吗?