FW: [Mapserver-users] arcims emulation and arcexplorer

Sean Gillies sgillies at frii.com
Sun Jun 29 09:57:04 PDT 2003


Here is a Python example of a response that works for AE Java 4.0.

xml_prolog = '<?xml version="1.0" encoding="UTF-8"?>'
xml_response = '<ARCXML version="1.0">...</ARCXML>'
...
sys.stdout.write('Content-Type: text/plain\n\n')
     if custom_stream:
         cus_hdr = struct.pack('ll', 100, len(xml_prolog) + 
len(xml_response))
         sys.stdout.write(cus_hdr)
         sys.stdout.write(xml_prolog)
         sys.stdout.write(xml_response)
         sys.stdout.write(struct.pack('l', 102))
...

Those using PHP should be able to find the equivalent of Python's
struct.pack().  The binary 102 is what AE expects as EOF.

Sean

--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies




More information about the MapServer-users mailing list