org.springframework.remoting.jaxrpc
Class LocalJaxRpcServiceFactory

java.lang.Object
  extended by org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory
Direct Known Subclasses:
JaxRpcPortClientInterceptor, LocalJaxRpcServiceFactoryBean

public class LocalJaxRpcServiceFactory
extends Object

Factory for locally defined JAX-RPC Service references. Uses a JAX-RPC ServiceFactory underneath.

Since:
15.12.2003
Author:
Juergen Hoeller
See Also:
ServiceFactory, Service

Field Summary
protected  Log logger
           
 
Constructor Summary
LocalJaxRpcServiceFactory()
           
 
Method Summary
 Service createJaxRpcService()
          Create a JAX-RPC Service according to the parameters of this factory.
 ServiceFactory createServiceFactory()
          Create a JAX-RPC ServiceFactory, either of the specified class or the default.
 String getNamespaceUri()
          Return the namespace URI of the service.
 QName getQName(String name)
          Return a QName for the given name, relative to the namespace URI of this factory, if given.
 Class getServiceFactoryClass()
          Return the ServiceFactory class to use, or null if default.
 String getServiceName()
          Return the name of the service.
 JaxRpcServicePostProcessor[] getServicePostProcessors()
          Return the JaxRpcServicePostProcessors to be applied to JAX-RPC Service instances created by this factory.
 URL getWsdlDocumentUrl()
          Return the URL of the WSDL document that describes the service.
protected  void postProcessJaxRpcService(Service service)
          Post-process the given JAX-RPC Service.
 void setNamespaceUri(String namespaceUri)
          Set the namespace URI of the service.
 void setServiceFactoryClass(Class serviceFactoryClass)
          Set the ServiceFactory class to use, for example "org.apache.axis.client.ServiceFactory".
 void setServiceName(String serviceName)
          Set the name of the service.
 void setServicePostProcessors(JaxRpcServicePostProcessor[] servicePostProcessors)
          Set the JaxRpcServicePostProcessors to be applied to JAX-RPC Service instances created by this factory.
 void setWsdlDocumentUrl(URL wsdlDocumentUrl)
          Set the URL of the WSDL document that describes the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger
Constructor Detail

LocalJaxRpcServiceFactory

public LocalJaxRpcServiceFactory()
Method Detail

setServiceFactoryClass

public void setServiceFactoryClass(Class serviceFactoryClass)
Set the ServiceFactory class to use, for example "org.apache.axis.client.ServiceFactory".

Does not need to be set if the JAX-RPC implementation has registered itself with the JAX-RPC system property "SERVICEFACTORY_PROPERTY".

See Also:
ServiceFactory

getServiceFactoryClass

public Class getServiceFactoryClass()
Return the ServiceFactory class to use, or null if default.


setWsdlDocumentUrl

public void setWsdlDocumentUrl(URL wsdlDocumentUrl)
Set the URL of the WSDL document that describes the service.


getWsdlDocumentUrl

public URL getWsdlDocumentUrl()
Return the URL of the WSDL document that describes the service.


setNamespaceUri

public void setNamespaceUri(String namespaceUri)
Set the namespace URI of the service. Corresponds to the WSDL "targetNamespace".


getNamespaceUri

public String getNamespaceUri()
Return the namespace URI of the service.


setServiceName

public void setServiceName(String serviceName)
Set the name of the service. Corresponds to the "wsdl:service" name.


getServiceName

public String getServiceName()
Return the name of the service.


setServicePostProcessors

public void setServicePostProcessors(JaxRpcServicePostProcessor[] servicePostProcessors)
Set the JaxRpcServicePostProcessors to be applied to JAX-RPC Service instances created by this factory.

Such post-processors can, for example, register custom type mappings. They are reusable across all pre-built subclasses of this factory: LocalJaxRpcServiceFactoryBean, JaxRpcPortClientInterceptor, JaxRpcPortProxyFactoryBean.

See Also:
LocalJaxRpcServiceFactoryBean, JaxRpcPortClientInterceptor, JaxRpcPortProxyFactoryBean

getServicePostProcessors

public JaxRpcServicePostProcessor[] getServicePostProcessors()
Return the JaxRpcServicePostProcessors to be applied to JAX-RPC Service instances created by this factory.


getQName

public QName getQName(String name)
Return a QName for the given name, relative to the namespace URI of this factory, if given.

See Also:
setNamespaceUri(java.lang.String)

createServiceFactory

public ServiceFactory createServiceFactory()
                                    throws ServiceException
Create a JAX-RPC ServiceFactory, either of the specified class or the default.

Throws:
ServiceException
See Also:
setServiceFactoryClass(java.lang.Class)

createJaxRpcService

public Service createJaxRpcService()
                            throws ServiceException
Create a JAX-RPC Service according to the parameters of this factory.

Throws:
ServiceException
See Also:
setServiceName(java.lang.String), setWsdlDocumentUrl(java.net.URL), postProcessJaxRpcService(javax.xml.rpc.Service)

postProcessJaxRpcService

protected void postProcessJaxRpcService(Service service)
Post-process the given JAX-RPC Service. Called by createJaxRpcService. Useful, for example, to register custom type mappings.

Default implementation delegates to all registered JaxRpcServicePostProcessors. It is usually preferable to implement custom type mappings etc there rather than in a subclass of this factory, to be able to reuse the post-processors.

Parameters:
service - the current JAX-RPC Service (can be cast to an implementation-specific class if necessary)
See Also:
createJaxRpcService(), setServicePostProcessors(org.springframework.remoting.jaxrpc.JaxRpcServicePostProcessor[]), Service.getTypeMappingRegistry()


Copyright (c) 2002-2005 The Spring Framework Project.