Forum Post: RE: Send and receive XML via Http Post Request

  • Thread starter Thread starter jsniemi79
  • Start date Start date
Status
Not open for further replies.
J

jsniemi79

Guest
That worked to get my response. Thank you very much for the help. i'm trying to use the parse xml api and the results are not what I would have expected. Here is the code I have showing what I'm debugging. var resp = rbv_api.sendJSONRequest(url, data, method, contentType, null, null, null); var root = rbv_api.parseXML(resp); var nodes = root.getChildNodes(); for (var k=0; k nodes.length; k++) { var child = nodes.item(k); rbv_api.println("Tag="+child.getTagName()); var nodes2 = child.getChildNodes(); for (var n=0; n nodes2.length; n++) { var child2 = nodes2.item(n); var x = child2.getNodeValue(); rbv_api.println("Value="+x); } } rbv_api.println('Root'); rbv_api.printArr(root); rbv_api.println('\n Nodes'); rbv_api.printArr(nodes); rbv_api.println('\n Child'); rbv_api.printArr(child); rbv_api.println('\n Child2'); rbv_api.printArr(child2); rbv_api.println('\n XML Response'); rbv_api.print(resp); Here is what I get back from that code: Tag=Response Value=null Value=null Value=null Value=null Value=null Value=null Value=null Value=null Root [TransactionSetupResponse: null] Nodes [TransactionSetupResponse: null] Child [Response: null] Child2 [TransactionSetup: null] XML Response TransactionSetupResponse xmlns=' https://transaction.elementexpress.com' Response ExpressResponseCode 0 /ExpressResponseCode ExpressResponseMessage Success /ExpressResponseMessage ExpressTransactionDate 20150204 /ExpressTransactionDate ExpressTransactionTime 141230 /ExpressTransactionTime ExpressTransactionTimezone UTC-06:00:00 /ExpressTransactionTimezone Transaction TransactionSetupID 44F3709A-0655-4778-AAF2-449285612515 /TransactionSetupID /Transaction PaymentAccount TransactionSetupID 44F3709A-0655-4778-AAF2-449285612515 /TransactionSetupID /PaymentAccount TransactionSetup TransactionSetupID 44F3709A-0655-4778-AAF2-449285612515 /TransactionSetupID ValidationCode BC4862ED41BE4C81 /ValidationCode /TransactionSetup /Response /TransactionSetupResponse All I need to get is the TransactionSetupID from the response. Thanks again for your help on this.

Continue reading...
 
Status
Not open for further replies.
Back
Top