View Javadoc

1   /*
2    * $Id: Echo.java 19999 2010-10-24 14:41:51Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.module.cxf.testmodels;
12  
13  import javax.annotation.Resource;
14  import javax.jws.WebMethod;
15  import javax.jws.WebParam;
16  import javax.jws.WebResult;
17  import javax.jws.WebService;
18  import javax.xml.ws.WebServiceContext;
19  
20  import org.junit.Assert;
21  
22  @WebService
23  public class Echo
24  {
25      @Resource
26      private WebServiceContext context;
27      
28      @WebResult(name = "text")
29      @WebMethod
30      public String echo(@WebParam(name = "text") String s)
31      {
32          return s;
33      }
34  
35      @WebResult(name = "output")
36      @WebMethod
37      public String ensureWebSerivceContextIsSet(@WebParam(name = "input") String input)
38      {
39          Assert.assertNotNull(context);
40          return input;
41      }
42  }