001/**
002 * Copyright 2005-2014 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 */
016package org.kuali.rice.ksb.testclient1;
017
018import org.apache.cxf.message.Message;
019import org.apache.cxf.phase.PhaseInterceptorChain;
020import org.kuali.rice.ksb.messaging.remotedservices.EchoService;
021import org.kuali.rice.ksb.messaging.remotedservices.ServiceCallInformationHolder;
022
023import javax.annotation.Resource;
024import javax.ws.rs.core.HttpHeaders;
025import javax.xml.ws.WebServiceContext;
026import javax.xml.ws.handler.MessageContext;
027import java.util.List;
028import java.util.Map;
029
030public class EchoService1Impl implements EchoService {
031        public String echo(String string) {
032                return string;
033        }
034
035        public String trueEcho(String string) {
036                System.out.println("I Was echoed!!!!");
037                return "hi mom";
038        }
039
040    public void captureHeaders() {
041        ServiceCallInformationHolder.multiValues = (Map<String, List<String>>)PhaseInterceptorChain.getCurrentMessage().get(Message.PROTOCOL_HEADERS);
042    }
043}