Passing a value object as a parameter to amphp’s browser

Unfortunately I don’t have the answer on how to do this, and after a bit of Googling it seems like I’m not the only one.

Getting VO’s from AMFPHP back into my Flex app as strongly typed objects is fine. Sending a single VO to a method in AMFPHP has me somewhat bamboozled though, given that this makes the Browser then only want to take a single parameter as well (which makes life a bit difficult for testing purposes).

My initial idea to get around this was to modify the service browser to detect when a parameter of a service method was actually a VO object. Then instead of letting the Browser just display a single textinput field (which would require an object with the same type as the VO you want to use – something I’ve got no idea how to do by text alone in the browser), each property of the VO would instead be displayed as it’s own individual textinput field.

Has anyone else been sending VO’s to AMFPHP and still made use of the Browser in their setup? Please drop us a comment if you have.

Be Sociable, Share!
Posted in Uncategorized

5 comments on “Passing a value object as a parameter to amphp’s browser
  1. JohnO says:

    Check out PlugrMan. It was just recently released as beta. It’s an Air app that replaces the AMFPHP Browser and has a lot of cool features, such as setting up VO’s for testing to your AMFPHP service.

    Sign up for beta at http://plugrman.com/

    Videos on Youtube: http://www.youtube.com/user/plugrman

  2. rob says:

    if you want to pass a VO to the amf browser, pass it in JSON. in your textInput that’s expecting an object, just pass it like this: {“key1″:”value1″, “key2″:”value2″, “key3″:”value3″}

    it’s a little annoying but it works and you don’t need to edit your method.

  3. @Rob – I’m aware of the JSON object that could be passed – some of my VO’s have got 10 or more properties though, so having to remember the names of the properties everytime I wanted to test a service call in the Browser isn’t practical.

    @JohnO – that looks awesome, thanks very much for dropping by and leaving a comment. I’m very excited about the possibilities the PlugrMan AIR app provides!

  4. Hi Jason,

    Just dropping by to let you guys know PlugrMan has officially launched! All your strong-type debugging needs are now available to the public via PlugrMan, give the 30 day trial a go!

    -Omar

  5. Cary Mendoza says:

    By default amfphp is set to flase for PRODUCTION_SERVER. This is becuase if you just installed amfphp you want to see errors! By changing this value to true you disable profiling, remote tracing, and the Flash/Flex IDE StandAlone Player, in addition to the service browser. This is an important security issue! YOu should delete the browser directory on a production server!

1 Pings/Trackbacks for "Passing a value object as a parameter to amphp’s browser"
  1. [...] Passing a value object as a parameter to amphp’s browser at calm in the chaos blog.wrench.com.au/2010/08/22/passing-a-value-object-as-a-parameter-to-amphps-browser/ – view page – cached Flash, Flex and Technology Tweets about this link [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Posts this month
August 2010
M T W T F S S
« Jun   Oct »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Archives