Reputation: 105
I have successfully added a policy to the PAP.
I try now to publish it to the PDP using the SOAP interface. Here is my request, but I get a 500 Error "Exception occurred while trying to invoke service method publishToPDP" I've just set the minimum parameters as version, order and action are optional.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap:Header/>
<soap:Body>
<xsd:publishToPDP>
<!--Zero or more repetitions:-->
<xsd:policyIds>policy-3</xsd:policyIds>
</xsd:publishToPDP>
</soap:Body>
</soap:Envelope>
I've tried with and without "". same error.
Could somebody help me ? Thanks a lot for your support
Regards
vpl
Upvotes: 1
Views: 136
Reputation: 664
you should set all elements of API like this :
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd">
<soap:Header/>
<soap:Body>
<xsd:publishToPDP>
<xsd:policyIds>policy_1</xsd:policyIds>
<xsd:action>PUBLISH_POLICY</xsd:action>
<xsd:version>1</xsd:version>
<xsd:enabled>true</xsd:enabled>
<xsd:order>0</xsd:order>
</xsd:publishToPDP>
</soap:Body>
</soap:Envelope>
then it should return :
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:publishToPDPResponse xmlns:ns="http://org.apache.axis2/xsd">
<ns:return xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ns:publishToPDPResponse>
</soapenv:Body>
</soapenv:Envelope>
Upvotes: 0
Reputation: 105
I've open the HTTP port on the wsoo2 and ran the client java sample http://xacmlinfo.org/2013/09/27/xacml-policy-administration/ By sniffing the network trace with Wireshark I was able to retrieve the SOAP requests I was looking for. For the PublishToPDP here is the valid request
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns3:publishToPDP xmlns:ns3="http://org.apache.axis2/xsd">
<ns3:policyIds>policy-3</ns3:policyIds>
<ns3:version xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />
<ns3:action>CREATE</ns3:action>
<ns3:order>0</ns3:order>
</ns3:publishToPDP>
</soapenv:Body>
</soapenv:Envelope>
I suspect that the action and/or order are not so optional as described in the interface...
Regards Vpl
Upvotes: 2