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