package tutorial.sample7;

import javax.xml.rpc.holders.StringHolder;
import javax.xml.rpc.holders.IntHolder;

public class HelloWorldService{

  /**
   * This method got an IN parameter
   */
  public void helloInParam( int a ){
  }

  /**
   * This method got a return value  
   */
  public String helloReturnValue(){
    return "Hello! World";
  }

  /**
   * This method got an OUT param
   *
   * @wlws:part text style="out"
   */
  public void helloOutParam( StringHolder text ){
    text.value = "Hello! OUT Param world";
  }

  /**
   * This method got an IN-OUT param
   *
   * @wlws:part length style="inout"
   */
  public void helloInOutParam( IntHolder length ){
    length.value = length.value * 2;
  }

  /**
   * This method got return value and mulitple out params 
   *
   * @wlws:part length style="out"
   * @wlws:part message style="out"
   */
  public String helloInOutParam( IntHolder length, StringHolder message ){
    length.value = length.value * 2;
    message.value = "New Message[ old-message= " + message.value + "]";

    return "Hello! World";
  }
 

}

