15.08.2013 Views

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

image/gif<br />

0<br />

0<br />

0<br />

<br />

<br />

<br />

<br />

<br />

Step 6 – Respond Back to the Client<br />

Creating the Script<br />

Data Island<br />

Automatic Upload<br />

The XML data can be sent back by itself, or as part of a larger HTML page.<br />

Normally, the bare-bones XML shown above is all that is returned, since it is all<br />

the editor looks at.<br />

But, if you are using a CMS that displays the resulting data, you may want to<br />

return a complete HTML page. If you want to look sophisticated, include this data<br />

island on a page with a table to display the data. See Also: ”Data Island” on<br />

page 471<br />

Here’s a practical example of how to create the script.<br />

1. Implement a page that logs every receipt of an HTTP post (to a text file, for<br />

example).<br />

2. Configure WIFX to upload to this page. For example, if you create a page at<br />

the path /postacceptor/WebForm1.aspx, set the following in the<br />

ImageEditConfig.xml file.<br />

<br />

3. Try to upload from WIFX.<br />

4. Check the page’s log to confirm that WIFX hit it. Note that WIFX returns an<br />

error even if this works properly because the page doesn’t yet return the<br />

proper XML packet.<br />

5. After confirming that WIFX is hitting the page, change it slightly to loop<br />

through all posted form fields and log their values.This lets you see exactly<br />

what information WIFX is posting.<br />

6. Write the code needed to produce the XML packet. See Also: ”Step 5 – Build<br />

the Return XML Data” on page 469<br />

7. Set the page to return an XML packet with dummy values. These should take<br />

care of the WIFX error message and display a message like Upload<br />

Successful! after the form is posted.<br />

8. Decode the MIME packet in the image files and save it to the server's hard<br />

drive.<br />

A data island is implemented as the repository for the return data. This is<br />

generated by the server-side component and sent back in a standard Web page.<br />

<strong>Ektron®</strong> <strong>eWebEditPro</strong> Developer’s <strong>Reference</strong> <strong>Guide</strong>, Release 5.1, Revision 1 471

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!