|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.jaxws.LocalJaxWsServiceFactory org.springframework.remoting.jaxws.JaxWsPortClientInterceptor
public class JaxWsPortClientInterceptor
MethodInterceptor
for accessing a
specific port of a JAX-WS service.
Uses either LocalJaxWsServiceFactory
's facilities underneath,
or takes an explicit reference to an existing JAX-WS Service instance
(e.g. obtained via JndiObjectFactoryBean
).
setPortName(java.lang.String)
,
setServiceInterface(java.lang.Class)
,
Service.getPort(javax.xml.namespace.QName, java.lang.Class)
,
RemoteAccessException
,
JndiObjectFactoryBean
Constructor Summary | |
---|---|
JaxWsPortClientInterceptor()
|
Method Summary | |
---|---|
void |
addCustomProperty(String name,
Object value)
Add a custom property to this JAX-WS BindingProvider. |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
protected Object |
doInvoke(MethodInvocation invocation)
Perform a JAX-WS service invocation based on the given method invocation. |
protected Object |
doInvoke(MethodInvocation invocation,
Object portStub)
Perform a JAX-WS service invocation on the given port stub. |
Map<String,Object> |
getCustomProperties()
Allow Map access to the custom properties to be set on the stub, with the option to add or override specific entries. |
String |
getEndpointAddress()
Return the endpoint address to specify on the stub. |
Service |
getJaxWsService()
Return a reference to an existing JAX-WS Service instance, if any. |
String |
getPassword()
Return the password to specify on the stub. |
String |
getPortName()
Return the name of the port. |
protected QName |
getPortQName()
Return the prepared QName for the port. |
protected Object |
getPortStub()
Return the underlying JAX-WS port stub that this interceptor delegates to for each method invocation on the proxy. |
Class |
getServiceInterface()
Return the interface of the service that this factory should create a proxy for. |
String |
getSoapActionUri()
Return the SOAP action URI to specify on the stub. |
String |
getUsername()
Return the username to specify on the stub. |
Object |
invoke(MethodInvocation invocation)
|
boolean |
isMaintainSession()
Return the "session.maintain" flag to specify on the stub. |
protected boolean |
isPrepared()
Return whether this client interceptor has already been prepared, i.e. has already looked up the JAX-WS service and port. |
boolean |
isUseSoapAction()
Return the "soapaction.use" flag to specify on the stub. |
void |
prepare()
|
protected void |
preparePortStub(Object stub)
Prepare the given JAX-WS port stub, applying properties to it. |
void |
setCustomProperties(Map<String,Object> customProperties)
Set custom properties to be set on the stub. |
void |
setEndpointAddress(String endpointAddress)
Set the endpoint address to specify on the stub. |
void |
setJaxWsService(Service jaxWsService)
Set a reference to an existing JAX-WS Service instance, for example obtained via JndiObjectFactoryBean . |
void |
setLookupServiceOnStartup(boolean lookupServiceOnStartup)
Set whether to look up the JAX-WS service on startup. |
void |
setMaintainSession(boolean maintainSession)
Set the "session.maintain" flag to specify on the stub. |
void |
setPassword(String password)
Set the password to specify on the stub. |
void |
setPortName(String portName)
Set the name of the port. |
void |
setServiceInterface(Class serviceInterface)
Set the interface of the service that this factory should create a proxy for. |
void |
setSoapActionUri(String soapActionUri)
Set the SOAP action URI to specify on the stub. |
void |
setUsername(String username)
Set the username to specify on the stub. |
void |
setUseSoapAction(boolean useSoapAction)
Set the "soapaction.use" flag to specify on the stub. |
Methods inherited from class org.springframework.remoting.jaxws.LocalJaxWsServiceFactory |
---|
createJaxWsService, getNamespaceUri, getQName, getServiceName, getWsdlDocumentUrl, setExecutor, setHandlerResolver, setNamespaceUri, setServiceName, setTaskExecutor, setWsdlDocumentUrl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JaxWsPortClientInterceptor()
Method Detail |
---|
public void setJaxWsService(Service jaxWsService)
JndiObjectFactoryBean
.
If not set, LocalJaxWsServiceFactory
's properties have to be specified.
LocalJaxWsServiceFactory.setWsdlDocumentUrl(java.net.URL)
,
LocalJaxWsServiceFactory.setNamespaceUri(java.lang.String)
,
LocalJaxWsServiceFactory.setServiceName(java.lang.String)
,
JndiObjectFactoryBean
public Service getJaxWsService()
public void setPortName(String portName)
public String getPortName()
public void setUsername(String username)
BindingProvider.USERNAME_PROPERTY
public String getUsername()
public void setPassword(String password)
BindingProvider.PASSWORD_PROPERTY
public String getPassword()
public void setEndpointAddress(String endpointAddress)
BindingProvider.ENDPOINT_ADDRESS_PROPERTY
public String getEndpointAddress()
public void setMaintainSession(boolean maintainSession)
BindingProvider.SESSION_MAINTAIN_PROPERTY
public boolean isMaintainSession()
public void setUseSoapAction(boolean useSoapAction)
BindingProvider.SOAPACTION_USE_PROPERTY
public boolean isUseSoapAction()
public void setSoapActionUri(String soapActionUri)
BindingProvider.SOAPACTION_URI_PROPERTY
public String getSoapActionUri()
public void setCustomProperties(Map<String,Object> customProperties)
Can be populated with a String "value" (parsed via PropertiesEditor) or a "props" element in XML bean definitions.
BindingProvider.getRequestContext()
public Map<String,Object> getCustomProperties()
Useful for specifying entries directly, for example via "customProperties[myKey]". This is particularly useful for adding or overriding entries in child bean definitions.
public void addCustomProperty(String name, Object value)
name
- the name of the attribute to exposevalue
- the attribute value to exposeBindingProvider.getRequestContext()
public void setServiceInterface(Class serviceInterface)
public Class getServiceInterface()
public void setLookupServiceOnStartup(boolean lookupServiceOnStartup)
Default is "true". Turn this flag off to allow for late start of the target server. In this case, the JAX-WS service will be lazily fetched on first access.
public void afterPropertiesSet()
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
public void prepare()
protected boolean isPrepared()
protected final QName getPortQName()
setPortName(java.lang.String)
,
LocalJaxWsServiceFactory.getQName(java.lang.String)
protected void preparePortStub(Object stub)
prepare()
.
stub
- the current JAX-WS port stubsetUsername(java.lang.String)
,
setPassword(java.lang.String)
,
setEndpointAddress(java.lang.String)
,
setMaintainSession(boolean)
,
setCustomProperties(java.util.Map)
protected Object getPortStub()
public Object invoke(MethodInvocation invocation) throws Throwable
invoke
in interface MethodInterceptor
Throwable
protected Object doInvoke(MethodInvocation invocation) throws Throwable
invocation
- the AOP method invocation
Throwable
- in case of invocation failuregetPortStub()
,
doInvoke(org.aopalliance.intercept.MethodInvocation, Object)
protected Object doInvoke(MethodInvocation invocation, Object portStub) throws Throwable
invocation
- the AOP method invocationportStub
- the RMI port stub to invoke
Throwable
- in case of invocation failuregetPortStub()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |