package tutorial.sample3;

/**
 * @wlws:webservice portName="CrazyWorld"
 */
public class HelloWorldService{

  /**
   * @wlws:part headerWorld location="header"
   * @wlws:part id location="header" 
   */
  public World helloHeaderWorld( World headerWorld, String id ){

    World bodyWorld = new World();
    bodyWorld.setName( headerWorld.getName() );
    return bodyWorld;
  }

  /**
   * @wlws:operation invocation-style="one-way"
   */
  public void helloOnewayWorld( String message ){
    System.out.println( "OnewayWorld says: " + message );

    System.out.println( "Going to sleep" );

    try{
      Thread.sleep( 10000 );
    }catch( InterruptedException e ){
    }

    System.out.println( "After sleep" );
  }

  /**
   * @wlws:exclude
   */
  public void dontExpose(){
  }

  /**
   * @wlws:part xmlStyleName name="xml-styled-name"
   */
  public void helloXMLWorld( String xmlStyleName ){
  }
}

