Jump to content

Monk89721

Members
  • Posts

    3
  • Joined

  • Last visited

Monk89721's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Cannot receive HTTP POST data from Device Magic (DM) form automation website. I get this error: Fatal error: Call to a member function getName() on a non-object in /portfolio/submissions/index.php on line 8 For this code: <?php $raw_body = file_get_contents("php://input"); $xml = simplexml_load_string($raw_body); echo $xml->getName()."\n<br />"; ?> So Instead I try with FireFox REST client (and use the data that should be sent from DM) and do the same as written in my first post and I get a reply - the root node name. Why does the FF REST client work and my website does not? Many thanks
  2. The server details of my hosting company - 1and1 hosting. So I try with FireFox REST client and do the same as written in my first post. The highlighted response seems fine and its code is 200 so it worked fine also the response preview is fine - what I want. I load my site in my browser and the response preview that I saw in FF REST client is not shown. Please help, have I got this completely wrong? Many thanks
  3. Trying to get XML POSTed to my website using the code below: To test that I am getting anything (which I do not at the moment) to my website I use this code: print "CONTENT_TYPE: " . $_SERVER['CONTENT_TYPE'] . "<BR />"; $data = file_get_contents('php://input'); print "DATA: <pre>"; var_dump($data); var_dump($_POST); print "</pre>"; This is my website: http://www.jonathonbates.info/submissions/deliver/index.php This is the XML that I should receive: <?xml version="1.0"?> <instance xmlns="http://www.devicemagic.com/xforms/**private form ID**" xmlns:dm="http://mobileforms.devicemagic.com/xforms" writeTime="2013-05-03T06:24:08-07:00" dm:submitting_user="Monk" dm:submitting_device="Android_**private ID**" dm:submit_time="2013-05-03 13:24:08 UTC" dm:form="test_form" dm:form_version="1.00"> <inputs> <test_1_not_populated>leverage real-time web services</test_1_not_populated> <test_2_populated>exploit dynamic portals</test_2_populated> <test_3_db_populated>synthesize dot-com users</test_3_db_populated> </inputs> </instance> The website that I have created is for receiving XML on a custom connection setup on a website called Device Magic - basicaly automates PUSHing forms to mobile client devices. I have set the destination (my website) within Device Magic and have only tried adding header 'Content-Type: Application/XML' as another idea. Please suggest why I receive nothing or what I could do to fix this. Many thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.