Search code examples
wso2xacmlbalanawso2-identity-server

WSO2 getting error while uploading policy to WSO2 IS PDP from java client


I am trying to create XACML policy from java client and upload it to wso2 IS. All works fine and policy also updated in WSO2 IS but after uploading policy when I tried to publish created policy to WSO2 PDP from java client then it gives me an error like this:

org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method publishToPDP at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) at org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOutOnlyOperationClient.handleResponse(RobustOutOnlyAxisOperation.java:91) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.wso2.carbon.identity.entitlement.stub.EntitlementPolicyAdminServiceStub.publishToPDP(EntitlementPolicyAdminServiceStub.java:4651) at org.xacmlinfo.xacml.pap.is.PolicyAdminClient.main(PolicyAdminClient.java:177)

I tried a lot to resolve this issue but after doing lots of internet searching still I couldn't find the solution for the problem. I also did change in carbon.xml file of WSO2 IS for "admin service” webservice and made "<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>" but still it is not working properly.


Solution

  • I assume that you are using the java client which is mentioned in here. You need to use the updated client for IS 5.0.0. Please go through above blog post again. There is some API changes in the IS 5.0.0 therefore older client may not work properly. Also you may need to apply some fix which is mentioned in the blog post to get the policy re-ordering done. However, normally when you are adding policy in to the WSO2IS, you can add directly to PAP and PDP (as enabled policy). Therefore you do not need to make two class for it. I hope you can find more details inside the java client.