/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SOAPReceiver.java,v 1.3 2008/06/25 05:47:23 qcheng Exp $
*
*/
/*
* Portions Copyrighted 2013 ForgeRock, Inc.
*/
/**
* The <code>SOAPReceiver</code> class defines a SOAP Receiver which supports
* SOAP over HTTP binding. It receives requests sent from <code>Client</code>.
* During the startup, it will read <code>RequestHandler</code> from SOAP
* binding SM schema and store in a static HashMap. Each
* <code>RequestHandler</code> is associated with a unique key. When a web
* service client uses <code>Client</code> to send request, the SOAP URL must
* be in the format of 'this_servlet_URL>/key'. The <code>SOAPReceiver</code>
* will parse the SOAP URL to get the key and use it to find corresponding
* <code>RequestHandler</code>. After it is done processing, it will invoke
* <code>RequestHandler.processRequest</code> to let web service to do further
* processing.
*/
/**
* Initializes the Servlet.
*
* @param config the <code>ServletConfig</code>.
* @throws ServletException if there is any error.
*/
try {
} catch (SOAPException ex) {
"factory failed.");
}
}
/**
* Processes HTTP request and sends back HTTP response. It gets called
* internally by the servlet engine.
*
* @param request the HTTP request.
* @param response the HTTP response.
* @throws IOException if an IO error occurs while processing
the request
* @throws ServletException if an servlet error occurs while processing
* the request
*/
throws IOException, ServletException {
try {
if (soapMessageReply != null) {
} else {
}
} catch (SOAPException se) {
throw new ServletException(se);
}
}
/**
* Processes the request message and invokes
* <code>RequestHandler.processRequest</code>.
*
* @param message request received from the requestor
* @param request the HTTP request
* @return response being sent to the requestor
*/
}
}
}
// remove leading '/'
"\nSOAPAction = " + soapAction +
"\nremoteAttr = " + remoteAddr);
}
if (soapAction != null) {
if (supportedSOAPActions != null &&
!supportedSOAPActions.isEmpty() &&
null);
}
}
try {
req);
}
"authMech = " + authMech +
", isClientAuthentication = " +
}
req);
}
if (wsAuthenticator == null) {
req);
}
key };
return resp.toSOAPMessage();
} else {
"Unable to sign response");
return FormSOAPError("Server",
"cannotSignResponse", req);
}
}
} catch (SOAPFaultException sfe) {
}
"got SOAPFaultException", sfe);
}
try {
}
}
return sfmsg.toSOAPMessage();
}
} catch (Throwable t) {
}
} else {
}
}
}
/**
* Constructs a SOAPMessage with specified fault code and Throwable.
* The fault string will be Throwable.getMessage();
* The fault code will have same namespace of soap envelope.
*
* @param faultCode the fault code
* @param throwable the Throwable
* @param req the request Message
* @return the SOAPMessage object
*/
}
}
/**
* Constructs a SOAPMessage with specified fault code and fault string.
* The fault code will have same namespace of soap envelope.
*
* @param faultCode the fault code
* @param faultStringKey the fault string key to resource bundle
* @param req the request Message
* @return the SOAPMessage object
*/
}
/**
* Constructs a SOAPMessage with specified fault code and fault string.
* The fault code will have same namespace of soap envelope.
*
* @param req the request Message
* @param faultCode the fault code
* @param faultString the fault string
* @return the SOAPMessage object
*/
String faultString ) {
} else {
}
try {
return resp.toSOAPMessage();
} catch (Exception e ) {
}
return null;
}
}