using System.ComponentModel;
using System.Web.Services;
namespace ComicServiceCF {
/// <summary>
/// Summary description for ComicServiceJ2ME.
/// </summary>
[WebService(Namespace="http://www.ociweb.com/jnb/")]
public class ComicServiceJ2ME : WebService {
public ComicServiceJ2ME() {
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}
#region Component Designer generated code
//Required by the Web Services Designer
private IContainer components = null;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing) {
if (disposing && components != null) {
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
[WebMethod]
public string[] GetTitles(int ownerID) {
return new string[] {"Superman", "Batman", "Green Lantern", "The Flash"};
}
[WebMethod]
public string[] GetConditions(string title) {
if (title == "Superman") return new string[] {"Poor", "Mint", "Good"};
else if (title == "Batman") return new string[] {"Good", "Good", "Fair", "Poor"};
else if (title == "Green Lantern") return new string[] {"Fair"};
else if (title == "The Flash") return new string[] {"Mint", "Good", "Good", "Fair"};
else return new string[0];
}
}
}