org.codehaus.xfire.annotations
Class AnnotationServiceFactory
java.lang.Object
org.codehaus.xfire.service.binding.ObjectServiceFactory
org.codehaus.xfire.annotations.AnnotationServiceFactory
- All Implemented Interfaces:
- org.codehaus.xfire.service.ServiceFactory
- public class AnnotationServiceFactory
- extends org.codehaus.xfire.service.binding.ObjectServiceFactory
- implements org.codehaus.xfire.service.ServiceFactory
Annotations-bases implementation of the ServiceFactory
interface.
- Author:
- Arjen Poutsma
Fields inherited from class org.codehaus.xfire.service.binding.ObjectServiceFactory |
CREATE_DEFAULT_BINDINGS, PORT_TYPE, SCHEMAS, SCOPE, SOAP11_TRANSPORTS, SOAP12_TRANSPORTS, STYLE, USE |
Constructor Summary |
AnnotationServiceFactory(WebAnnotations webAnnotations,
org.codehaus.xfire.transport.TransportManager transportManager)
|
AnnotationServiceFactory(WebAnnotations webAnnotations,
org.codehaus.xfire.transport.TransportManager transportManager,
org.codehaus.xfire.service.binding.BindingProvider provider)
Initializes a new instance of the AnnotationServiceFactory with the given annotations facade,
transport manager and type mapping registry. |
Method Summary |
org.codehaus.xfire.service.Service |
create(java.lang.Class clazz,
java.lang.String name,
java.lang.String namespace,
java.util.Map properties)
Creates a service from the specified class. |
protected java.lang.String |
createPortType(java.lang.String name,
WebServiceAnnotation webServiceAnnotation)
|
protected java.lang.String |
createServiceName(java.lang.Class clazz,
WebServiceAnnotation webServiceAnnotation,
java.lang.String current)
|
protected java.lang.String |
createServiceNamespace(java.lang.Class clazz,
WebServiceAnnotation webServiceAnnotation,
java.lang.String current)
|
protected java.lang.String |
getAction(org.codehaus.xfire.service.OperationInfo op)
|
protected javax.xml.namespace.QName |
getInParameterName(org.codehaus.xfire.service.Service endpoint,
org.codehaus.xfire.service.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber,
boolean doc)
|
protected java.lang.String |
getMEP(java.lang.reflect.Method method)
|
protected java.lang.String |
getOperationName(org.codehaus.xfire.service.ServiceInfo service,
java.lang.reflect.Method method)
|
protected javax.xml.namespace.QName |
getOutParameterName(org.codehaus.xfire.service.Service endpoint,
org.codehaus.xfire.service.OperationInfo op,
java.lang.reflect.Method method,
boolean doc)
|
protected boolean |
isAsync(java.lang.reflect.Method method)
|
protected boolean |
isHeader(java.lang.reflect.Method method,
int paramNumber)
|
protected boolean |
isInParam(java.lang.reflect.Method method,
int j)
|
protected boolean |
isOutParam(java.lang.reflect.Method method,
int j)
|
protected boolean |
isValidMethod(java.lang.reflect.Method method)
Returns true if the specified method is valid for a SOAP operation. |
protected java.lang.Class |
loadClass(java.lang.String endpointInterface)
Attempt to load a class first from this class's ClassLoader, then from the context classloader. |
Methods inherited from class org.codehaus.xfire.service.binding.ObjectServiceFactory |
addFault, addIgnoredMethods, addOperation, addSoap11Transport, addSoap12Transport, configureHeaders, create, create, create, createBindingOperation, createBindings, createEndpoint, createInputMessageName, createOutputMessageName, createSoap11Binding, createSoap12Binding, createSoapBinding, getBindingProvider, getFaultName, getSoap11Transports, getSoap12Transports, getStyle, getTargetNamespace, getTransportManager, getUse, getWsdlBuilderFactory, hasOutMessage, initializeFaults, initializeOperations, isBindingCreationEnabled, isCustomFaultsEnabled, isFaultInfoClass, isVoidOneWay, makeServiceNameFromClassName, registerHandlers, setBindingCreationEnabled, setBindingProvider, setCustomFaultsEnabled, setStyle, setTransportManager, setUse, setVoidOneWay, setWsdlBuilderFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.xfire.service.ServiceFactory |
create, create, create |
AnnotationServiceFactory
public AnnotationServiceFactory(WebAnnotations webAnnotations,
org.codehaus.xfire.transport.TransportManager transportManager)
AnnotationServiceFactory
public AnnotationServiceFactory(WebAnnotations webAnnotations,
org.codehaus.xfire.transport.TransportManager transportManager,
org.codehaus.xfire.service.binding.BindingProvider provider)
- Initializes a new instance of the
AnnotationServiceFactory
with the given annotations facade,
transport manager and type mapping registry.
- Parameters:
webAnnotations
- the annotations facadetransportManager
- the transport managerprovider
- the registry
create
public org.codehaus.xfire.service.Service create(java.lang.Class clazz,
java.lang.String name,
java.lang.String namespace,
java.util.Map properties)
- Creates a service from the specified class. If the class has a
SOAPBindingAnnotation
, it will be used to define the style and
use of the service. If the class has a WebServiceAnnotation
, it will be used to
define the name, service name, target namespace. If the annotation
defines an endpoint interface, all methods of that interface are exposed
as operations. If no endpoint interface is defined, all methods that have
the WebMethodAnnotation
are exposed.
- Specified by:
create
in interface org.codehaus.xfire.service.ServiceFactory
- Parameters:
clazz
- The service class used to populate the operations and
parameters.
- Returns:
- The service.
loadClass
protected java.lang.Class loadClass(java.lang.String endpointInterface)
throws java.lang.ClassNotFoundException
- Attempt to load a class first from this class's ClassLoader, then from the context classloader.
- Parameters:
endpointInterface
-
- Returns:
-
- Throws:
java.lang.ClassNotFoundException
createServiceNamespace
protected java.lang.String createServiceNamespace(java.lang.Class clazz,
WebServiceAnnotation webServiceAnnotation,
java.lang.String current)
createServiceName
protected java.lang.String createServiceName(java.lang.Class clazz,
WebServiceAnnotation webServiceAnnotation,
java.lang.String current)
createPortType
protected java.lang.String createPortType(java.lang.String name,
WebServiceAnnotation webServiceAnnotation)
getOperationName
protected java.lang.String getOperationName(org.codehaus.xfire.service.ServiceInfo service,
java.lang.reflect.Method method)
getAction
protected java.lang.String getAction(org.codehaus.xfire.service.OperationInfo op)
isValidMethod
protected boolean isValidMethod(java.lang.reflect.Method method)
- Returns
true
if the specified method is valid for a SOAP operation.
- Parameters:
method
- the method.
- Returns:
true
if valid; false
otherwise.
isHeader
protected boolean isHeader(java.lang.reflect.Method method,
int paramNumber)
isInParam
protected boolean isInParam(java.lang.reflect.Method method,
int j)
isOutParam
protected boolean isOutParam(java.lang.reflect.Method method,
int j)
getInParameterName
protected javax.xml.namespace.QName getInParameterName(org.codehaus.xfire.service.Service endpoint,
org.codehaus.xfire.service.OperationInfo op,
java.lang.reflect.Method method,
int paramNumber,
boolean doc)
getOutParameterName
protected javax.xml.namespace.QName getOutParameterName(org.codehaus.xfire.service.Service endpoint,
org.codehaus.xfire.service.OperationInfo op,
java.lang.reflect.Method method,
boolean doc)
isAsync
protected boolean isAsync(java.lang.reflect.Method method)
getMEP
protected java.lang.String getMEP(java.lang.reflect.Method method)
Copyright © 2004-2006 null. All Rights Reserved.