1. using System.ComponentModel;
  2. using System.Web.Services;
  3.  
  4. namespace ComicServiceCF {
  5. /// <summary>
  6. /// Summary description for ComicServiceJ2ME.
  7. /// </summary>
  8. [WebService(Namespace="http://www.ociweb.com/jnb/")]
  9. public class ComicServiceJ2ME : WebService {
  10. public ComicServiceJ2ME() {
  11. //CODEGEN: This call is required by the ASP.NET Web Services Designer
  12. InitializeComponent();
  13. }
  14.  
  15. #region Component Designer generated code
  16.  
  17. //Required by the Web Services Designer
  18. private IContainer components = null;
  19.  
  20. /// <summary>
  21. /// Required method for Designer support - do not modify
  22. /// the contents of this method with the code editor.
  23. /// </summary>
  24. private void InitializeComponent() {}
  25.  
  26. /// <summary>
  27. /// Clean up any resources being used.
  28. /// </summary>
  29. protected override void Dispose(bool disposing) {
  30. if (disposing && components != null) {
  31. components.Dispose();
  32. }
  33. base.Dispose(disposing);
  34. }
  35.  
  36. #endregion
  37.  
  38. [WebMethod]
  39. public string[] GetTitles(int ownerID) {
  40. return new string[] {"Superman", "Batman", "Green Lantern", "The Flash"};
  41. }
  42.  
  43. [WebMethod]
  44. public string[] GetConditions(string title) {
  45. if (title == "Superman") return new string[] {"Poor", "Mint", "Good"};
  46. else if (title == "Batman") return new string[] {"Good", "Good", "Fair", "Poor"};
  47. else if (title == "Green Lantern") return new string[] {"Fair"};
  48. else if (title == "The Flash") return new string[] {"Mint", "Good", "Good", "Fair"};
  49. else return new string[0];
  50. }
  51. }
  52. }
secret