In an integration project , in some situation , the sending system will send out a big xml message like SOAP , but the receiving system only need a few fields from the big message. This requirement can be realized by CPI MAPPING . But is it possible by build a REST API in receiver side to realize the same function? Today I want to do a little test about this by using node.js . This is only for studying purpose . I will not answer project solution questions . Thanks for understanding !
The following is the xml source message which will be used in postman later also :
The following is the XSLT file to do the extract :
The following result by extract with XSLT :
<html><body><h2>My CD Collection</h2><table border="1"><tr bgcolor="#9acd32"><th>Title</th><th>Artist</th></tr><tr><td>Empire Burlesque</td><td>Bob Dylan</td></tr></table></body></html>
The following is the node.js code in file server.js :
The following is the test result with postman :