Re: XML/PHP web service

From: Date: Thu, 09 Aug 2012 02:35:33 +0000
Subject: Re: XML/PHP web service
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-318655@lists.php.net to get a copy of this message
Hi Philip, Tell them they can POST submissions to:
    https://www.acme.com/xml-submission
Then tell them what fields are supported. Presumably you will support the following POST fields as a minimum (as if they were on a form):
    username
    password
    xml
Your handler should also provide some feedback about whether the submission was successful of not. You can simply return output of a 1 for success, a 0 for failure, or if you want to go whole hog you can output an XML response for which you can have much greater granularity for the response. Cheers, Rob. On 12-08-08 06:57 PM, Phillip Baker wrote:
I was wondering how that would work and if it might be that simple. How would I inform the client to hit the page (script)? Blessed Be Phillip "In the Jim Crow South, for example, government failed and indeed refused to protect blacks from extra-legal violence. Given our history, it's stunning we fail to question those who would force upon us a total reliance on the state for defense." -- Robert J. Cottrol On Wed, Aug 8, 2012 at 4:27 PM, Ashley Sheridan <ash@ashleysheridan.co.uk>wrote:
Phillip Baker <phillip@freewolf.net> wrote:
Greetings all, I am looking for some options here. I am in need of creating a service on our web server that will always be available and automated. It will accept an XML file. I will be checking to see if the XML file is valid and then passing it on to another server. But I need to accept this file without using a submit form. I have never done anything like this and looking for ideas. I am using a lamp environment and looking for suggestions. I am looking to set this up so that our vendors can set up scripts to automatically post XML files to our servers. Blessed Be Phillip "In the Jim Crow South, for example, government failed and indeed refused to protect blacks from extra-legal violence. Given our history, it's stunning we fail to question those who would force upon us a total reliance on the state for defense." -- Robert J. Cottrol
Just set up your php script as if it were accepting input from a form submission. All you're doing is not showing the form. Imagine it like a form set up on someone else's server with the action attribute pointing to your script. Ashley Sheridan http://www.ashleysheridan.co.uk -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.

« previous php.general (#318655) next »