Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-3976

WSDL11ToAxisServiceBuilder: WS-Policy-Processing with neethi: RuntimeException: Incorrect inclusion value: -1, NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4
    • 1.4
    • wsdl
    • None
    • Win32 (WinXP EN)

    Description

      This creates the following error messages appear using a non-trivial WSDL file like that from here: http://www.agileskills2.org/DWSAA/source.zip

      C:\Program Files\Java\axis2-1.4\bin>wsdl2java.bat -uri C:\AIS\AISNewlyModeledSecureClientService\wsdl-schemata\AccountInformation10-acc-ws-policy-local-files.wsdl -p com.XXX.ais.AISNewlyModeledSecureClientService.generated -d xmlbeans -o C:\AIS\Wsdl2java_Test
      Using AXIS2_HOME: C:\Program Files\Java\axis2-1.4
      Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_15
      Retrieving document at 'C:\AIS\AISNewlyModeledSecureClientService\wsdl-schemata\AccountInformation10-acc-ws-policy-local-files.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/InterActive-core-v1.0-local-files.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/xenc-schema-local-files.xsd', relative to 'file:/C:/AIS/schemata/InterActive-core-v1.0-local-files.xsd'.
      Retrieving schema at 'file:///C:/AIS/schemata/xmldsig-core-schema.xsd', relative to 'file:/C:/AIS/schemata/xenc-schema-local-files.xsd'.
      Retrieving schema at 'file:///C:/AIS/schemata/InterActive-accountinformation-v1.0.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/pain.001.001.01.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/InterActive-common-v1.0.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files.wsdl'.
      java.lang.RuntimeException: Incorrect inclusion value: -1
      at org.apache.ws.secpolicy.model.Token.setInclusion(Token.java:56)
      at org.apache.ws.secpolicy11.builders.UsernameTokenBuilder.build(UsernameTokenBuilder.java:44)
      at org.apache.neethi.AssertionBuilderFactory.build(AssertionBuilderFactory.java:99)
      at org.apache.neethi.PolicyEngine.processOperationElement(PolicyEngine.java:225)
      at org.apache.neethi.PolicyEngine.getPolicyOperator(PolicyEngine.java:154)
      at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:126)
      at org.apache.ws.secpolicy11.builders.SupportingTokensBuilder.build(SupportingTokensBuilder.java:54)
      at org.apache.neethi.AssertionBuilderFactory.build(AssertionBuilderFactory.java:99)
      at org.apache.neethi.PolicyEngine.processOperationElement(PolicyEngine.java:225)
      at org.apache.neethi.PolicyEngine.getPolicyOperator(PolicyEngine.java:154)
      at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:126)
      at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:83)
      at org.apache.axis2.util.PolicyUtil.getPolicyComponent(PolicyUtil.java:182)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder
      .java:2814)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder
      .java:2792)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:364)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilde
      r.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      [ERROR]
      java.lang.NullPointerException
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder
      .java:2816)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder
      .java:2792)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:364)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilde
      r.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Caused by: org.apache.axis2.AxisFault
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:397)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilde
      r.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      ... 2 more
      Caused by: java.lang.NullPointerException
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder
      .java:2816)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder
      .java:2792)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:364)
      ... 4 more

      C:\Program Files\Java\axis2-1.4\bin>wsdl2java.bat -uri C:\AIS\AISNewlyModeledSecureClientService\wsdl-schemata\AccountInformation10-acc-ws-policy-local-files4.wsdl -p com.XXX.ais.AISNewlyModeledSecureClientService.generated -d xmlbeans -ss -sd -o C:\AIS\Wsdl2java_Test
      Using AXIS2_HOME: C:\Program Files\Java\axis2-1.4
      Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_15
      Retrieving document at 'C:\AIS\AISNewlyModeledSecureClientService\wsdl-schemata\AccountInformation10-acc-ws-policy-local
      -files4.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/InterActive-core-v1.0-local-files.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files4.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/xenc-schema-local-files.xsd', relative to 'file:/C:/AIS/schemata/InterActive-core-v1.0-local-files.xsd'.
      Retrieving schema at 'file:///C:/AIS/schemata/xmldsig-core-schema.xsd', relative to 'file:/C:/AIS/schemata/xenc-schema-local-files.xsd'.
      Retrieving schema at 'file:///C:/AIS/schemata/InterActive-accountinformation-v1.0.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files4.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/pain.001.001.01.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files4.wsdl'.
      Retrieving schema at 'file:///C:/AIS/schemata/InterActive-common-v1.0.xsd', relative to 'file:/C:/AIS/AISNewlyModeledSecureClientService/wsdl-schemata/AccountInformation10-acc-ws-policy-local-files4.wsdl'.
      java.lang.RuntimeException: Incorrect inclusion value: -1
      at org.apache.ws.secpolicy.model.Token.setInclusion(Token.java:56)
      at org.apache.ws.secpolicy11.builders.UsernameTokenBuilder.build(UsernameTokenBuilder.java:44)
      at org.apache.neethi.AssertionBuilderFactory.build(AssertionBuilderFactory.java:99)
      at org.apache.neethi.PolicyEngine.processOperationElement(PolicyEngine.java:225)
      at org.apache.neethi.PolicyEngine.getPolicyOperator(PolicyEngine.java:154)
      at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:126)
      at org.apache.ws.secpolicy11.builders.SupportingTokensBuilder.build(SupportingTokensBuilder.java:54)
      at org.apache.neethi.AssertionBuilderFactory.build(AssertionBuilderFactory.java:99)
      at org.apache.neethi.PolicyEngine.processOperationElement(PolicyEngine.java:225)
      at org.apache.neethi.PolicyEngine.getPolicyOperator(PolicyEngine.java:154)
      at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:126)
      at org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:83)
      at org.apache.axis2.util.PolicyUtil.getPolicyComponent(PolicyUtil.java:182)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder.java:2814)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder.java:2792)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:364)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      [ERROR]
      java.lang.NullPointerException
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder.java:2816)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder.java:2792)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:364)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Caused by: org.apache.axis2.AxisFault
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:397)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      ... 2 more
      Caused by: java.lang.NullPointerException
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder.java:2816)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPoliciesInDefintion(WSDL11ToAxisServiceBuilder.java:2792)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:364)
      ... 4 more

      Attachments

        Activity

          People

            nandana.cse Nandana Mihindukulasooriya
            compris Thomas Poetter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 8h
                8h
                Remaining:
                Remaining Estimate - 8h
                8h
                Logged:
                Time Spent - Not Specified
                Not Specified