org.ow2.jonas.ws.jaxrpc.base
Class JAXRPCService

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jonas.lib.reconfig.ReconfigEmitter
          extended by org.ow2.jonas.lib.service.AbsServiceImpl
              extended by org.ow2.jonas.ws.jaxrpc.base.JAXRPCService
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, Service, JAXRPCServiceMBean, IJAXRPCService
Direct Known Subclasses:
AxisService

public abstract class JAXRPCService
extends AbsServiceImpl
implements IJAXRPCService, JAXRPCServiceMBean

implements deployment process and declares commons abstract methods for all (used) Web services engine. Actually we consider Glue and AXIS.

Author:
Guillaume Sauthier, Xavier Delplanque, S. Ali Tokmen (URL escaping issues when folders contain spaces)

Nested Class Summary
 class JAXRPCService.WSDeployInfo
          Store information about a webservices descriptor.
 
Field Summary
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Fields inherited from interface org.ow2.jonas.ws.jaxrpc.IJAXRPCService
CLASSLOADER_CTX_PARAM, ISINEAR_CTX_PARAM, PARENT_OBJECTNAME_CTX_PARAM, UNPACK_DIRECTORY_CTX_PARAM, WARURL_CTX_PARAM
 
Constructor Summary
JAXRPCService()
          Init local fields at the very beginning.
 
Method Summary
 void bindWSDLPublisherManager(WSDLPublisherManager wsdlManager)
          Bind the WSDLPublisherManager into this service
 Reference buildServiceRef(IServiceRefDesc rd, ClassLoader loader)
          buildServiceRef from WS ref descriptor
 void completeWSDeployment(Context ctx)
          Complete the WebServices Deployment (add informations in web environment).
abstract  JServiceFactory createServiceFactory()
          Return JServiceFactory instance
 void deployWebServices(Context ctx)
          Get, update and publish WSDL documents contained in a set of jars and wars.
protected  void doDeployWebServices(Context ctx)
          Deploy the given Web services.
 void doStart()
          Starts the JAX-RPC service.
 void doStop()
          Stops the JAX-RPC service.
protected static I18n getI18n()
           
protected static org.objectweb.util.monolog.api.Logger getLogger()
           
 String getUrlPrefix()
          Returns the URL prefixing all generated endpoint URL.
 boolean isAutoWsGenEngaged()
          Automatic WSGen is enabled ?
 boolean isParsingWithValidation()
          Validating parser or not ?
 void removeCache(ClassLoader cl)
          Remove WebServices descriptors associated to the given ClassLoader
 void setAutoWsGenEngaged(boolean engage)
          Engage Automatic WsGen ?
 void setJmxService(JmxService jmxService)
           
 void setNaming(JNamingManager naming)
           
 void setParsingWithValidation(boolean validate)
          Use validating parser or not .
 void setUrlPrefix(String prefix)
          Sets the URL prefixing all generated endpoint URL.
 void setWebService(JWebContainerService webService)
           
 void undeployWebServices(Context ctx)
          Undeploy the WebServices : unpublish WSDL + unregister MBeans.
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString
 
Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.ws.jaxrpc.IJAXRPCService
applyWSGen
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Constructor Detail

JAXRPCService

public JAXRPCService()
Init local fields at the very beginning.

Method Detail

createServiceFactory

public abstract JServiceFactory createServiceFactory()
Return JServiceFactory instance

Returns:
JServiceFactory instance

setUrlPrefix

public void setUrlPrefix(String prefix)
Description copied from interface: JAXRPCServiceMBean
Sets the URL prefixing all generated endpoint URL.

Specified by:
setUrlPrefix in interface JAXRPCServiceMBean
Parameters:
prefix - URL prefixing all generated endpoint URL.

setParsingWithValidation

public void setParsingWithValidation(boolean validate)
Description copied from interface: JAXRPCServiceMBean
Use validating parser or not .

Specified by:
setParsingWithValidation in interface JAXRPCServiceMBean
Parameters:
validate - validating parser or not ?

setAutoWsGenEngaged

public void setAutoWsGenEngaged(boolean engage)
Description copied from interface: JAXRPCServiceMBean
Engage Automatic WsGen ?

