topical media & game development

talk show tell print

professional-xml-20-Listing-20-13.txt / txt



  [WebService(Namespace = "http://www.wrox.com/helloworld")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  public class HelloSoapHeader : System.Web.Services.WebService
  {
  
      public HelloHeader myHeader;
  
      [WebMethod]
      [SoapHeader("myHeader")]
      public string HelloWorld() {
          if (myHeader == null) {
             return "Hello World";
          }
          else {
             return "Hello " + myHeader.Username + ". " +
                "<br>Your password is: " + myHeader.Password;
          }
      }    
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.