on 08-02-2008 4:19 PM
Hi experts,
In transaction A I defined a transaction output property (xmloutput) as XML type then use xquery and icommand to wrap it in the applet. I am wondering if I can retrieve it in javascript and pass it to the transaction B which has a XML input property (xmlinput)? I am planing to pass structured data between transaction in this way.
Thanks,
Tony.
Tony,
Upon receipt of the query results, the iCommand will have the dataset available to you in JavaScript (see the methods in the Script Assistant), but it will not be a single xml object like the transaction would output. To bring back the whole dataset from TRX A to the client side and then pass it back down to TRX B seems a bit strange - what do you intend to do with the dataset on the client side with JavaScript?
Have you looked at the Transaction Action block, which allows you to call one transaction from another?
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeremy,
I need to explain a little bit more about the background. The TRX A consists of bunch of complicated and time consuming SQLs which I intend to run only one time. The dataset returned by TRX A will feed to TRX B & TRX C and both of them will be executed several times according to different input from screen. In a nutshell, what I want is a memory hold the result of TRX A. So I am planning to do it in JAVASCRIPT. If I use call transaction action block in TRX B, the TRX A will be called as many times as TRX B is, which is not fine.
Thanks,
Tony.
Jeremy/Tony:
If you want to do it client side, an AJAX/HTTP POST approach would probably work best (particularly if the XML to be passed back and forth is of any significant size). Using the XmlHttpRequest object in your browser, you can invoke the BLS transaction(s) as needed (Google for examples of using XmlHttpRequest to issue "POST" requests, which you'll want to do in this case).
Rick
Hi, Tony.
Just be sure you are on an up-to-date version of MII, as there were bugs in the XML parser action in earlier versions of 11.5. You might also be able to simply define the transaction parameter as an XML type, and the parsing/conversion might occur properly automatically. Also, there is a URL parameter named "InputParameter" that you should read about in the help. It allows you to use HTTP POST to send large content as an input to a BLS transaction via the Runner servlet.
Best regards,
Rick
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.