Specified by:
setAutoWsGenEngaged in interface JAXRPCServiceMBean
Parameters:
engage - Engage Automatic WsGen ?

deployWebServices

public void deployWebServices(Context ctx)
                       throws WSException
Get, update and publish WSDL documents contained in a set of jars and wars.

Specified by:
deployWebServices in interface IJAXRPCService
Parameters:
ctx - the context containing the configuration to deploy the wars.
This context contains the following parameters :
- jarUrls the list of the urls of the jars to deploy.
- warUrls the list of the urls of the wars to deploy.
- ejbClassLoader the classLoader of the ejbs(used for webapps too).
- earClassLoader the ear classLoader of the j2ee app.
- warCtxRootMapping the webapps contextRoots with associated war name.
- unpackDir the directory where EAR has been unpacked (optionnal for pure webapp webservices).
Throws:
WSException - if an error occurs during the deployment.

doDeployWebServices

protected void doDeployWebServices(Context ctx)
                            throws WSException
Deploy the given Web services.

Parameters:
ctx - Context used for parameter passing.
Throws:
WSException - when error occurs.

doStop

public void doStop()
            throws ServiceException
Stops the JAX-RPC service.

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - If the service stop fails

doStart

public void doStart()
             throws ServiceException
Starts the JAX-RPC service.

Specified by:
doStart in class AbsServiceImpl
Throws:
ServiceException - If the service startup fails

removeCache

public void removeCache(ClassLoader cl)
Remove WebServices descriptors associated to the given ClassLoader

Specified by:
removeCache in interface IJAXRPCService
Parameters:
cl - key ClassLoader

getI18n

protected static I18n getI18n()
Returns:
Returns the i18n.

getLogger

protected static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
Returns the logger.

completeWSDeployment

public void completeWSDeployment(Context ctx)
                          throws WSException
Description copied from interface: IJAXRPCService
Complete the WebServices Deployment (add informations in web environment).

Specified by:
completeWSDeployment in interface IJAXRPCService
Parameters:
ctx - Context containing the key ClassLoader
Throws:
WSException - When Endpoints URLs binding fails
See Also:
IJAXRPCService.completeWSDeployment(javax.naming.Context)

buildServiceRef

public Reference buildServiceRef(IServiceRefDesc rd,
                                 ClassLoader loader)
                          throws NamingException
buildServiceRef from WS ref descriptor

Specified by:
buildServiceRef in interface IJAXRPCService
Parameters:
rd - WS ref descriptor
Throws:
NamingException

undeployWebServices

public void undeployWebServices(Context ctx)
                         throws WSException
Description copied from interface: IJAXRPCService
Undeploy the WebServices : unpublish WSDL + unregister MBeans.

Specified by:
undeployWebServices in interface IJAXRPCService
Parameters:
ctx - Context containing undeployment informations
Throws:
WSException - When undeployment fails
See Also:
IJAXRPCService.undeployWebServices(javax.naming.Context)

isAutoWsGenEngaged

public boolean isAutoWsGenEngaged()
Automatic WSGen is enabled ?

Specified by:
isAutoWsGenEngaged in interface JAXRPCServiceMBean
Specified by:
isAutoWsGenEngaged in interface IJAXRPCService
Returns:
true if automatic WSGen needs to be Called.

getUrlPrefix

public String getUrlPrefix()
Returns the URL prefixing all generated endpoint URL.

Specified by:
getUrlPrefix in interface JAXRPCServiceMBean
Returns:
The URL prefixing all generated endpoint URL

isParsingWithValidation

public boolean isParsingWithValidation()
Validating parser or not ?

Specified by:
isParsingWithValidation in interface JAXRPCServiceMBean
Returns:
Validating parser or not

setWebService

public void setWebService(JWebContainerService webService)
Parameters:
webService - the webService to set

setJmxService

public void setJmxService(JmxService jmxService)
Parameters:
jmxService - the jmxService to set

setNaming

public void setNaming(JNamingManager naming)
Parameters:
naming - the naming to set

bindWSDLPublisherManager

public void bindWSDLPublisherManager(WSDLPublisherManager wsdlManager)
Bind the WSDLPublisherManager into this service

Parameters:
wsdlManager - the manager to use


Copyright © 2010 OW2 Consortium. All Rights Reserved.