Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.xfire.annotations
Class AnnotationServiceFactory

    java.lang.Object
      org.codehaus.xfire.service.binding.ObjectServiceFactory
          org.codehaus.xfire.annotations.AnnotationServiceFactory

All Implemented Interfaces:
  ServiceFactory

    public class AnnotationServiceFactory

extends ObjectServiceFactory
implements ServiceFactory

Annotations-bases implementation of the `ServiceFactory` interface.

Author:
  Arjen Poutsma

Constructor Summary
`AnnotationServiceFactory(WebAnnotations webAnnotations, TransportManager transportManager, BindingProvider provider)` Initializes a new instance of the `AnnotationServiceFactory` with the given annotations facade, transport manager and type mapping registry.

Method Summary
`Service` | `create(java.lang.Class clazz, java.util.Map properties)` Creates a service from the specified class.
`protected java.lang.String` | `createPortType(java.lang.String serviceName, WebServiceAnnotation webServiceAnnotation)`
`protected java.lang.String` | `createServiceName(java.lang.Class clazz, WebServiceAnnotation webServiceAnnotation)`
`protected java.lang.String` | `createServiceNamespace(java.lang.Class clazz, WebServiceAnnotation webServiceAnnotation)`
`protected java.lang.String` | `getAction(OperationInfo op)`
`protected javax.xml.namespace.QName` | `getInParameterName(Service endpoint, OperationInfo op, java.lang.reflect.Method method, int paramNumber, boolean doc)`
`protected java.lang.String` | `getMEP(java.lang.reflect.Method method)`
`protected javax.xml.namespace.QName` | `getOutParameterName(Service endpoint, 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` | `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
`addIgnoredMethods, addOperation, create, create, create, create, getBindingProvider, getOperationName, getSoapVersion, getStyle, getTransportManager, getUse, getWsdlBuilderFactory, initializeOperations, isVoidOneWay, makeServiceNameFromClassName, registerHandlers, setBindingProvider, setSoapVersion, 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`

Constructor Detail

### AnnotationServiceFactory

    public AnnotationServiceFactory(WebAnnotations webAnnotations,
                                    TransportManager transportManager,
                                    BindingProvider provider)

  Initializes a new instance of the `AnnotationServiceFactory` with the given annotations facade, transport manager and type mapping registry.

  Parameters:
    `webAnnotations` - the annotations facade
    `transportManager` - the transport manager
    `provider` - the registry

Method Detail

### create

    public Service create(java.lang.Class clazz,
                          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 `ServiceFactory`
  Overrides:
    `create` in class `ObjectServiceFactory`
  Parameters:
    `clazz` - The service class used to populate the operations and parameters.
    `properties` - Properties to set on the service and use in construction.
  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)

### createServiceName

    protected java.lang.String createServiceName(java.lang.Class clazz,
                                                 WebServiceAnnotation webServiceAnnotation)

### createPortType

    protected java.lang.String createPortType(java.lang.String serviceName,
                                              WebServiceAnnotation webServiceAnnotation)

### getAction

    protected java.lang.String getAction(OperationInfo op)

  Overrides:
    `getAction` in class `ObjectServiceFactory`

### isValidMethod

    protected boolean isValidMethod(java.lang.reflect.Method method)

  Returns `true` if the specified method is valid for a SOAP operation.

  Overrides:
    `isValidMethod` in class `ObjectServiceFactory`
  Parameters:
    `method` - the method.
  Returns:
    `true` if valid; `false` otherwise.

### isHeader

    protected boolean isHeader(java.lang.reflect.Method method,
                               int paramNumber)

  Overrides:
    `isHeader` in class `ObjectServiceFactory`

### getInParameterName

    protected javax.xml.namespace.QName getInParameterName(Service endpoint,
                                                           OperationInfo op,
                                                           java.lang.reflect.Method method,
                                                           int paramNumber,
                                                           boolean doc)

  Overrides:
    `getInParameterName` in class `ObjectServiceFactory`

### getOutParameterName

    protected javax.xml.namespace.QName getOutParameterName(Service endpoint,
                                                            OperationInfo op,
                                                            java.lang.reflect.Method method,
                                                            boolean doc)

  Overrides:
    `getOutParameterName` in class `ObjectServiceFactory`

### isAsync

    protected boolean isAsync(java.lang.reflect.Method method)

  Overrides:
    `isAsync` in class `ObjectServiceFactory`

### getMEP

    protected java.lang.String getMEP(java.lang.reflect.Method method)

  Overrides:
    `getMEP` in class `ObjectServiceFactory`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Codehaus. All Rights Reserved.