3 Replies Latest reply on Feb 27, 2012 9:42 AM by mckamaraj

    Unsupported assertion. Policy not supported

    dani_demons

      Hi everybody.

       

      I am trying to develop an app. that uses WebServices but I have some problems when I try to get a response from them.. In particular when the appl. try to build the request to send the message to WS. But first, let me explain you the steps we already did:

       

      - We had JBOSS-WS libraries v2.0.1 and JBOSS v4.2.3 --> It was updated JbossWS libraries to 3.1.1 (Native) (Jboss stay in 4.2.3)

      - It was got the WSDL that we're going to use in the APP and was generated the source code of WebServices using the 'wsconsume' from 3.1.1 version.

      - We created a Java project in Eclipse, copied the source code into that, built successfully and deployed in Jboss..

      - It was created a Mock with using SoapUI 3.5.1

       

      To be sure that it worked, it was created a JUnit test to check funcionality.. --> JUnit ends test with an OK!.

       

      We created the client code of WS, built and deployed in Jboss... Time to checks:

       

      We invoking the client and:.... WSException: Policy not supported.

       

      I think that there are already several discussion about this problem, but certainly I can't find anything that solved this problem:

      - I tried to change the path of ProviderImpl in Provider class as shown in: http://community.jboss.org/thread/151773 but it not works

       

      We think that there is something wrong in the policy assertions of WSDL, so I hope you can help us because we are wasting a lot of time in this problem and It seems that we can't get the right solution.

       

      Thanks you.

       

      Greeting,

      Dani.

       

      Conflict WSDL code:

       

      <?xml version="1.0" encoding="utf-8" ?>
        <wsdl:definitions name="BizTalkServiceInstance" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl/ws-addr-wsdl.xsd" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
          <wsdl:documentation>
            <CreationInfo Created="2010-08-27 10:51:08Z"/>
            </wsdl:documentation>
            <wsp:Policy wsu:Id="WSHttpBinding_ITwoWayAsync_policy">
                  <wsp:ExactlyOne>
                      <wsp:All>
                          <wsaw:UsingAdressing/>
                      </wsp:All>
                  </wsp:ExactlyOne>
              </wsp:Policy>
      ...
      

       

      Call function in source Code:

       

      @WebEndpoint(name = "WSHttpBinding_ITwoWayAsync")
          public EPGServices getWSHttpBindingITwoWayAsync() {
              return (EPGServices)super.getPort(new QName("http://tempuri.org/", "WSHttpBinding_ITwoWayAsync"), EPGServices.class,new AddressingFeature(true));
          }
      

       

      Exception:

       

       

      06:44:13,060 ERROR [PolicyDeployer] Unsupported assertion!
      06:44:13,060 ERROR [UserInfoServiceWSRequestBuilder] Policy not supported! #WSHttpBinding_ITwoWayAsync_policy
      org.jboss.ws.WSException: Policy not supported! #WSHttpBinding_ITwoWayAsync_policy
              at org.jboss.ws.WSException.rethrow(WSException.java:60)
              at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicyClientSide(PolicyMetaDataBuilder.java:319)
              at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicy(PolicyMetaDataBuilder.java:277)
              at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.processPolicies(PolicyMetaDataBuilder.java:236)
              at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.processPolicyExtensions(PolicyMetaDataBuilder.java:193)
              at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:95)
              at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:133)
              at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
              at javax.xml.ws.Service.<init>(Service.java:79)
              at ws.client.epg.BizTalkServiceInstance.<init>(BizTalkServiceInstance.java:43)
              at com.gmv.request.UserInfoServiceWSRequestBuilder.invokeUserInfoServiceWS(UserInfoServiceWSRequestBuilder.java:36)
              at com.gmv.WSCall.userInfoServiceWS(WSCall.java:107)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
              at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:57)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:94)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:70)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:139)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:216)
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:186)
              at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
              at $Proxy132.userInfoServiceWS(Unknown Source)
              at com.gmv.utils.WSHelper.getUserInfoWS(WSHelper.java:33)
              at com.gmv.user.action.UserAction.login(UserAction.java:115)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
              at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
              at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
              at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
              at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
              at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
              at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
              at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
              at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
              at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
              at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
              at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
              at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
              at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy
              at org.jboss.ws.extensions.policy.deployer.PolicyDeployer.deployClientSide(PolicyDeployer.java:170)
              at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicyClientSide(PolicyMetaDataBuilder.java:310)
              ... 115 more
      
        • 1. Re: Unsupported assertion. Policy not supported
          asoldano

          JBossWS-Native 3.1.1 simply didn't support that policy assertion. You need to use a more recent JBossWS / AS versions.

          If you don't want to update the stack on AS 5 or 6, you could just download JBoss AS 6 M4 which comes with JBossWS-CXF 3.4.0.Beta1. That supports for sure all the most common policy assertions.

          • 2. Re: Unsupported assertion. Policy not supported
            izgur

            I have the exactly same problem with my JBoss 5.1, using jboss native webservices - 3.2.1.

             

            <wsp:Policy wsu:Id="serviceEndpoint_policy">

             

             

            Is there any solution by just adding the a new policy to the supported ones (upgrade just policy support) ?

             

            It really the last service I have to call and now this. I don't know if it's SAVE for me to upgrade the webservices after 4 BPELs working ?

             

             

            If there is any simplier solution, please tell...

             

            BR, Igor!

            • 3. Re: Unsupported assertion. Policy not supported
              mckamaraj

              Hi Alessio Soldano,

               

              I have created the client java files from wsdl using wsimport in command line. Later using that client java files i have tried to access the webservices from Jboss 4.3.0.GA that time i got the following error.

               

              exception:

               

              org.apache.jasper.JasperException : org.jboss.ws.WsException Policy not supported.! #WsHttpBinding_MyService_Policy.

               

              root cause :

               

              org.jboss.ws.WSException: org.jboss.ws.WsException Policy not supported.! #WsHttpBinding_MyService_Policy.

               

               

              Can you help me to sort out this issue.Any mismatch jar i have used or policy is not supported in Jboss 4.3.0 GA.Please give me the solution for this issue.

               

              If i need to update any jar files please give the jar name and update path also in Jboss.