1 /* 2 * Copyright 2008 University Corporation for Advanced Internet Development, Inc. 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 at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 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 17 package org.opensaml.ws.soap.client; 18 19 import org.opensaml.ws.soap.common.SOAPException; 20 import org.opensaml.xml.security.SecurityException; 21 22 import net.jcip.annotations.ThreadSafe; 23 24 /** 25 * An interface for a very basic SOAP client. 26 * 27 * Implementations of this interface do NOT attempt to do intelligent things like figure out when and how to attach 28 * WS-Security headers. It is strictly meant to open sockets, shuttle messages over it, and return a response. 29 */ 30 @ThreadSafe 31 public interface SOAPClient { 32 33 /** 34 * Sends a message and waits for a response. 35 * 36 * @param endpoint the endpoint to which to send the message 37 * @param messageContext the message context containing the outbound SOAP message 38 * 39 * @throws SOAPClientException thrown if there is a problem sending the message or receiving the response or if the 40 * response is a SOAP fault 41 * @throws SecurityException thrown if the response does not meet any security policy associated with the message 42 * context 43 */ 44 public void send(String endpoint, SOAPMessageContext messageContext) throws SOAPException, SecurityException; 45 46 /** Marker interface for binding/transport request parameters. */ 47 public interface SOAPRequestParameters {}; 48 }