Class ReflectionServiceFactoryBean
java.lang.Object
org.apache.cxf.service.factory.AbstractServiceFactoryBean
org.apache.cxf.wsdl.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.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Class<?>protected ParameterizedTypestatic final Stringprotected StringFields inherited from class org.apache.cxf.service.factory.AbstractServiceFactoryBean
dataBindingSet, schemaLocations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.cxf.service.model.FaultInfoaddFault(org.apache.cxf.service.model.InterfaceInfo service, org.apache.cxf.service.model.OperationInfo op, Class<?> exClass) protected voidbindOperation(org.apache.cxf.service.model.OperationInfo op, Method m) protected voidprotected voidprotected voidcheckForElement(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.MessagePartInfo mpi) protected voidorg.apache.cxf.service.Servicecreate()protected voidcreateBareMessage(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.OperationInfo opInfo, boolean isOut) protected org.apache.cxf.databinding.DataBindingorg.apache.cxf.endpoint.EndpointcreateEndpoint(org.apache.cxf.service.model.EndpointInfo ei) protected voidprotected voidcreateFaultForException(Class<?> exClass, org.apache.cxf.service.model.FaultInfo fi) protected voidcreateInputWrappedMessageParts(org.apache.cxf.service.model.OperationInfo op, Method method, org.apache.cxf.service.model.MessageInfo inMsg) protected org.apache.cxf.service.model.InterfaceInfocreateInterface(org.apache.cxf.service.model.ServiceInfo serviceInfo) protected org.apache.cxf.service.invoker.Invokerprotected voidcreateMessageParts(org.apache.cxf.service.model.InterfaceInfo intf, org.apache.cxf.service.model.OperationInfo op, Method method) protected org.apache.cxf.service.model.OperationInfocreateOperation(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.InterfaceInfo intf, Method m) protected QNamecreateOutputMessageName(org.apache.cxf.service.model.OperationInfo op, Method method) protected voidcreateOutputWrappedMessageParts(org.apache.cxf.service.model.OperationInfo op, Method method, org.apache.cxf.service.model.MessageInfo outMsg) protected org.apache.cxf.service.model.ServiceInfocreateServiceInfo(org.apache.cxf.service.model.InterfaceInfo intf) protected voidcreateWrappedSchema(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.AbstractMessageContainer wrappedMessage, org.apache.cxf.service.model.AbstractMessageContainer unwrappedMessage, QName wrapperBeanName) protected Stringbooleanprotected Class<?>getBeanClass(Class<?> exClass) org.apache.cxf.service.model.EndpointInfogetEndpointName(boolean lookup) protected QNamegetFaultName(org.apache.cxf.service.model.InterfaceInfo service, org.apache.cxf.service.model.OperationInfo o, Class<?> exClass, Class<?> beanClass) List<org.apache.cxf.feature.Feature>getHolderType(Class<?> cls, Type type) protected QNamegetInParameterName(org.apache.cxf.service.model.OperationInfo op, Method method, int paramNumber) protected QNamegetInPartName(org.apache.cxf.service.model.OperationInfo op, Method method, int paramNumber) protected QNamegetInputMessageName(org.apache.cxf.service.model.OperationInfo op, Method method) protected org.apache.cxf.service.model.InterfaceInfoorg.apache.cxf.service.invoker.Invokerorg.apache.cxf.service.invoker.MethodDispatcherprotected QNamegetOperationName(org.apache.cxf.service.model.InterfaceInfo service, Method method) Creates a name for the operation from the method name.protected QNamegetOutParameterName(org.apache.cxf.service.model.OperationInfo op, Method method, int paramNumber) protected QNamegetOutPartName(org.apache.cxf.service.model.OperationInfo op, Method method, int paramNumber) final booleanprotected Class<?>getRequestWrapper(Method selected) protected StringgetRequestWrapperClassName(Method selected) protected Class<?>getResponseWrapper(Method selected) protected StringgetResponseWrapperClassName(Method selected) Class<?>protected Stringprotected StringgetServiceQName(boolean lookup) getStyle()Returns non-null if wrapped mode was explicitely disabled or enabled.longgetWrapperPartMaxOccurs(org.apache.cxf.service.model.MessagePartInfo mpi) longgetWrapperPartMinOccurs(org.apache.cxf.service.model.MessagePartInfo mpi) protected booleanbooleanhasWrappedMethods(org.apache.cxf.service.model.InterfaceInfo interfaceInfo) protected booleaninitializeClassInfo(org.apache.cxf.service.model.OperationInfo o, Method method, List<String> paramOrder) set the holder generic type info into message part infoprotected voidprotected voidprotected voidinitializeFaults(org.apache.cxf.service.model.InterfaceInfo service, org.apache.cxf.service.model.OperationInfo op, Method method) protected voidinitializeParameter(org.apache.cxf.service.model.MessagePartInfo part, Class<?> rawClass, Type type) protected voidprotected voidprotected voidinitializeWrappedSchema(org.apache.cxf.service.model.ServiceInfo serviceInfo) protected voidinitializeWSDLOperation(org.apache.cxf.service.model.InterfaceInfo intf, org.apache.cxf.service.model.OperationInfo o, Method method) protected voidbooleanprotected booleanprotected booleanbooleanbooleanprotected booleanisInOutParam(Method method, int j) protected booleanprotected booleanisMatchOperation(String methodNameInClass, String methodNameInWsdl) protected booleanisOutParam(Method method, int j) booleanbooleanbooleanprotected booleanisValidMethod(Method method) booleanprotected booleanbooleanisWrapperPartNillable(org.apache.cxf.service.model.MessagePartInfo mpi) isWrapperPartQualified(org.apache.cxf.service.model.MessagePartInfo mpi) protected voidprocessTypes(Class<?> sc, Type tp) voidreset()voidsetAnonymousWrapperTypes(boolean b) voidsetConfigurations(List<AbstractServiceConfiguration> configurations) voidsetEndpointName(QName en) voidsetExecutor(Executor executor) voidsetFeatures(List<? extends org.apache.cxf.feature.Feature> features2) voidsetIgnoredClasses(List<String> ignoredClasses) voidsetIgnoredMethods(List<Method> ignoredMethods) voidsetInvoker(org.apache.cxf.service.invoker.Invoker invoker) protected voidsetMethodDispatcher(org.apache.cxf.service.invoker.MethodDispatcher m) voidsetPopulateFromClass(boolean fomClass) voidsetProperties(Map<String, Object> properties) voidsetQualifyWrapperSchema(boolean b) voidsetSchemaLocations(List<String> schemaLocations) voidsetServiceClass(Class<?> serviceClass) voidsetServiceConfigurations(List<AbstractServiceConfiguration> serviceConfigurations) voidsetServiceName(QName serviceName) protected voidvoidsetServiceType(ParameterizedType servicetype) voidsetValidate(boolean validate) If 'validate' is true, this class will validate the service.voidsetWrapped(boolean style) voidsetWsdlURL(String wsdlURL) voidsetWsdlURL(URL wsdlURL) voidupdateBindingOperation(org.apache.cxf.service.model.BindingOperationInfo boi) voidMethods inherited from class org.apache.cxf.service.factory.AbstractServiceFactoryBean
getBus, getDataBinding, getDataBinding, getService, getSessionState, initializeDataBindings, sendEvent, setBus, setDataBinding, setService
-
Field Details
-
ENDPOINT_CLASS
- See Also:
-
GENERIC_TYPE
- See Also:
-
RAW_CLASS
- See Also:
-
WRAPPERGEN_NEEDED
- See Also:
-
EXTRA_CLASS
- See Also:
-
MODE_OUT
- See Also:
-
MODE_INOUT
- See Also:
-
HOLDER
- See Also:
-
HEADER
- See Also:
-
ELEMENT_NAME
- See Also:
-
METHOD
- See Also:
-
FORCE_TYPES
- See Also:
-
METHOD_PARAM_ANNOTATIONS
- See Also:
-
METHOD_ANNOTATIONS
- See Also:
-
PARAM_ANNOTATION
- See Also:
-
wsdlURL
-
serviceClass
-
serviceType
-
parameterizedTypes
-
schemaLocationMapping
-
-
Constructor Details
-
ReflectionServiceFactoryBean
public ReflectionServiceFactoryBean()
-
-
Method Details
-
createDefaultDataBinding
protected org.apache.cxf.databinding.DataBinding createDefaultDataBinding()- Overrides:
createDefaultDataBindingin classorg.apache.cxf.service.factory.AbstractServiceFactoryBean
-
reset
public void reset() -
create
public org.apache.cxf.service.Service create()- Specified by:
createin classorg.apache.cxf.service.factory.AbstractServiceFactoryBean
-
createEndpoints
protected void createEndpoints() -
updateBindingOperation
public void updateBindingOperation(org.apache.cxf.service.model.BindingOperationInfo boi) -
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() -
setServiceProperties
protected void setServiceProperties() -
buildServiceFromWSDL
-
buildServiceFromClass
protected void buildServiceFromClass() -
hasWrappedMethods
public boolean hasWrappedMethods(org.apache.cxf.service.model.InterfaceInfo interfaceInfo) -
isFromWsdl
protected boolean isFromWsdl() -
initializeServiceModel
protected void initializeServiceModel() -
validateServiceModel
public void validateServiceModel() -
isPopulateFromClass
public boolean isPopulateFromClass() -
setPopulateFromClass
public void setPopulateFromClass(boolean fomClass) -
getInterfaceInfo
protected org.apache.cxf.service.model.InterfaceInfo getInterfaceInfo() -
initializeWSDLOperations
protected void initializeWSDLOperations() -
initializeWSDLOperation
protected void initializeWSDLOperation(org.apache.cxf.service.model.InterfaceInfo intf, org.apache.cxf.service.model.OperationInfo o, Method method) -
initializeClassInfo
protected boolean initializeClassInfo(org.apache.cxf.service.model.OperationInfo o, Method method, List<String> paramOrder) set the holder generic type info into message part info- Parameters:
o-method-
-
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, Method m) -
bindOperation
-
initializeWrappedSchema
protected void initializeWrappedSchema(org.apache.cxf.service.model.ServiceInfo serviceInfo) -
checkForElement
protected void checkForElement(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.MessagePartInfo mpi) -
getAnonymousWrapperTypes
public boolean getAnonymousWrapperTypes() -
isAnonymousWrapperTypes
public boolean isAnonymousWrapperTypes() -
setAnonymousWrapperTypes
public void setAnonymousWrapperTypes(boolean b) -
getQualifyWrapperSchema
public final boolean getQualifyWrapperSchema() -
isQualifyWrapperSchema
public boolean isQualifyWrapperSchema() -
setQualifyWrapperSchema
public void setQualifyWrapperSchema(boolean b) -
createWrappedSchema
protected void createWrappedSchema(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.AbstractMessageContainer wrappedMessage, org.apache.cxf.service.model.AbstractMessageContainer unwrappedMessage, QName wrapperBeanName) -
createBareMessage
protected void createBareMessage(org.apache.cxf.service.model.ServiceInfo serviceInfo, org.apache.cxf.service.model.OperationInfo opInfo, boolean isOut) -
createMessageParts
protected void createMessageParts(org.apache.cxf.service.model.InterfaceInfo intf, org.apache.cxf.service.model.OperationInfo op, Method method) -
createInputWrappedMessageParts
protected void createInputWrappedMessageParts(org.apache.cxf.service.model.OperationInfo op, Method method, org.apache.cxf.service.model.MessageInfo inMsg) -
createOutputWrappedMessageParts
protected void createOutputWrappedMessageParts(org.apache.cxf.service.model.OperationInfo op, Method method, org.apache.cxf.service.model.MessageInfo outMsg) -
initializeParameter
-
getServiceQName
-
getServiceQName
-
getEndpointName
-
getEndpointName
-
getEndpointInfo
public org.apache.cxf.service.model.EndpointInfo getEndpointInfo() -
setEndpointName
-
getServiceName
-
getServiceNamespace
-
getInterfaceName
-
isValidMethod
-
isHolder
-
getHolderType
-
isWrapped
-
isMatchOperation
-
isOutParam
-
isInParam
-
isInOutParam
-
getInputMessageName
-
createOutputMessageName
-
hasOutMessage
-
initializeFaults
protected void initializeFaults(org.apache.cxf.service.model.InterfaceInfo service, org.apache.cxf.service.model.OperationInfo op, Method method) -
initializeDefaultInterceptors
protected void initializeDefaultInterceptors()- Overrides:
initializeDefaultInterceptorsin classorg.apache.cxf.service.factory.AbstractServiceFactoryBean
-
initializeFaultInterceptors
protected void initializeFaultInterceptors() -
addFault
protected org.apache.cxf.service.model.FaultInfo addFault(org.apache.cxf.service.model.InterfaceInfo service, org.apache.cxf.service.model.OperationInfo op, Class<?> exClass) -
createFaultForException
-
getBeanClass
-
getFaultName
-
getAction
-
isHeader
-
getOperationName
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 nameddoSomething, the first one will have an operation name of "doSomething" and the second "doSomething1".- Parameters:
service-method-
-
isAsync
-
getInPartName
-
getInParameterName
-
getOutParameterName
-
getOutPartName
-
getResponseWrapper
-
getResponseWrapperClassName
-
getRequestWrapper
-
getRequestWrapperClassName
-
isWrapperPartQualified
-
isWrapperPartNillable
public boolean isWrapperPartNillable(org.apache.cxf.service.model.MessagePartInfo mpi) -
getWrapperPartMaxOccurs
public long getWrapperPartMaxOccurs(org.apache.cxf.service.model.MessagePartInfo mpi) -
getWrapperPartMinOccurs
public long getWrapperPartMinOccurs(org.apache.cxf.service.model.MessagePartInfo mpi) -
getMethodDispatcher
public org.apache.cxf.service.invoker.MethodDispatcher getMethodDispatcher() -
setMethodDispatcher
protected void setMethodDispatcher(org.apache.cxf.service.invoker.MethodDispatcher m) -
getConfigurations
-
setConfigurations
-
getServiceClass
-
processTypes
-
setServiceType
-
setServiceClass
-
checkServiceClassAnnotations
-
getWsdlURL
-
setWsdlURL
-
setWsdlURL
-
getServiceConfigurations
-
setServiceConfigurations
-
setServiceName
-
getInvoker
public org.apache.cxf.service.invoker.Invoker getInvoker() -
setInvoker
public void setInvoker(org.apache.cxf.service.invoker.Invoker invoker) -
getExecutor
-
setExecutor
-
getIgnoredClasses
-
setIgnoredClasses
-
getExtraClass
-
isWrapped
public boolean isWrapped() -
getStyle
-
isRPC
-
setWrapped
public void setWrapped(boolean style) -
getWrapped
Returns non-null if wrapped mode was explicitely disabled or enabled. -
getProperties
-
setProperties
-
getIgnoredMethods
-
setIgnoredMethods
-
getFeatures
-
setFeatures
-
setValidate
public void setValidate(boolean validate) If 'validate' is true, this class will validate the service. It will report problems with the service model and the XML schema for the service.- Parameters:
validate-
-
setSchemaLocations
-