|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.xfire.spring.remoting.XFireClientFactoryBean
public class XFireClientFactoryBean
Factory bean to easily create XFire clients via Spring, if the service's Java
interface is available. Naming of properties is done to be the same as
org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean
.
The only mandatory properties to set before using this factory are:
setServiceClass(Class)
and setWsdlDocumentUrl(String)
.
By default this factory bean creates a service endpoint using an instance of
ObjectServiceFactory
. Another one can
be configured using setServiceFactory(ServiceFactory)
serviceName and namespaceUri can be derived from the content of the WSDL document
(if the document only contains one service), but unfortunately that does not (yet)
work if username/password needs to be supplied to get at the WSDL.
Constructor Summary | |
---|---|
XFireClientFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
javax.xml.namespace.QName |
getEndpoint()
|
java.util.List |
getFaultHandlers()
|
java.util.List |
getInHandlers()
|
boolean |
getLookupServiceOnStartup()
Gets whether to look up the XFire service on startup. |
java.lang.String |
getNamespaceUri()
Gets the default namespace for the service. |
java.lang.Object |
getObject()
|
java.lang.Class |
getObjectType()
|
java.util.List |
getOutHandlers()
|
java.lang.String |
getPassword()
Gets the password for HTTP basic authentication. |
java.util.Map |
getProperties()
The properties that will be set on the Client. |
java.lang.Class |
getServiceClass()
|
org.codehaus.xfire.service.ServiceFactory |
getServiceFactory()
|
java.lang.Class |
getServiceInterface()
|
java.lang.String |
getServiceName()
Gets the name of the service. |
java.lang.String |
getUrl()
|
java.lang.String |
getUsername()
Gets the username for HTTP basic authentication. |
protected javax.wsdl.Definition |
getWSDLDefinition()
Gets the Definition contained in the WSDL document (does not currently support reading WSDL that is protected with authentication). |
java.lang.String |
getWsdlDocumentUrl()
|
boolean |
isSingleton()
|
void |
setEndpoint(javax.xml.namespace.QName name)
Set the name of the Endpoint/Port in the WSDL to use with the Client. |
void |
setFaultHandlers(java.util.List faultHandlers)
|
void |
setInHandlers(java.util.List inHandlers)
|
void |
setLookupServiceOnStartup(boolean lookupServiceOnStartup)
Sets whether to look up the XFire service on startup. |
void |
setNamespaceUri(java.lang.String namespace)
Sets the default namespace for the service. |
void |
setOutHandlers(java.util.List outHandlers)
|
void |
setPassword(java.lang.String password)
Sets the password for HTTP basic authentication. |
void |
setProperties(java.util.Map properties)
Set the properties for the Client. |
void |
setServiceClass(java.lang.Class serviceClass)
|
void |
setServiceFactory(org.codehaus.xfire.service.ServiceFactory factory)
Sets the service factory that will be used to create a client. |
void |
setServiceInterface(java.lang.Class serviceClass)
|
void |
setServiceName(java.lang.String serviceName)
Sets the name of the service to access. |
void |
setUrl(java.lang.String _url)
Set the URL the Client is to invoke. |
void |
setUsername(java.lang.String username)
Sets the username for HTTP basic authentication. |
void |
setWsdlDocumentUrl(java.lang.String wsdlUrl)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XFireClientFactoryBean()
Method Detail |
---|
public java.lang.Object getObject() throws java.lang.Exception
getObject
in interface org.springframework.beans.factory.FactoryBean
java.lang.Exception
public java.lang.Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public org.codehaus.xfire.service.ServiceFactory getServiceFactory()
public void setServiceFactory(org.codehaus.xfire.service.ServiceFactory factory)
ObjectServiceFactory
will
be used.
factory
- service factory this factory should use to create a clientpublic java.lang.Class getServiceClass()
public void setServiceInterface(java.lang.Class serviceClass)
serviceClass
- The interface implemented by the service called via the proxy.public java.lang.Class getServiceInterface()
public void setServiceClass(java.lang.Class serviceClass)
serviceClass
- The interface implemented by the service called via the proxy.public java.lang.String getWsdlDocumentUrl()
public void setWsdlDocumentUrl(java.lang.String wsdlUrl)
wsdlUrl
- The URL where the WSDL to this service can be found.public java.lang.String getServiceName()
null
the name will be
looked up from the WSDL, or generated from the interface name by XFire.
public void setServiceName(java.lang.String serviceName)
null
the
name will be looked up from the WSDL, or generated from the interface
name by XFire.
serviceName
- The service name to set.public java.lang.String getNamespaceUri()
null
the
namespace will be looked up from the WSDL, or generated from the
interface package by XFire.
public void setNamespaceUri(java.lang.String namespace)
null
the namespace will be looked up from the WSDL, or generated from the
interface package by XFire.
namespace
- The namespace to set.public boolean getLookupServiceOnStartup()
public void setLookupServiceOnStartup(boolean lookupServiceOnStartup)
true
.
Can be set to false
to allow for late start of the target
server. In this case, the XFire service client proxy will be created on
first access. This does add some overhead (on each call) since
synchronization is used to ensure only one client proxy is ever created,
furthermore errors in the WSDL document URL are not detected until the
first call.
lookupServiceOnStartup
- whether to look up the service on startup.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The username to set.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The password to set.public java.util.Map getProperties()
public void setProperties(java.util.Map properties)
public javax.xml.namespace.QName getEndpoint()
public void setEndpoint(javax.xml.namespace.QName name)
name
- public java.lang.String getUrl()
public void setUrl(java.lang.String _url)
public java.util.List getFaultHandlers()
public void setFaultHandlers(java.util.List faultHandlers)
public java.util.List getInHandlers()
public void setInHandlers(java.util.List inHandlers)
public java.util.List getOutHandlers()
public void setOutHandlers(java.util.List outHandlers)
protected javax.wsdl.Definition getWSDLDefinition() throws java.lang.Exception
java.lang.Exception
- if the definition could not be readpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |