Methods Summary |
---|
public com.sun.xml.rpc.spi.runtime.ImplementorCache | createImplementorCache(javax.servlet.ServletConfig sc)
ImplementorCache ic = rpcFactory_.createImplementorCache(sc);
ImplementorCacheDelegate delegate =
new ImplementorCacheDelegateImpl(sc);
ic.setDelegate(delegate);
return ic;
|
public void | destroy()
wsEngine_.removeHandler(endpoint_);
|
public void | doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
// normal WSDL retrieval invocation
WsUtil wsUtil = new WsUtil();
try {
wsUtil.handleGet(request, response, endpoint_);
} catch(Exception e) {
logger.log(Level.WARNING, "Servlet web service endpoint '" +
endpoint_.getEndpointName() + "' HTTP GET error", e);
}
|
public void | doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
rpcDelegate_.doPost(request, response);
|
public void | postInit(javax.servlet.ServletConfig servletConfig)
servletConfig_ = servletConfig;
String servletName = "unknown";
try {
InvocationManager invManager =
Switch.getSwitch().getInvocationManager();
ComponentInvocation inv = invManager.getCurrentInvocation();
Object containerContext = inv.getContainerContext();
WebBundleDescriptor webBundle = (WebBundleDescriptor)
Switch.getSwitch().getDescriptorFor(containerContext);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
servletName = servletConfig.getServletName();
WebComponentDescriptor webComponent =
webBundle.getWebComponentByCanonicalName(servletName);
if( webComponent != null ) {
WebServicesDescriptor webServices = webBundle.getWebServices();
Collection endpoints =
webServices.getEndpointsImplementedBy(webComponent);
// Only 1 endpoint per servlet is supported, even though
// data structure implies otherwise.
endpoint_ = (WebServiceEndpoint) endpoints.iterator().next();
registerEndpoint(classLoader);
// if a conventional authentication mechanism has NOT been configured
// for the endpoint create and install system handler for web services
// security
SystemHandlerDelegate securityHandlerDelegate = null;
if (!endpoint_.hasAuthMethod()) {
try {
ServerAuthConfig config = ServerAuthConfig.getConfig
(com.sun.enterprise.security.jauth.AuthConfig.SOAP,
endpoint_.getMessageSecurityBinding(),
null);
if (config != null) {
securityHandlerDelegate =
new ServletSystemHandlerDelegate(config, endpoint_);
rpcDelegate_.setSystemHandlerDelegate(securityHandlerDelegate);
}
} catch (Exception e) {
logger.log(Level.SEVERE,
"Servlet Webservice security configuration Failure", e);
}
}
// need to invoke the endpoint lifecylcle
endpointImpl_ = (JAXRPCEndpointImpl)wsEngine_.createHandler(securityHandlerDelegate, endpoint_);
rpcDelegate_.setSystemHandlerDelegate(endpointImpl_);
} else {
throw new ServletException(servletName + " not found");
}
} catch(Throwable t) {
logger.log(Level.WARNING, "Servlet web service endpoint '" +
servletName + "' failure", t);
ServletException se = new ServletException();
se.initCause(t);
throw se;
}
|
private void | registerEndpoint(java.lang.ClassLoader loader)
//
// Convert J2EE deployment descriptor information into
// JAXRPC endpoint data structure
//
RuntimeEndpointInfo endpointInfo =
rpcFactory_.createRuntimeEndpointInfo();
Class serviceEndpointInterfaceClass =
loader.loadClass(endpoint_.getServiceEndpointInterface());
Class implementationClass =
loader.loadClass(endpoint_.getServletImplClass());
String tieClassName = endpoint_.getTieClassName();
if(tieClassName != null) {
Class tieClass = loader.loadClass(tieClassName);
endpointInfo.setTieClass(tieClass);
}
endpointInfo.setRemoteInterface(serviceEndpointInterfaceClass);
endpointInfo.setImplementationClass(implementationClass);
endpointInfo.setName(endpoint_.getEndpointName());
WebService webService = endpoint_.getWebService();
// No need to set model file name or wsdl file, since we override
// the code that serves up the final WSDL.
//endpointInfo.setModelFileName()
//endpointInfo.setWSDLFileName()
endpointInfo.setDeployed(true);
endpointInfo.setPortName(endpoint_.getWsdlPort());
endpointInfo.setServiceName(endpoint_.getServiceName());
// For web components, this will be relative to the web app
// context root. Make sure there is a leading slash.
String uri = endpoint_.getEndpointAddressUri();
uri = uri.startsWith("/") ? uri : "/" + uri;
endpointInfo.setUrlPattern(uri);
rpcDelegate_.registerEndpointUrlPattern(endpointInfo);
|
public void | warnMissingContextInformation()
// context info not used within j2ee integration, so override
// this method to prevent warning message
|