2017-01-30 8 views
0

org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfiedorg.apache.cxf.ws.policy.PolicyException:原因:cxf bundle

この例外はcxfバンドルのために発生しています。私はこれからどのように逃げるべきか分かりません。誰でもこの問題について考えていますか?

サービスクライアントはJavaプログラムとして動作しますが、WSO2アプリケーションサーバーにサービスとしてデプロイされると、この例外がスローされます。 CXFバンドルの原因ですが、回避方法は不明です。

例外トレース:

WARN {org.apache.cxf.phase.PhaseInterceptorChain} - Application {http://test.tss.com/}Sync#{http://test.tss.com/}hello has thrown exception, unwinding now 
org.apache.cxf.interceptor.Fault: org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfied. 
    at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162) 
    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213) 
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128) 
    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178) 
    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:68) 
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75) 
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) 
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) 
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) 
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) 
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) 
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223) 
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203) 
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137) 
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159) 
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286) 
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) 
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
    at 

私は、任意のポリシーXMLを持っていません。 WSDLは、ポリシータグが含まれています

<wsp:Policy wsu:Id="BN_BN_binding_SOAP12"> 
    <saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" uri="http://xml.sap.com/2006/11/esi/esp/binxml" wsp:Optional="true" /> 
    <saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true" /> 
    <wsp:ExactlyOne> 
    <wsp:All> 
     <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 
      <wsp:Policy> 
       <sp:TransportToken> 
       <wsp:Policy> 
        <sp:HttpsToken> 
         <wsp:Policy> 
          <sp:HttpBasicAuthentication /> 
         </wsp:Policy> 
        </sp:HttpsToken> 
       </wsp:Policy> 
       </sp:TransportToken> 
       <sp:AlgorithmSuite> 
       <wsp:Policy> 
        <sp:Basic128Rsa15 /> 
       </wsp:Policy> 
       </sp:AlgorithmSuite> 
       <sp:Layout> 
       <wsp:Policy> 
        <sp:Strict /> 
       </wsp:Policy> 
       </sp:Layout> 
      </wsp:Policy> 
     </sp:TransportBinding> 
    </wsp:All> 
    </wsp:ExactlyOne> 
    <wsp:ExactlyOne> 
    <wsp:All> 
     <wsrmp:RMAssertion xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702"> 
      <wsp:Policy /> 
     </wsrmp:RMAssertion> 
     <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" /> 
    </wsp:All> 
    <wsp:All> 
     <wsrm:RMAssertion xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" /> 
     <wsaw:UsingAddressing xmlns:wsaw="http://schemas.xmlsoap.org/ws/2004/08/addressing" /> 
    </wsp:All> 
    </wsp:ExactlyOne> 

+0

こんにちはを設定している、あなたは、その構造を確認するために使用するポリシーXMLを投稿することができます –

+0

こんにちは、私は、任意のポリシーXMLを持っていけません。 wsdlにポリシータグが含まれています。ポリシーの詳細を例外の最後に説明に追加しました –

答えて

0

私はこれを解決しました。 私はCXFファイルにタグを追加し、右のセキュリティ証明書 サンプルCXFファイル

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" 
    xmlns:http="http://cxf.apache.org/transports/http/configuration" 
    xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" 
    xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:cxf="http://cxf.apache.org/core" 
    xmlns:p="http://cxf.apache.org/policy" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans      
http://www.springframework.org/schema/beans/spring-beans.xsd   
http://cxf.apache.org/jaxws          
http://cxf.apache.org/schemas/jaxws.xsd   
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd   
http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd   
http://cxf.apache.org/transports/http/configuration    
http://cxf.apache.org/schemas/configuration/http-conf.xsd   
http://cxf.apache.org/transports/http-jetty/configuration  
http://cxf.apache.org/schemas/configuration/http-jetty.xsd   
http://cxf.apache.org/configuration/security      
http://cxf.apache.org/schemas/configuration/security.xsd "> 

    <cxf:bus> 
     <cxf:features> 
      <p:policies /> 
      <cxf:logging /> 
     </cxf:features> 
    </cxf:bus> 
    <jaxws:server id="CustomerSyncService" address="/customer_sync_service"> 
     <jaxws:serviceBean> 
      <bean class="com.CustomerService" /> 
     </jaxws:serviceBean> 
    </jaxws:server> 

</beans> 
関連する問題