SOAP

Get started with the SOAP interface by pointing your browser at /rulesEngine/services then take in the WSDL.

You can use JSON or XML encoded facts, JSON:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rul="http://rules.nerderg.com/"> <soapenv:Header/> <soapenv:Body> <rul:applyRules> <rul:ruleSet>Means Test</rul:ruleSet> <rul:facts>[{income: 900, expenses: 600}, {income:900, expenses: 300}]</rul:facts> </rul:applyRules> </soapenv:Body> </soapenv:Envelope>

Note the XML escapery going on here for the XML encoded facts:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rul="http://rules.nerderg.com/"> <soapenv:Header/> <soapenv:Body> <rul:applyRules> <rul:ruleSet>Means Test</rul:ruleSet> <rul:facts>
<![CDATA[ <list> <map> <entry key="income">900</entry> <entry key="expenses">300</entry> </map> </list> ]]>
</rul:facts> </rul:applyRules> </soapenv:Body> </soapenv:Envelope>

Copyright © nerdErg Pty Ltd 2012 ABN 20 159 294 989