Class ServiceDescriptionImpl
- java.lang.Object
-
- org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl
-
- All Implemented Interfaces:
ServiceDescription,ServiceDescriptionJava,ServiceDescriptionWSDL
public class ServiceDescriptionImpl extends Object implements ServiceDescription, ServiceDescriptionWSDL, ServiceDescriptionJava
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddressingFeature.ResponsesgetAddressingResponses(Object serviceDelegateKey, Class seiClass)Answer the type of Addressing responses required by the service-requester.HandlerChaingetAnnoHandlerChainAnnotation(Object sparseCompositeKey)ConfigurationContextgetAxisConfigContext()Map<String,Object>getBindingProperties(Object serviceDelegateKey, String key)This method is responsible for querying the metadata for properties associated with a given BindingProvider instance.JAXWSCatalogManagergetCatalogManager()HashMap<String,DescriptionBuilderComposite>getDBCMap()DescriptionBuilderCompositegetDescriptionBuilderComposite()DescriptionBuilderCompositegetDescriptionBuilderComposite(QName serviceQName, Integer portCompositeIndex)This method provides a means for accessing a DescriptionBuilderComposite instance.Collection<EndpointDescriptionImpl>getDynamicEndpointDescriptions_AsCollection(Object serviceDelegateKey)EndpointDescription[]getEndpointDescription(Class seiClass)Return the EndpointDescriptions corresponding to the SEI class.EndpointDescriptiongetEndpointDescription(QName portQName)EndpointDescriptiongetEndpointDescription(QName portQName, Object serviceDelegateKey)EndpointDescription[]getEndpointDescriptions()Collection<EndpointDescription>getEndpointDescriptions_AsCollection()WSDLWrappergetGeneratedWsdlWrapper()HandlerChainsTypegetHandlerChain()Return the handler chain configuration information as a HandlerChainsType object.HandlerChainsTypegetHandlerChain(Object sparseCompositeKey)Return the handler chain configuration information as a HandlerChainsType object.intgetMTOMThreshold(Object serviceDelegate, Class seiClass)Return the MTOM Threshold as set by the Client via a sparse composite (such as a client deployment descriptor).List<QName>getPorts(Object serviceDelegateKey)Returns a list of the ports for this serivce.QNamegetPreferredPort(Object key)ResolvedHandlersDescriptiongetResolvedHandlersDescription(PortInfo portInfo)Answer information for resolved handlers for the given port.protected StringgetServiceClassName()Return the name of the client-side service class if it exists.ServiceClientgetServiceClient(QName portQName, Object serviceDelegateKey)QNamegetServiceQName()ServiceRuntimeDescriptiongetServiceRuntimeDesc(String name)javax.wsdl.DefinitiongetWSDLDefinition()javax.wsdl.DefinitiongetWSDLGeneratedDefinition()Returns the WSDL definiton as created by calling the WSDL generator.StringgetWSDLLocation()MapgetWSDLPorts()List<javax.wsdl.Port>getWSDLPortsUsingPortType(QName portTypeQN)Return a collection of WSDL ports under this service which use the portType QName.List<javax.wsdl.Port>getWSDLPortsUsingSOAPAddress(List<javax.wsdl.Port> wsdlPorts)Return a subset of the collection of WSDL ports which specify a SOAP 1.1 or 1.2 address.javax.wsdl.ServicegetWSDLService()WSDLWrappergetWSDLWrapper()booleanisAddressingConfigured(Object serviceDelegateKey, Class seiClass)Answer whether Addressing was explicitly configured via metadata (such as a deployment descriptor) on the service-requester.booleanisAddressingEnabled(Object serviceDelegateKey, Class seiClass)Answer whether Addressing is enabled on the service-requester.booleanisAddressingRequired(Object serviceDelegateKey, Class seiClass)Answer whether Addressing is required on the service-requester.booleanisMTOMEnabled(Object key)Answer if MTOM is enabled for the service represented by this Service Description.booleanisMTOMEnabled(Object key, Class seiClass)Answer if MTOM is enabled for the service represented by this Service Description and the service-endpoint-interface indicated.booleanisRespectBindingEnabled(Object serviceDelegateKey, Class seiClass)Return whether RespectBinding is enabled as set by the Client via a sparse composite (such as a client deployment descriptor).booleanisServerSide()booleanisWSDLSpecified()voidreleaseResources(Object delegate)Check into releasing resources related to this ServiceDescription.voidsetResolvedHandlersDescription(PortInfo portInfo, ResolvedHandlersDescription resolvedHandlersInfo)Cache information for handlers which have been resolved for this port.voidsetServiceRuntimeDesc(ServiceRuntimeDescription srd)StringtoString()Return a string representing this Description object and all the objects it contains.
-
-
-
Method Detail
-
getEndpointDescriptions
public EndpointDescription[] getEndpointDescriptions()
- Specified by:
getEndpointDescriptionsin interfaceServiceDescription
-
getDynamicEndpointDescriptions_AsCollection
public Collection<EndpointDescriptionImpl> getDynamicEndpointDescriptions_AsCollection(Object serviceDelegateKey)
-
getEndpointDescriptions_AsCollection
public Collection<EndpointDescription> getEndpointDescriptions_AsCollection()
- Specified by:
getEndpointDescriptions_AsCollectionin interfaceServiceDescription
-
getEndpointDescription
public EndpointDescription getEndpointDescription(QName portQName)
- Specified by:
getEndpointDescriptionin interfaceServiceDescription
-
getEndpointDescription
public EndpointDescription getEndpointDescription(QName portQName, Object serviceDelegateKey)
- Specified by:
getEndpointDescriptionin interfaceServiceDescription
-
getDescriptionBuilderComposite
public DescriptionBuilderComposite getDescriptionBuilderComposite()
-
getDescriptionBuilderComposite
public DescriptionBuilderComposite getDescriptionBuilderComposite(QName serviceQName, Integer portCompositeIndex)
This method provides a means for accessing a DescriptionBuilderComposite instance. If the integer value passed in is an index in the list of PortComposite objects, then the indiciated PortComposite will be returned. Otherwise, the instance DBC will be returned.
-
getEndpointDescription
public EndpointDescription[] getEndpointDescription(Class seiClass)
Description copied from interface:ServiceDescriptionReturn the EndpointDescriptions corresponding to the SEI class. Note that Dispatch endpoints will never be returned because they do not have an associated SEI.- Specified by:
getEndpointDescriptionin interfaceServiceDescription- Returns:
-
getWSDLWrapper
public WSDLWrapper getWSDLWrapper()
- Specified by:
getWSDLWrapperin interfaceServiceDescriptionWSDL
-
getWSDLLocation
public String getWSDLLocation()
- Specified by:
getWSDLLocationin interfaceServiceDescriptionWSDL
-
getGeneratedWsdlWrapper
public WSDLWrapper getGeneratedWsdlWrapper()
- Specified by:
getGeneratedWsdlWrapperin interfaceServiceDescriptionWSDL
-
getAxisConfigContext
public ConfigurationContext getAxisConfigContext()
- Specified by:
getAxisConfigContextin interfaceServiceDescription
-
getServiceClient
public ServiceClient getServiceClient(QName portQName, Object serviceDelegateKey)
- Specified by:
getServiceClientin interfaceServiceDescription
-
getServiceQName
public QName getServiceQName()
- Specified by:
getServiceQNamein interfaceServiceDescription
-
getCatalogManager
public JAXWSCatalogManager getCatalogManager()
- Specified by:
getCatalogManagerin interfaceServiceDescription
-
isMTOMEnabled
public boolean isMTOMEnabled(Object key)
Description copied from interface:ServiceDescriptionAnswer if MTOM is enabled for the service represented by this Service Description. This is currently only supported on the service-requester side; it is not supported on the service-provider side. If the key is non-null, it is used to look up an sparse metadata that may have been specified when the Service Description was created.- Specified by:
isMTOMEnabledin interfaceServiceDescription- Parameters:
key- If non-null, used to look up any sparse metadata that may have been specified when the service was created.- Returns:
- TRUE if mtom was enabled either in the sparse metadata or in the composite; FALSE othewise.
-
isMTOMEnabled
public boolean isMTOMEnabled(Object key, Class seiClass)
Description copied from interface:ServiceDescriptionAnswer if MTOM is enabled for the service represented by this Service Description and the service-endpoint-interface indicated. This is currently only supported on the service-requester side; it is not supported on the service-provider side. If the key is non-null, it is used to look up an sparse metadata that may have been specified when the Service Description was created. If the seiClass is non-null it is used to further scope the enablement of MTOM to a specific SEI.- Specified by:
isMTOMEnabledin interfaceServiceDescription- Parameters:
key- If non-null, used to look up any sparse metadata that may have been specified when the service was created.seiClass- Represents client service-endpoint-interface class.- Returns:
- TRUE if mtom was enabled either in the sparse metadata or in the composite; FALSE othewise.
-
getBindingProperties
public Map<String,Object> getBindingProperties(Object serviceDelegateKey, String key)
Description copied from interface:ServiceDescriptionThis method is responsible for querying the metadata for properties associated with a given BindingProvider instance. This is only applicable for the requestor-side, and the properties are scoped at the port level.- Specified by:
getBindingPropertiesin interfaceServiceDescription- Parameters:
serviceDelegateKey- This should always be non-null when called via ServiceDelegate and is used to help retrieve dynamic ports per clientkey- This should always be non-null and is used to retrieve properties for a given client-side port- Returns:
-
getPreferredPort
public QName getPreferredPort(Object key)
- Specified by:
getPreferredPortin interfaceServiceDescription
-
isServerSide
public boolean isServerSide()
- Specified by:
isServerSidein interfaceServiceDescription
-
getDBCMap
public HashMap<String,DescriptionBuilderComposite> getDBCMap()
-
isWSDLSpecified
public boolean isWSDLSpecified()
- Specified by:
isWSDLSpecifiedin interfaceServiceDescriptionWSDL
-
getHandlerChain
public HandlerChainsType getHandlerChain()
Description copied from interface:ServiceDescriptionReturn the handler chain configuration information as a HandlerChainsType object. This is the same as calling getHandlerChain(null).- Specified by:
getHandlerChainin interfaceServiceDescription- See Also:
ServiceDescription.getHandlerChain(Object)
-
getHandlerChain
public HandlerChainsType getHandlerChain(Object sparseCompositeKey)
Description copied from interface:ServiceDescriptionReturn the handler chain configuration information as a HandlerChainsType object. If the key is non-null then it is used to look for handler chain configuration information in the sparse metadata. The order in which the configuration information is resolved is: 1) Look in sparse composite if the key is not null 2) Look in the composite 3) Look for a HandlerChain annotation and read in the file it specifies- Specified by:
getHandlerChainin interfaceServiceDescription- Parameters:
sparseCompositeKey- May be null. If non-null, used to look for service-delegate specific sparse composite information.- Returns:
- A HandlerChainsType object or null
-
getAnnoHandlerChainAnnotation
public HandlerChain getAnnoHandlerChainAnnotation(Object sparseCompositeKey)
-
getWSDLDefinition
public javax.wsdl.Definition getWSDLDefinition()
- Specified by:
getWSDLDefinitionin interfaceServiceDescriptionWSDL
-
getWSDLGeneratedDefinition
public javax.wsdl.Definition getWSDLGeneratedDefinition()
Returns the WSDL definiton as created by calling the WSDL generator. This will be null unless the WSDL definition provided by the metadata is incomplete
-
getWSDLService
public javax.wsdl.Service getWSDLService()
- Specified by:
getWSDLServicein interfaceServiceDescriptionWSDL
-
getWSDLPorts
public Map getWSDLPorts()
- Specified by:
getWSDLPortsin interfaceServiceDescriptionWSDL
-
getPorts
public List<QName> getPorts(Object serviceDelegateKey)
Description copied from interface:ServiceDescriptionReturns a list of the ports for this serivce. The ports returned are the - Ports declared ports for this Service. They can be delcared in the WSDL or via annotations. - Dynamic ports added to the service- Specified by:
getPortsin interfaceServiceDescription- Parameters:
serviceDelegateKey- This should always be non-null when called via ServiceDelegate and is used to help retrieve dynamic ports per client- Returns:
-
getWSDLPortsUsingPortType
public List<javax.wsdl.Port> getWSDLPortsUsingPortType(QName portTypeQN)
Description copied from interface:ServiceDescriptionWSDLReturn a collection of WSDL ports under this service which use the portType QName.- Specified by:
getWSDLPortsUsingPortTypein interfaceServiceDescriptionWSDL- Returns:
-
getWSDLPortsUsingSOAPAddress
public List<javax.wsdl.Port> getWSDLPortsUsingSOAPAddress(List<javax.wsdl.Port> wsdlPorts)
Description copied from interface:ServiceDescriptionWSDLReturn a subset of the collection of WSDL ports which specify a SOAP 1.1 or 1.2 address.- Specified by:
getWSDLPortsUsingSOAPAddressin interfaceServiceDescriptionWSDL- Returns:
-
getServiceRuntimeDesc
public ServiceRuntimeDescription getServiceRuntimeDesc(String name)
- Specified by:
getServiceRuntimeDescin interfaceServiceDescription
-
setServiceRuntimeDesc
public void setServiceRuntimeDesc(ServiceRuntimeDescription srd)
- Specified by:
setServiceRuntimeDescin interfaceServiceDescription
-
getServiceClassName
protected String getServiceClassName()
Return the name of the client-side service class if it exists.
-
toString
public String toString()
Return a string representing this Description object and all the objects it contains.
-
setResolvedHandlersDescription
public void setResolvedHandlersDescription(PortInfo portInfo, ResolvedHandlersDescription resolvedHandlersInfo)
Description copied from interface:ServiceDescriptionCache information for handlers which have been resolved for this port. This information is set when the handler resolver initially resolves the handlers based on the handler configuration information. It is cached on the service description for performance so that subsequent queries by other handler resolvers for the same port do not have to re-resolve the information from the handler configuration information.- Specified by:
setResolvedHandlersDescriptionin interfaceServiceDescription- Parameters:
portInfo- Port for which the handler information should be cachedresolvedHandlersInfo- An object containing information for the resolved handlers
-
getResolvedHandlersDescription
public ResolvedHandlersDescription getResolvedHandlersDescription(PortInfo portInfo)
Description copied from interface:ServiceDescriptionAnswer information for resolved handlers for the given port. This information is set when the handler resolver initially resolves the handlers based on the handler configuration information. It is cached on the service description for performance so that subsequent queries by other handler resolvers for the same port do not have to re-resolve the information from the handler configuration information.- Specified by:
getResolvedHandlersDescriptionin interfaceServiceDescription- Parameters:
portInfo- Port for which the handler information is desired- Returns:
- An object containing information for the resolved handlers, or null if no information is found in the cache.
-
releaseResources
public void releaseResources(Object delegate)
Description copied from interface:ServiceDescriptionCheck into releasing resources related to this ServiceDescription. Those resources include this ServiceDescription instance, the EndpointDescription instances it owns and their associated AxisService and related objects. NOTE: This should only be called on ServiceDescrpition instances that are owned by client ServiceDelegate instances; it SHOULD NOT be called on server-side ServiceDescriptions since those are built during server start and their life-cycle is the life-cycle of the server.- Specified by:
releaseResourcesin interfaceServiceDescription- Parameters:
delegate- The ServiceDelegate instance that owns this ServiceDescription.
-
getMTOMThreshold
public int getMTOMThreshold(Object serviceDelegate, Class seiClass)
Description copied from interface:ServiceDescriptionReturn the MTOM Threshold as set by the Client via a sparse composite (such as a client deployment descriptor).- Specified by:
getMTOMThresholdin interfaceServiceDescription- Parameters:
serviceDelegate- The instance of the service delegate related to this serviceseiClass- The SEI for the port to retrieve the MTOM threshold for- Returns:
- the MTOM threshold if set, or 0 if not set.
-
isRespectBindingEnabled
public boolean isRespectBindingEnabled(Object serviceDelegateKey, Class seiClass)
Description copied from interface:ServiceDescriptionReturn whether RespectBinding is enabled as set by the Client via a sparse composite (such as a client deployment descriptor).- Specified by:
isRespectBindingEnabledin interfaceServiceDescription- Parameters:
serviceDelegateKey- The instance of the service delegate related to this serviceseiClass- The SEI for the port to retrieve the RespectBinding setting for.- Returns:
- true if RespectBinding is enabled; false otherwise.
-
isAddressingConfigured
public boolean isAddressingConfigured(Object serviceDelegateKey, Class seiClass)
Description copied from interface:ServiceDescriptionAnswer whether Addressing was explicitly configured via metadata (such as a deployment descriptor) on the service-requester. Note that the related methods will return default values if Addressing was not explicitly configured; otherwise they will return values set based on the metadata configuration.- Specified by:
isAddressingConfiguredin interfaceServiceDescription- Parameters:
serviceDelegateKey- The instance of the service delegate related to this serviceseiClass- The SEI for the port to retrieve the setting for.- Returns:
- true if Addressing was explicitly set via metadata, false otherwise.
- See Also:
ServiceDescription.isAddressingEnabled(Object, Class),ServiceDescription.isAddressingRequired(Object, Class),ServiceDescription.getAddressingResponses(Object, Class)
-
isAddressingEnabled
public boolean isAddressingEnabled(Object serviceDelegateKey, Class seiClass)
Description copied from interface:ServiceDescriptionAnswer whether Addressing is enabled on the service-requester. Note that if addressing was not configured via metadata, then this method will return a default value, otherwise it will return the value configured via metadata.- Specified by:
isAddressingEnabledin interfaceServiceDescription- Parameters:
serviceDelegateKey- The instance of the service delegate related to this serviceseiClass- The SEI for the port to retrieve the setting for.- Returns:
- true if Addressing is enabled on the service-requester, false (default) otherwise
- See Also:
ServiceDescription.isAddressingConfigured(Object, Class)
-
isAddressingRequired
public boolean isAddressingRequired(Object serviceDelegateKey, Class seiClass)
Description copied from interface:ServiceDescriptionAnswer whether Addressing is required on the service-requester. Note that if addressing was not configured via metadata, then this method will return a default value, otherwise it will return the value configured via metadata.- Specified by:
isAddressingRequiredin interfaceServiceDescription- Parameters:
serviceDelegateKey- The instance of the service delegate related to this serviceseiClass- The SEI for the port to retrieve the setting for.- Returns:
- true if Addressing is required on the service-requester, false (default) otherwise
- See Also:
ServiceDescription.isAddressingConfigured(Object, Class)
-
getAddressingResponses
public AddressingFeature.Responses getAddressingResponses(Object serviceDelegateKey, Class seiClass)
Description copied from interface:ServiceDescriptionAnswer the type of Addressing responses required by the service-requester. Note that if addressing was not configured via metadata, then this method will return a default value, otherwise it will return the value configured via metadata.- Specified by:
getAddressingResponsesin interfaceServiceDescription- Parameters:
serviceDelegateKey- The instance of the service delegate related to this serviceseiClass- The SEI for the port to retrieve the setting for.- Returns:
- AddressingFeature.Responses vale corresponding to the type of responses required by service-requester.
- See Also:
ServiceDescription.isAddressingConfigured(Object, Class)
-
-