org.codehaus.xfire.service
Class Service

java.lang.Object
  extended by org.codehaus.xfire.handler.AbstractHandlerSupport
      extended by org.codehaus.xfire.service.Service
All Implemented Interfaces:
HandlerSupport, Visitable

public class Service
extends AbstractHandlerSupport
implements Visitable

Represents a service endpoint. A service endpoints sole job is to process xml messages. The servicehandler is is the central processing point - responsible for invoking request/response/fault handlers as well reading in the xml message to the service.

The binding is then responsible for taking the SOAP Body and binding it to something - JavaBeans, XMLBeans, W3C DOM tree, etc.

The ServiceInfo represents an optional contract for the service. This can be used to generate WSDL and/or provide information on serialization.

Author:
Arjen Poutsma
See Also:
ServiceInfo, org.codehaus.xfire.service.binding.SOAPBinding

Field Summary
static java.lang.String ROLE
           
 
Constructor Summary
Service(ServiceInfo service)
          Initializes a new, default instance of the ServiceEndpoint for a specified ServiceInfo.
 
Method Summary
 void accept(Visitor visitor)
          Accepts the given visitor.
 ObjectBinding getBinding()
          Returns the binding for this endpoint.
 MessageSerializer getFaultSerializer()
           
 java.lang.String getName()
          Returns the name of this endpoint.
 java.lang.Object getProperty(java.lang.String name)
           
 ServiceInfo getServiceInfo()
          Returns the service descriptor for this endpoint.
 SoapVersion getSoapVersion()
           
 WSDLWriter getWSDLWriter()
          Returns the WSDLWriter for this endpoint.
 void setBinding(ObjectBinding binding)
          Sets the binding for this endpoint.
 void setFaultSerializer(MessageSerializer faultSerializer)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 void setSoapVersion(SoapVersion soapVersion)
           
 void setWSDLWriter(WSDLWriter wsdlWriter)
          Sets the WSDLWriter for this endpoint.
 
Methods inherited from class org.codehaus.xfire.handler.AbstractHandlerSupport
addFaultHandler, addInHandler, addOutHandler, getFaultHandlers, getInHandlers, getOutHandlers, setFaultHandlers, setInHandlers, setOutHandlers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE

public static final java.lang.String ROLE
Constructor Detail

Service

public Service(ServiceInfo service)
Initializes a new, default instance of the ServiceEndpoint for a specified ServiceInfo.

Parameters:
service - the service.
Method Detail

accept

public void accept(Visitor visitor)
Accepts the given visitor. Iterates over all the contained service.

Specified by:
accept in interface Visitable
Parameters:
visitor - the visitor.

getProperty

public java.lang.Object getProperty(java.lang.String name)
See Also:
getProperty(java.lang.String)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
See Also:
setProperty(java.lang.String, java.lang.Object)

getBinding

public ObjectBinding getBinding()
Returns the binding for this endpoint.

Returns:
the binding.

setBinding

public void setBinding(ObjectBinding binding)
Sets the binding for this endpoint.

Parameters:
binding - the binding.

getFaultSerializer

public MessageSerializer getFaultSerializer()

setFaultSerializer

public void setFaultSerializer(MessageSerializer faultSerializer)

getName

public java.lang.String getName()
Returns the name of this endpoint. This method simply returns the local part of the qualified name of the ServiceInfo.

Returns:
the service name.
See Also:
ServiceInfo.getName(), QName.getLocalPart()

getServiceInfo

public ServiceInfo getServiceInfo()
Returns the service descriptor for this endpoint.

Returns:
the service descriptor.

getWSDLWriter

public WSDLWriter getWSDLWriter()
Returns the WSDLWriter for this endpoint. If a writer has not been explicitly set, a default implementation is used.

Returns:
the wsdl writer.

setWSDLWriter

public void setWSDLWriter(WSDLWriter wsdlWriter)
Sets the WSDLWriter for this endpoint.

Parameters:
wsdlWriter -

getSoapVersion

public SoapVersion getSoapVersion()

setSoapVersion

public void setSoapVersion(SoapVersion soapVersion)


Copyright © 2004-2005 Codehaus. All Rights Reserved.