I have a program that either runs without parms passed in through the URL (normal condition) or accepts a parm with the URL. The first problem I'm having is how to test the program in debug mode. If I change the default URL in the browser it breaks the connection to the debug session. How can I put the parameter (it's an XML stream) into the testing?
Go to the Project -> Properties menu item. In the left hand side of the dialog there is an entry for "Run/Debug Settings". Pick it, select the launch configuration you want, click edit, then change the "URL or path launch" entry for Debug.
Thanks. I went there and added the param, but it caused this error:
File not found: C:\Flex Builder 3\FSCalc\FSCalc\bin-debug\FSCalc.html?xml=<?xml version="1.0" encoding="UTF-8" ?><FSParm><HouseholdSize>3</HouseholdSize><NumberOfChildrenUnder2></NumberOfChildrenUnder 2><NumberOfChildrenOver2></NumberOfChildrenOver2><QualifyingMember>true</QualifyingMember> <SimplifiedProcessingUnitInd>true</SimplifiedProcessingUnitInd><GrossMonthlyEarnedIncome>2 00</GrossMonthlyEarnedIncome><GrossMonthlyOtherIncome>200</GrossMonthlyOtherIncome><TotalA ssets>3999</TotalAssets><DependentCareCostsAmt>500</DependentCareCostsAmt><CourtOrderedSup portAmt>300</CourtOrderedSupportAmt><MedicalExpenseAmt>250</MedicalExpenseAmt><MonthlyRent OrMortgageAmt>250</MonthlyRentOrMortgageAmt><MonthlyInsuranceAndTaxAmt>0</MonthlyInsurance AndTaxAmt><UtilityType>Billed for AC/Heat</UtilityType></FSParm>
I added the stuff after the parm indicator (including it). This was put in the "debug" option. When that failed, I also put it in the "run" and got the same thing. I did get a warning about the Flash player. I'm guessing I'm using 10 and it requires 9, but I selected the continue anyway option.
It looks like you are trying to stick an entire XML document into a query string parameter. I wouldn't do that. If you need a default xml document for testing, just put it in an <mx:XML> tag in the flex and use that if nothing else is supplied.
Unfortunately, it's not an option. Our production system will either get an XML stream or no stream at all. In the case of not input, a form is displayed to input the values. In the first case where the XML is passed in, the program is called from another program passing the data required to make the decisions. In that case, an XML document with four nodes will be returned to the calling program for it to do with as it will.
What I'm doing is replacing a java application with a Flex one. Functionally they have to be the same.
Are you planning on sending the XML stream to the production instance via a query string? You have to be very careful with escaping/URLencoding if that is the case. It seems like a really fragile bad idea to me.
For testing purposes you could do something like pass ?useinternalXML=true in the URL and then use the <mx:XML> item that I talked about. You can of course remove all this for production.
Yes, the production application will get an XML stream on occasion. What happens is you can dial into a number (for non-computer users) and are prompted for information. That information is formatted as an XML stream that is part of the URL when called from this program.
Most people will just call up a web page and enter the data directly, but we have to allow for the opposite.
This isn't Flex specific but I certainly wouldn't recommend passing a complex XML document in a query string. HTTP POST it to the page.