1/*2 * Copyright 2013 The Apache Software Foundation.3 *4 * Licensed under the Apache 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 at7 *8 * http://www.apache.org/licenses/LICENSE-2.09 *10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */16package org.apache.juddi.auth;
1718import java.security.Principal;
19import javax.xml.ws.EndpointReference;
20import javax.xml.ws.WebServiceContext;
21import javax.xml.ws.handler.MessageContext;
22import org.w3c.dom.Element;
2324/**25 *26 * @author Alex O'Ree27 */28publicclassMockWebServiceContextimplements WebServiceContext {
2930publicMockWebServiceContext(String ipaddress) {
31 ctx.put(MessageContext.SERVLET_REQUEST, newMockHttpServletRequest(ipaddress));
32 }
33privateMockMessageContext ctx = newMockMessageContext();
3435 @Override
36public MessageContext getMessageContext() {
37return ctx;
38 }
3940 @Override
41public Principal getUserPrincipal() {
42returnnull;
43 }
4445 @Override
46publicboolean isUserInRole(String role) {
47thrownew UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.48 }
4950 @Override
51public EndpointReference getEndpointReference(Element... referenceParameters) {
52thrownew UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.53 }
5455 @Override
56public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters) {
57thrownew UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.58 }
59 }