View Javadoc

1   /**
2    * Copyright 2005-2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.ksb.testclient1;
17  
18  import org.apache.cxf.message.Message;
19  import org.apache.cxf.phase.PhaseInterceptorChain;
20  import org.kuali.rice.ksb.messaging.remotedservices.EchoService;
21  import org.kuali.rice.ksb.messaging.remotedservices.ServiceCallInformationHolder;
22  
23  import javax.annotation.Resource;
24  import javax.ws.rs.core.HttpHeaders;
25  import javax.xml.ws.WebServiceContext;
26  import javax.xml.ws.handler.MessageContext;
27  import java.util.List;
28  import java.util.Map;
29  
30  public class EchoService1Impl implements EchoService {
31  	public String echo(String string) {
32  		return string;
33  	}
34  
35  	public String trueEcho(String string) {
36  		System.out.println("I Was echoed!!!!");
37  		return "hi mom";
38  	}
39  
40      public void captureHeaders() {
41          ServiceCallInformationHolder.stuff.put("capturedHeaders", PhaseInterceptorChain.getCurrentMessage().get(Message.PROTOCOL_HEADERS));
42      }
43  }