public class ReflectionServiceFactoryBean extends AbstractServiceFactoryBean
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.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT_NAME |
static java.lang.String |
ENDPOINT_CLASS |
static java.lang.String |
EXTRA_CLASS |
static java.lang.String |
FORCE_TYPES |
static java.lang.String |
GENERIC_TYPE |
static java.lang.String |
HEADER |
static java.lang.String |
HOLDER |
static java.lang.String |
METHOD |
static java.lang.String |
METHOD_ANNOTATIONS |
static java.lang.String |
METHOD_PARAM_ANNOTATIONS |
static java.lang.String |
MODE_INOUT |
static java.lang.String |
MODE_OUT |
static java.lang.String |
PARAM_ANNOTATION |
protected java.util.Map<java.lang.reflect.Type,java.util.Map<java.lang.String,java.lang.Class<?>>> |
parameterizedTypes |
static java.lang.String |
RAW_CLASS |
protected java.util.Map<java.lang.String,java.lang.String> |
schemaLocationMapping |
protected java.lang.Class<?> |
serviceClass |
protected java.lang.reflect.ParameterizedType |
serviceType |
static java.lang.String |
WRAPPERGEN_NEEDED |
protected java.lang.String |
wsdlURL |
dataBindingSet, schemaLocations| Constructor and Description |
|---|
ReflectionServiceFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
protected FaultInfo |
addFault(InterfaceInfo service,
OperationInfo op,
java.lang.Class<?> exClass) |
protected void |
bindOperation(OperationInfo op,
java.lang.reflect.Method m) |
protected void |
buildServiceFromClass() |
protected void |
buildServiceFromWSDL(java.lang.String url) |
protected void |
checkForElement(ServiceInfo serviceInfo,
MessagePartInfo mpi) |
protected void |
checkServiceClassAnnotations(java.lang.Class<?> sc) |
Service |
create() |
protected void |
createBareMessage(ServiceInfo serviceInfo,
OperationInfo opInfo,
boolean isOut) |
protected DataBinding |
createDefaultDataBinding() |
Endpoint |
createEndpoint(EndpointInfo ei) |
protected void |
createEndpoints() |
protected void |
createFaultForException(java.lang.Class<?> exClass,
FaultInfo fi) |
protected void |
createInputWrappedMessageParts(OperationInfo op,
java.lang.reflect.Method method,
MessageInfo inMsg) |
protected InterfaceInfo |
createInterface(ServiceInfo serviceInfo) |
protected Invoker |
createInvoker() |
protected void |
createMessageParts(InterfaceInfo intf,
OperationInfo op,
java.lang.reflect.Method method) |
protected OperationInfo |
createOperation(ServiceInfo serviceInfo,
InterfaceInfo intf,
java.lang.reflect.Method m) |
protected QName |
createOutputMessageName(OperationInfo op,
java.lang.reflect.Method method) |
protected void |
createOutputWrappedMessageParts(OperationInfo op,
java.lang.reflect.Method method,
MessageInfo outMsg) |
protected ServiceInfo |
createServiceInfo(InterfaceInfo intf) |
protected void |
createWrappedSchema(ServiceInfo serviceInfo,
AbstractMessageContainer wrappedMessage,
AbstractMessageContainer unwrappedMessage,
QName wrapperBeanName) |
protected java.lang.String |
getAction(OperationInfo op,
java.lang.reflect.Method method) |
boolean |
getAnonymousWrapperTypes() |
protected java.lang.Class<?> |
getBeanClass(java.lang.Class<?> exClass) |
java.util.List<AbstractServiceConfiguration> |
getConfigurations() |
EndpointInfo |
getEndpointInfo() |
QName |
getEndpointName() |
QName |
getEndpointName(boolean lookup) |
java.util.concurrent.Executor |
getExecutor() |
protected java.util.Set<java.lang.Class<?>> |
getExtraClass() |
protected QName |
getFaultName(InterfaceInfo service,
OperationInfo o,
java.lang.Class<?> exClass,
java.lang.Class<?> beanClass) |
java.util.List<Feature> |
getFeatures() |
java.lang.reflect.Type |
getHolderType(java.lang.Class<?> cls,
java.lang.reflect.Type type) |
java.util.List<java.lang.String> |
getIgnoredClasses() |
java.util.List<java.lang.reflect.Method> |
getIgnoredMethods() |
protected QName |
getInParameterName(OperationInfo op,
java.lang.reflect.Method method,
int paramNumber) |
protected QName |
getInPartName(OperationInfo op,
java.lang.reflect.Method method,
int paramNumber) |
protected QName |
getInputMessageName(OperationInfo op,
java.lang.reflect.Method method) |
protected InterfaceInfo |
getInterfaceInfo() |
QName |
getInterfaceName() |
Invoker |
getInvoker() |
MethodDispatcher |
getMethodDispatcher() |
protected QName |
getOperationName(InterfaceInfo service,
java.lang.reflect.Method method)
Creates a name for the operation from the method name.
|
protected QName |
getOutParameterName(OperationInfo op,
java.lang.reflect.Method method,
int paramNumber) |
protected QName |
getOutPartName(OperationInfo op,
java.lang.reflect.Method method,
int paramNumber) |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
boolean |
getQualifyWrapperSchema() |
protected java.lang.Class<?> |
getRequestWrapper(java.lang.reflect.Method selected) |
protected java.lang.String |
getRequestWrapperClassName(java.lang.reflect.Method selected) |
protected java.lang.Class<?> |
getResponseWrapper(java.lang.reflect.Method selected) |
protected java.lang.String |
getResponseWrapperClassName(java.lang.reflect.Method selected) |
java.lang.Class<?> |
getServiceClass() |
java.util.List<AbstractServiceConfiguration> |
getServiceConfigurations() |
protected java.lang.String |
getServiceName() |
protected java.lang.String |
getServiceNamespace() |
QName |
getServiceQName() |
QName |
getServiceQName(boolean lookup) |
java.lang.String |
getStyle() |
java.lang.Boolean |
getWrapped()
Returns non-null if wrapped mode was explicitely disabled or enabled.
|
long |
getWrapperPartMaxOccurs(MessagePartInfo mpi) |
long |
getWrapperPartMinOccurs(MessagePartInfo mpi) |
java.lang.String |
getWsdlURL() |
protected boolean |
hasOutMessage(java.lang.reflect.Method m) |
boolean |
hasWrappedMethods(InterfaceInfo interfaceInfo) |
protected boolean |
initializeClassInfo(OperationInfo o,
java.lang.reflect.Method method,
java.util.List<java.lang.String> paramOrder)
set the holder generic type info into message part info
|
protected void |
initializeDefaultInterceptors() |
protected void |
initializeFaultInterceptors() |
protected void |
initializeFaults(InterfaceInfo service,
OperationInfo op,
java.lang.reflect.Method method) |
protected void |
initializeParameter(MessagePartInfo part,
java.lang.Class<?> rawClass,
java.lang.reflect.Type type) |
protected void |
initializeServiceConfigurations() |
protected void |
initializeServiceModel() |
protected void |
initializeWrappedSchema(ServiceInfo serviceInfo) |
protected void |
initializeWSDLOperation(InterfaceInfo intf,
OperationInfo o,
java.lang.reflect.Method method) |
protected void |
initializeWSDLOperations() |
boolean |
isAnonymousWrapperTypes() |
protected boolean |
isAsync(java.lang.reflect.Method method) |
protected boolean |
isFromWsdl() |
boolean |
isHeader(java.lang.reflect.Method method,
int j) |
boolean |
isHolder(java.lang.Class<?> cls,
java.lang.reflect.Type type) |
protected boolean |
isInOutParam(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) |
boolean |
isPopulateFromClass() |
boolean |
isQualifyWrapperSchema() |
boolean |
isRPC(java.lang.reflect.Method method) |
protected boolean |
isValidMethod(java.lang.reflect.Method method) |
boolean |
isWrapped() |
protected boolean |
isWrapped(java.lang.reflect.Method method) |
boolean |
isWrapperPartNillable(MessagePartInfo mpi) |
java.lang.Boolean |
isWrapperPartQualified(MessagePartInfo mpi) |
protected void |
processTypes(java.lang.Class<?> sc,
java.lang.reflect.Type tp) |
void |
reset() |
void |
setAnonymousWrapperTypes(boolean b) |
void |
setConfigurations(java.util.List<AbstractServiceConfiguration> configurations) |
void |
setEndpointName(QName en) |
void |
setExecutor(java.util.concurrent.Executor executor) |
void |
setFeatures(java.util.List<? extends Feature> features2) |
void |
setIgnoredClasses(java.util.List<java.lang.String> ignoredClasses) |
void |
setIgnoredMethods(java.util.List<java.lang.reflect.Method> ignoredMethods) |
void |
setInvoker(Invoker invoker) |
protected void |
setMethodDispatcher(MethodDispatcher m) |
void |
setPopulateFromClass(boolean fomClass) |
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties) |
void |
setQualifyWrapperSchema(boolean b) |
void |
setSchemaLocations(java.util.List<java.lang.String> schemaLocations) |
void |
setServiceClass(java.lang.Class<?> serviceClass) |
void |
setServiceConfigurations(java.util.List<AbstractServiceConfiguration> serviceConfigurations) |
void |
setServiceName(QName serviceName) |
protected void |
setServiceProperties() |
void |
setServiceType(java.lang.reflect.ParameterizedType servicetype) |
void |
setValidate(boolean validate)
If 'validate' is true, this class will validate the service.
|
void |
setWrapped(boolean style) |
void |
setWsdlURL(java.lang.String wsdlURL) |
void |
setWsdlURL(java.net.URL wsdlURL) |
void |
updateBindingOperation(BindingOperationInfo boi) |
void |
validateServiceModel() |
getBus, getDataBinding, getDataBinding, getService, getSessionState, initializeDataBindings, sendEvent, setBus, setDataBinding, setServicepublic static final java.lang.String ENDPOINT_CLASS
public static final java.lang.String GENERIC_TYPE
public static final java.lang.String RAW_CLASS
public static final java.lang.String WRAPPERGEN_NEEDED
public static final java.lang.String EXTRA_CLASS
public static final java.lang.String MODE_OUT
public static final java.lang.String MODE_INOUT
public static final java.lang.String HOLDER
public static final java.lang.String HEADER
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String METHOD
public static final java.lang.String FORCE_TYPES
public static final java.lang.String METHOD_PARAM_ANNOTATIONS
public static final java.lang.String METHOD_ANNOTATIONS
public static final java.lang.String PARAM_ANNOTATION
protected java.lang.String wsdlURL
protected java.lang.Class<?> serviceClass
protected java.lang.reflect.ParameterizedType serviceType
protected java.util.Map<java.lang.reflect.Type,java.util.Map<java.lang.String,java.lang.Class<?>>> parameterizedTypes
protected final java.util.Map<java.lang.String,java.lang.String> schemaLocationMapping
protected DataBinding createDefaultDataBinding()
createDefaultDataBinding in class AbstractServiceFactoryBeanpublic void reset()
public Service create()
create in class AbstractServiceFactoryBeanprotected void createEndpoints()
public void updateBindingOperation(BindingOperationInfo boi)
public Endpoint createEndpoint(EndpointInfo ei) throws EndpointException
EndpointExceptionprotected void initializeServiceConfigurations()
protected void setServiceProperties()
protected void buildServiceFromWSDL(java.lang.String url)
protected void buildServiceFromClass()
public boolean hasWrappedMethods(InterfaceInfo interfaceInfo)
protected boolean isFromWsdl()
protected void initializeServiceModel()
public void validateServiceModel()
public boolean isPopulateFromClass()
public void setPopulateFromClass(boolean fomClass)
protected InterfaceInfo getInterfaceInfo()
protected void initializeWSDLOperations()
protected void initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, java.lang.reflect.Method method)
protected boolean initializeClassInfo(OperationInfo o, java.lang.reflect.Method method, java.util.List<java.lang.String> paramOrder)
o - method - protected Invoker createInvoker()
protected ServiceInfo createServiceInfo(InterfaceInfo intf)
protected InterfaceInfo createInterface(ServiceInfo serviceInfo)
protected OperationInfo createOperation(ServiceInfo serviceInfo, InterfaceInfo intf, java.lang.reflect.Method m)
protected void bindOperation(OperationInfo op, java.lang.reflect.Method m)
protected void initializeWrappedSchema(ServiceInfo serviceInfo)
protected void checkForElement(ServiceInfo serviceInfo, MessagePartInfo mpi)
public boolean getAnonymousWrapperTypes()
public boolean isAnonymousWrapperTypes()
public void setAnonymousWrapperTypes(boolean b)
public final boolean getQualifyWrapperSchema()
public boolean isQualifyWrapperSchema()
public void setQualifyWrapperSchema(boolean b)
protected void createWrappedSchema(ServiceInfo serviceInfo, AbstractMessageContainer wrappedMessage, AbstractMessageContainer unwrappedMessage, QName wrapperBeanName)
protected void createBareMessage(ServiceInfo serviceInfo, OperationInfo opInfo, boolean isOut)
protected void createMessageParts(InterfaceInfo intf, OperationInfo op, java.lang.reflect.Method method)
protected void createInputWrappedMessageParts(OperationInfo op, java.lang.reflect.Method method, MessageInfo inMsg)
protected void createOutputWrappedMessageParts(OperationInfo op, java.lang.reflect.Method method, MessageInfo outMsg)
protected void initializeParameter(MessagePartInfo part, java.lang.Class<?> rawClass, java.lang.reflect.Type type)
public QName getServiceQName()
public QName getServiceQName(boolean lookup)
public QName getEndpointName()
public QName getEndpointName(boolean lookup)
public EndpointInfo getEndpointInfo()
public void setEndpointName(QName en)
protected java.lang.String getServiceName()
protected java.lang.String getServiceNamespace()
public QName getInterfaceName()
protected boolean isValidMethod(java.lang.reflect.Method method)
public boolean isHolder(java.lang.Class<?> cls,
java.lang.reflect.Type type)
public java.lang.reflect.Type getHolderType(java.lang.Class<?> cls,
java.lang.reflect.Type type)
protected boolean isWrapped(java.lang.reflect.Method method)
protected boolean isMatchOperation(java.lang.String methodNameInClass,
java.lang.String methodNameInWsdl)
protected boolean isOutParam(java.lang.reflect.Method method,
int j)
protected boolean isInParam(java.lang.reflect.Method method,
int j)
protected boolean isInOutParam(java.lang.reflect.Method method,
int j)
protected QName getInputMessageName(OperationInfo op, java.lang.reflect.Method method)
protected QName createOutputMessageName(OperationInfo op, java.lang.reflect.Method method)
protected boolean hasOutMessage(java.lang.reflect.Method m)
protected void initializeFaults(InterfaceInfo service, OperationInfo op, java.lang.reflect.Method method)
protected void initializeDefaultInterceptors()
initializeDefaultInterceptors in class AbstractServiceFactoryBeanprotected void initializeFaultInterceptors()
protected FaultInfo addFault(InterfaceInfo service, OperationInfo op, java.lang.Class<?> exClass)
protected void createFaultForException(java.lang.Class<?> exClass,
FaultInfo fi)
protected java.lang.Class<?> getBeanClass(java.lang.Class<?> exClass)
protected QName getFaultName(InterfaceInfo service, OperationInfo o, java.lang.Class<?> exClass, java.lang.Class<?> beanClass)
protected java.lang.String getAction(OperationInfo op, java.lang.reflect.Method method)
public boolean isHeader(java.lang.reflect.Method method,
int j)
protected QName getOperationName(InterfaceInfo service, java.lang.reflect.Method method)
doSomething, the first one will have an operation name of
"doSomething" and the second "doSomething1".service - method - protected boolean isAsync(java.lang.reflect.Method method)
protected QName getInPartName(OperationInfo op, java.lang.reflect.Method method, int paramNumber)
protected QName getInParameterName(OperationInfo op, java.lang.reflect.Method method, int paramNumber)
protected QName getOutParameterName(OperationInfo op, java.lang.reflect.Method method, int paramNumber)
protected QName getOutPartName(OperationInfo op, java.lang.reflect.Method method, int paramNumber)
protected java.lang.Class<?> getResponseWrapper(java.lang.reflect.Method selected)
protected java.lang.String getResponseWrapperClassName(java.lang.reflect.Method selected)
protected java.lang.Class<?> getRequestWrapper(java.lang.reflect.Method selected)
protected java.lang.String getRequestWrapperClassName(java.lang.reflect.Method selected)
public java.lang.Boolean isWrapperPartQualified(MessagePartInfo mpi)
public boolean isWrapperPartNillable(MessagePartInfo mpi)
public long getWrapperPartMaxOccurs(MessagePartInfo mpi)
public long getWrapperPartMinOccurs(MessagePartInfo mpi)
public MethodDispatcher getMethodDispatcher()
protected void setMethodDispatcher(MethodDispatcher m)
public java.util.List<AbstractServiceConfiguration> getConfigurations()
public void setConfigurations(java.util.List<AbstractServiceConfiguration> configurations)
public java.lang.Class<?> getServiceClass()
protected void processTypes(java.lang.Class<?> sc,
java.lang.reflect.Type tp)
public void setServiceType(java.lang.reflect.ParameterizedType servicetype)
public void setServiceClass(java.lang.Class<?> serviceClass)
protected void checkServiceClassAnnotations(java.lang.Class<?> sc)
public java.lang.String getWsdlURL()
public void setWsdlURL(java.lang.String wsdlURL)
public void setWsdlURL(java.net.URL wsdlURL)
public java.util.List<AbstractServiceConfiguration> getServiceConfigurations()
public void setServiceConfigurations(java.util.List<AbstractServiceConfiguration> serviceConfigurations)
public void setServiceName(QName serviceName)
public Invoker getInvoker()
public void setInvoker(Invoker invoker)
public java.util.concurrent.Executor getExecutor()
public void setExecutor(java.util.concurrent.Executor executor)
public java.util.List<java.lang.String> getIgnoredClasses()
public void setIgnoredClasses(java.util.List<java.lang.String> ignoredClasses)
protected java.util.Set<java.lang.Class<?>> getExtraClass()
public boolean isWrapped()
public java.lang.String getStyle()
public boolean isRPC(java.lang.reflect.Method method)
public void setWrapped(boolean style)
public java.lang.Boolean getWrapped()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
public java.util.List<java.lang.reflect.Method> getIgnoredMethods()
public void setIgnoredMethods(java.util.List<java.lang.reflect.Method> ignoredMethods)
public java.util.List<Feature> getFeatures()
public void setFeatures(java.util.List<? extends Feature> features2)
public void setValidate(boolean validate)
validate - public void setSchemaLocations(java.util.List<java.lang.String> schemaLocations)