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]
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]
Comment