org.apache.cxf.service.factory
Class ReflectionServiceFactoryBean
java.lang.Object
org.apache.cxf.service.factory.AbstractServiceFactoryBean
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
public class ReflectionServiceFactoryBean
- extends org.apache.cxf.service.factory.AbstractServiceFactoryBean
Introspects a class and builds a Service from it. If a WSDL URL is specified,
a Service model will be directly from the WSDL and then metadata will be filled in
from the service class. If no WSDL URL is specified, the Service will be constructed
directly from the class structure.
|
Method Summary |
protected org.apache.cxf.service.model.FaultInfo |
addFault(org.apache.cxf.service.model.InterfaceInfo service,
org.apache.cxf.service.model.OperationInfo op,
java.lang.Class exClass)
|
protected void |
buildServiceFromClass()
|
protected void |
buildServiceFromWSDL(java.net.URL url)
|
org.apache.cxf.service.Service |
create()
|
org.apache.cxf.endpoint.Endpoint |
createEndpoint(org.apache.cxf.service.model.EndpointInfo ei)
|
protected void |
createEndpoints()
|
protected org.apache.cxf.service.model.InterfaceInfo |
createInterface(org.apache.cxf.service.model.ServiceInfo serviceInfo)
|
protected org.apache.cxf.service.invoker.Invoker |
createInvoker()
|
protected void |
createMessageParts(org.apache.cxf.service.model.InterfaceInfo intf,
org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method)
|
protected org.apache.cxf.service.model.OperationInfo |
createOperation(org.apache.cxf.service.model.ServiceInfo serviceInfo,
org.apache.cxf.service.model.InterfaceInfo intf,
java.lang.reflect.Method m)
|
protected javax.xml.namespace.QName |
createOutputMessageName(org.apache.cxf.service.model.OperationInfo op)
|
protected org.apache.cxf.service.model.ServiceInfo |
createServiceInfo(org.apache.cxf.service.model.InterfaceInfo intf)
|
protected java.lang.String |
getAction(org.apache.cxf.service.model.OperationInfo op)
|
protected java.lang.Class<?> |
getBeanClass(java.lang.Class<?> exClass)
|
java.util.List<AbstractServiceConfiguration> |
getConfigurations()
|
javax.xml.namespace.QName |
getEndpointName()
|
java.util.concurrent.Executor |
getExecutor()
|
protected javax.xml.namespace.QName |
getFaultName(org.apache.cxf.service.model.InterfaceInfo service,
org.apache.cxf.service.model.OperationInfo o,
java.lang.Class exClass,
java.lang.Class beanClass)
|
protected java.lang.Class |
getHolderClass(java.lang.reflect.ParameterizedType paramType)
|
java.util.List<java.lang.String> |
getIgnoredClasses()
|
protected javax.xml.namespace.QName |
getInParameterName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
|
protected javax.xml.namespace.QName |
getInPartName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
|
protected javax.xml.namespace.QName |
getInputMessageName(org.apache.cxf.service.model.OperationInfo op)
|
protected javax.xml.namespace.QName |
getInterfaceName()
|
org.apache.cxf.service.invoker.Invoker |
getInvoker()
|
protected SimpleMethodDispatcher |
getMethodDispatcher()
|
protected javax.xml.namespace.QName |
getOperationName(org.apache.cxf.service.model.InterfaceInfo service,
java.lang.reflect.Method method)
Creates a name for the operation from the method name. |
protected javax.xml.namespace.QName |
getOutParameterName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
|
protected javax.xml.namespace.QName |
getOutPartName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
|
protected java.lang.Class |
getRequestWrapper(java.lang.reflect.Method selected)
|
protected java.lang.Class |
getResponseWrapper(java.lang.reflect.Method selected)
|
java.lang.Class<?> |
getServiceClass()
|
java.util.List<AbstractServiceConfiguration> |
getServiceConfigurations()
|
protected java.lang.String |
getServiceName()
|
protected java.lang.String |
getServiceNamespace()
|
protected javax.xml.namespace.QName |
getServiceQName()
|
java.net.URL |
getWsdlURL()
|
protected boolean |
hasOutMessage(java.lang.reflect.Method m)
|
protected void |
initializeFaults(org.apache.cxf.service.model.InterfaceInfo service,
org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method)
|
protected void |
initializeParameter(org.apache.cxf.service.model.MessagePartInfo part,
java.lang.Class rawClass,
java.lang.reflect.Type type)
|
protected void |
initializeServiceConfigurations()
|
protected void |
initializeServiceModel()
|
protected void |
initializeWrappedSchema(org.apache.cxf.service.model.ServiceInfo serviceInfo)
|
protected void |
initializeWSDLOperation(org.apache.cxf.service.model.InterfaceInfo intf,
org.apache.cxf.service.model.OperationInfo o,
java.lang.reflect.Method selected)
|
protected void |
initializeWSDLOperations()
|
protected boolean |
isAsync(java.lang.reflect.Method method)
|
boolean |
isHeader(java.lang.reflect.Method method,
int j)
|
protected boolean |
isInParam(java.lang.reflect.Method method,
int j)
|
protected boolean |
isMatchOperation(java.lang.String methodNameInClass,
java.lang.String methodNameInWsdl)
|
protected boolean |
isOutParam(java.lang.reflect.Method method,
int j)
|
protected boolean |
isValidMethod(java.lang.reflect.Method method)
|
boolean |
isWrapped()
|
protected boolean |
isWrapped(java.lang.reflect.Method method)
|
void |
setConfigurations(java.util.List<AbstractServiceConfiguration> configurations)
|
void |
setExecutor(java.util.concurrent.Executor executor)
|
void |
setIgnoredClasses(java.util.List<java.lang.String> ignoredClasses)
|
void |
setInvoker(org.apache.cxf.service.invoker.Invoker invoker)
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
|
void |
setServiceClass(java.lang.Class<?> serviceClass)
|
void |
setServiceConfigurations(java.util.List<AbstractServiceConfiguration> serviceConfigurations)
|
void |
setServiceName(javax.xml.namespace.QName serviceName)
|
void |
setWrapped(boolean style)
|
void |
setWsdlURL(java.net.URL wsdlURL)
|
| Methods inherited from class org.apache.cxf.service.factory.AbstractServiceFactoryBean |
getBus, getDataBinding, getService, initializeDataBindings, initializeDefaultInterceptors, setBus, setDataBinding, setService |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GENERIC_TYPE
public static final java.lang.String GENERIC_TYPE
- See Also:
- Constant Field Values
MODE_OUT
public static final java.lang.String MODE_OUT
- See Also:
- Constant Field Values
MODE_INOUT
public static final java.lang.String MODE_INOUT
- See Also:
- Constant Field Values
HOLDER
public static final java.lang.String HOLDER
- See Also:
- Constant Field Values
wsdlURL
protected java.net.URL wsdlURL
serviceClass
protected java.lang.Class<?> serviceClass
ReflectionServiceFactoryBean
public ReflectionServiceFactoryBean()
create
public org.apache.cxf.service.Service create()
- Specified by:
create in class org.apache.cxf.service.factory.AbstractServiceFactoryBean
createEndpoints
protected void createEndpoints()
createEndpoint
public org.apache.cxf.endpoint.Endpoint createEndpoint(org.apache.cxf.service.model.EndpointInfo ei)
throws org.apache.cxf.endpoint.EndpointException
- Throws:
org.apache.cxf.endpoint.EndpointException
initializeServiceConfigurations
protected void initializeServiceConfigurations()
buildServiceFromWSDL
protected void buildServiceFromWSDL(java.net.URL url)
buildServiceFromClass
protected void buildServiceFromClass()
initializeServiceModel
protected void initializeServiceModel()
initializeWSDLOperations
protected void initializeWSDLOperations()
initializeWSDLOperation
protected void initializeWSDLOperation(org.apache.cxf.service.model.InterfaceInfo intf,
org.apache.cxf.service.model.OperationInfo o,
java.lang.reflect.Method selected)
createInvoker
protected org.apache.cxf.service.invoker.Invoker createInvoker()
createServiceInfo
protected org.apache.cxf.service.model.ServiceInfo createServiceInfo(org.apache.cxf.service.model.InterfaceInfo intf)
createInterface
protected org.apache.cxf.service.model.InterfaceInfo createInterface(org.apache.cxf.service.model.ServiceInfo serviceInfo)
createOperation
protected org.apache.cxf.service.model.OperationInfo createOperation(org.apache.cxf.service.model.ServiceInfo serviceInfo,
org.apache.cxf.service.model.InterfaceInfo intf,
java.lang.reflect.Method m)
initializeWrappedSchema
protected void initializeWrappedSchema(org.apache.cxf.service.model.ServiceInfo serviceInfo)
createMessageParts
protected void createMessageParts(org.apache.cxf.service.model.InterfaceInfo intf,
org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method)
initializeParameter
protected void initializeParameter(org.apache.cxf.service.model.MessagePartInfo part,
java.lang.Class rawClass,
java.lang.reflect.Type type)
getHolderClass
protected java.lang.Class getHolderClass(java.lang.reflect.ParameterizedType paramType)
getServiceQName
protected javax.xml.namespace.QName getServiceQName()
getEndpointName
public javax.xml.namespace.QName getEndpointName()
getServiceName
protected java.lang.String getServiceName()
getServiceNamespace
protected java.lang.String getServiceNamespace()
getInterfaceName
protected javax.xml.namespace.QName getInterfaceName()
isValidMethod
protected boolean isValidMethod(java.lang.reflect.Method method)
isWrapped
protected boolean isWrapped(java.lang.reflect.Method method)
isMatchOperation
protected boolean isMatchOperation(java.lang.String methodNameInClass,
java.lang.String methodNameInWsdl)
isOutParam
protected boolean isOutParam(java.lang.reflect.Method method,
int j)
isInParam
protected boolean isInParam(java.lang.reflect.Method method,
int j)
getInputMessageName
protected javax.xml.namespace.QName getInputMessageName(org.apache.cxf.service.model.OperationInfo op)
createOutputMessageName
protected javax.xml.namespace.QName createOutputMessageName(org.apache.cxf.service.model.OperationInfo op)
hasOutMessage
protected boolean hasOutMessage(java.lang.reflect.Method m)
initializeFaults
protected void initializeFaults(org.apache.cxf.service.model.InterfaceInfo service,
org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method)
addFault
protected org.apache.cxf.service.model.FaultInfo addFault(org.apache.cxf.service.model.InterfaceInfo service,
org.apache.cxf.service.model.OperationInfo op,
java.lang.Class exClass)
getBeanClass
protected java.lang.Class<?> getBeanClass(java.lang.Class<?> exClass)
getFaultName
protected javax.xml.namespace.QName getFaultName(org.apache.cxf.service.model.InterfaceInfo service,
org.apache.cxf.service.model.OperationInfo o,
java.lang.Class exClass,
java.lang.Class beanClass)
getAction
protected java.lang.String getAction(org.apache.cxf.service.model.OperationInfo op)
isHeader
public boolean isHeader(java.lang.reflect.Method method,
int j)
getOperationName
protected javax.xml.namespace.QName getOperationName(org.apache.cxf.service.model.InterfaceInfo service,
java.lang.reflect.Method method)
- Creates a name for the operation from the method name. If an operation
with that name already exists, a name is create by appending an integer
to the end. I.e. if there is already two methods named
doSomething, the first one will have an operation name of
"doSomething" and the second "doSomething1".
- Parameters:
service - method -
isAsync
protected boolean isAsync(java.lang.reflect.Method method)
getInPartName
protected javax.xml.namespace.QName getInPartName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
getInParameterName
protected javax.xml.namespace.QName getInParameterName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
getOutParameterName
protected javax.xml.namespace.QName getOutParameterName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
getOutPartName
protected javax.xml.namespace.QName getOutPartName(org.apache.cxf.service.model.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber)
getResponseWrapper
protected java.lang.Class getResponseWrapper(java.lang.reflect.Method selected)
getRequestWrapper
protected java.lang.Class getRequestWrapper(java.lang.reflect.Method selected)
getMethodDispatcher
protected SimpleMethodDispatcher getMethodDispatcher()
getConfigurations
public java.util.List<AbstractServiceConfiguration> getConfigurations()
setConfigurations
public void setConfigurations(java.util.List<AbstractServiceConfiguration> configurations)
getServiceClass
public java.lang.Class<?> getServiceClass()
setServiceClass
public void setServiceClass(java.lang.Class<?> serviceClass)
getWsdlURL
public java.net.URL getWsdlURL()
setWsdlURL
public void setWsdlURL(java.net.URL wsdlURL)
getServiceConfigurations
public java.util.List<AbstractServiceConfiguration> getServiceConfigurations()
setServiceConfigurations
public void setServiceConfigurations(java.util.List<AbstractServiceConfiguration> serviceConfigurations)
setServiceName
public void setServiceName(javax.xml.namespace.QName serviceName)
getInvoker
public org.apache.cxf.service.invoker.Invoker getInvoker()
setInvoker
public void setInvoker(org.apache.cxf.service.invoker.Invoker invoker)
getExecutor
public java.util.concurrent.Executor getExecutor()
setExecutor
public void setExecutor(java.util.concurrent.Executor executor)
getIgnoredClasses
public java.util.List<java.lang.String> getIgnoredClasses()
setIgnoredClasses
public void setIgnoredClasses(java.util.List<java.lang.String> ignoredClasses)
isWrapped
public boolean isWrapped()
setWrapped
public void setWrapped(boolean style)
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.