2010-01-12 127 views
0

我們有一個部署在Glassfish上的java ws與另一個部署在glassfish上的java ws部署(都是Java EE 5,兩者都在netbeans 6.7.1上開發)。因此,不管是這些WS的使用SSL,但是當主WS調用其他的我們都收到此錯誤:2個系統上的2個Web服務之間的通信

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) 

我們怎樣才能保持GlassFish的從嘗試通過SSL來相互交談?當我們做一個普通的java應用程序,作爲第二個WS的客戶端時,它工作正常,所以它看起來像glassfish一樣。

回答

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> 

成了這樣:

它工作得很好?有什麼我可以做自動剝離此策略的信息,我猜測,通過構建?