1 Eric Chudow 2 Lee Gumnic 3 Project 7 � Web Service 4 Dec 2005 5 6 Our web service provides custom images. The client may specify a text message to appear on the image, and receives it as an array of bytes representing a jpeg file. Additionally, the client may choose to send the image as an email to a specified SEAS address. The web page allows you to specify message text as well as all parameters for an email. Additionally it provides a dynamic image file that returns the image to a web browser. This image URL can be used by users of the web site. The web service does not use that image for the emails since it shouldn�t be depending on one of its clients. It instead embeds the jpeg file in the email itself which is where we spent the majority of our time. 7 8 The service is located at http://harbormist.com/webservice/AddTextToImage/Service.asmx 9 We changes all of the default file names but left Service.aspx alone because that seems to be a standard place to look for the WSDL. The source is in the DynamicImageGenerator folder in this zip. 10 11 12 The web page is located at 13 http://wren.cis.upenn.edu/webclient/AddTextToImage/ 14 15 Notes on source: 16 17 � ImageText 18 o AppCode 19 ? GlobalInfo.cs 20 � Encapsulates some global constants 21 o Default.aspx(.cs) 22 ? The main interface of the web site 23 ? Provides forms to interact with the web service 24 o Image.aspx(.cs) 25 ? An asp file encapsulating the image 26 ? Changes the content type to image/jpeg 27 ? Writes the bytes from the web service to the response 28 ? Creates a 500 server error if the service fails 29 � DynamicImageGenerator 30 o AppCode 31 ? GlobalInfo.cs 32 � Encapsulates some global variables 33 ? Service.cs 34 � Implements the web service 35 � CreateImage 36 o Creates an altered image in memory 37 o Returns as a byte array 38 � Sendmail 39 o Takes altered image from createimage and sends it by email 40 o Jpeg file is created in the temp directory and then sent 41 42 43