0

I'm having trouble figuring out what my Flex Project is expecting from my PHP file in-relation to HTTP Service. Can anyone give a link or an example as to what the PHP file should return? I already configured the return type of the Operation to String. Then on my PHP file, I put in a simple line of code

<?php
echo "hello world";
?>

but the problem is, whenever I try to test the Operation, Flash Builder keeps telling me InvocationTargetException:The response is not a valid XML or a JSON string

I want to see a working example of interactions between a Flex Project and an HTTP Service...

Registered User
  • 8,706
  • 9
  • 32
  • 40

1 Answers1

1

Flash Builder expects an XML or JSON as a result. So in your php file you'll have to wrap the result as a XML (or JSON):

<?xml version="1.0"?>
<theresult>
      <thestring>hello world</thestring>
</theresult>
Chris Ghenea
  • 12,473
  • 1
  • 29
  • 36