sepMetaData.setConfigName(configName, configFile);
}
protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
{
WebContext anWebContext = wsClass.getAnnotation(WebContext.class);
if (anWebContext == null)
return;
boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);
// context-root
if (anWebContext.contextRoot().length() > 0)
{
if (isJSEEndpoint)
{
log.warn("@WebContext.contextRoot is only valid on EJB endpoints");
}
else
{
String contextRoot = anWebContext.contextRoot();
if (contextRoot.startsWith("/") == false)
contextRoot = "/" + contextRoot;
sepMetaData.setContextRoot(contextRoot);
}
}
// url-pattern
if (anWebContext.urlPattern().length() > 0)
{
if (isJSEEndpoint)
{
log.warn("@WebContext.urlPattern is only valid on EJB endpoints");
}
else
{
String urlPattern = anWebContext.urlPattern();
sepMetaData.setURLPattern(urlPattern);
}
}
// auth-method
if (anWebContext.authMethod().length() > 0)
{
if (isJSEEndpoint)
{
log.warn("@WebContext.authMethod is only valid on EJB endpoints");
}
else
{
String authMethod = anWebContext.authMethod();
sepMetaData.setAuthMethod(authMethod);
}
}
// transport-guarantee
if (anWebContext.transportGuarantee().length() > 0)
{
if (isJSEEndpoint)
{
log.warn("@WebContext.transportGuarantee is only valid on EJB endpoints");
}
else
{
String transportGuarantee = anWebContext.transportGuarantee();
sepMetaData.setTransportGuarantee(transportGuarantee);
}
}
// secure wsdl access
sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
// virtual hosts
String[] virtualHosts = anWebContext.virtualHosts();
if (virtualHosts != null & virtualHosts.length > 0)
{
sepMetaData.setVirtualHosts(virtualHosts);
}
}