001    /**
002     * Copyright 2005-2013 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.ksb.testclient2;
017    
018    import org.apache.cxf.message.Message;
019    import org.apache.cxf.phase.PhaseInterceptorChain;
020    import org.kuali.rice.ksb.messaging.remotedservices.EchoService;
021    import org.kuali.rice.ksb.messaging.remotedservices.ServiceCallInformationHolder;
022    
023    import javax.annotation.Resource;
024    import javax.ws.rs.core.HttpHeaders;
025    import javax.xml.ws.WebServiceContext;
026    import javax.xml.ws.handler.MessageContext;
027    import java.util.List;
028    import java.util.Map;
029    
030    public class EchoService2Impl implements EchoService {
031            public String echo(String string) {
032                    return string;
033            }
034    
035            public String trueEcho(String string) {
036                    return string;
037            }
038    
039        public void captureHeaders() {
040            ServiceCallInformationHolder.stuff.put("capturedHeaders", PhaseInterceptorChain.getCurrentMessage().get(Message.PROTOCOL_HEADERS));
041        }
042    
043    }