XML Listener and PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rando1000
    New Member
    • Aug 2007
    • 80

    XML Listener and PHP

    I've posted this in the past with little response, but hopefully someone will see it this time.

    I have a client that wants to send XML data to our server. Their service sends a message to my LAMP server, which is supposed to respond. The end result is the transfer of an xml file.

    The sample code our client gave me to get this going was ASP, which as you can imagine doesn't work very well on a LAMP server. I did my best to convert to PHP, but not being a web programmer, I'm guessing something's not quite right, since it doesn't work.

    Here's what I have:[PHP]<?php
    // Option $EXPLICIT;
    header("Content-type: "."text/xml"); // $oXML is of type "msxml2.domdocu ment"
    $uniqueID=doubl eval(time());
    $oXML->resolveExterna ls=false;
    $oXML->validateOnPars e=false;
    $oXML->load($response );
    $oXML->Save(uniqueID. ".xml");
    ?>
    <!DOCTYPE cXML SYSTEM"http://xml.cXML.org/schemas/cXML/1.1.009/cXML.dtd">
    <cXML payloadID="<? echo $uniqueID;?>@my server.com" xml:lang="en-US"
    timestamp="1999-03-12T18:39-08:00">
    <Response>
    <Status code="200" text="OK"/>
    </Response>
    </cXML>
    <?
    $oXML=null;?>[/PHP]
    Last edited by ronverdonk; May 23 '08, 02:17 PM. Reason: use code tags!!
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    warning:

    As a full member now, you should know that we expect your code to be posted in [CODE] tags (See How to Ask a Question).

    This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

    Please use the tags in future.

    MODERATOR.

    Comment

    • rando1000
      New Member
      • Aug 2007
      • 80

      #3
      Thanks, I will do so in the future.

      Comment

      • Tarantulus
        New Member
        • May 2007
        • 114

        #4
        you seems to be calling functions that don't exist there...

        see if this helps

        Comment

        Working...