Oracle® Communications Inter-Working Function (IWF) Cloud Native User's Guide Release 1.0 F16989-01 |
|
![]() Previous |
![]() Next |
Following are the different ways to manipulate the HTTP Request/Response:
m.getURL(“http://oracle.com”) m.setURL(“http://oracle.com”)
m.getMethod() m.setMethod(“POST”)
m.getHttpStatusCode() m.setHttpStatusCode(201)
m.header("Content-Type") OR m.header(m.GET,"Content-Type"") m.header(m.ADD,"Content-Type","application/xml") m.header(m.UPDATE,"Content-Type","application/xml") m.header(m.DEL,"Content-Type","application/xml")
m.body("tai:tac") OR m.body(m.GET"tai:tac") m.body(m.ADD, "tai:tac","000001") m.body(m.UPDATE, "tai:tac:mnc","281") m.body(m.DELETE, "nf-id","28145")
m.header(m.UPDATE,"Content-Type","application/xml")
m.header(m.UPDATE,"Content-Type","application/json")
rule "iwf_test_rule40_3" salience 20 when m : IWFHttpResponse(body("company[1]:x") matches "[^A-Za-z]") then m.body(m.ADD, "company[2]:y", "sap") m.header(m.UPDATE, "Content-Type", "application/json") end
rule "iwf_test_rule40_4" salience 20 when m : IWFHttpRequest( body("nf-id") == 0.001) then m.body(m.ADD, "company[2]:y", 1) m.header(m.UPDATE, "Content-Type", "application/json") end
function String charLength(String name) { return name.length(); }
rule "iwf_test_rule40_6" salience 20 when m : IWFHttpRequest(charLength(body("nf-id")) == "ORACLE") then m.body(m.ADD, "company[2]:y", 1000) end