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.

Please follow and like us:

6 thoughts on “Passing a value object as a parameter to amphp’s browser”

  1. 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.

    Reply
  2. @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!

    Reply
  3. 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

    Reply
  4. 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!

    Reply

Leave a Reply to JohnO Cancel reply