org.jboss.webservice.client
Class ServiceImpl

java.lang.Object
  extended byorg.jboss.axis.client.Service (src) 
      extended byorg.jboss.webservice.client.ServiceImpl
All Implemented Interfaces:
javax.naming.Referenceable, java.io.Serializable, Service (src)

public class ServiceImpl
extends Service (src)

Lookup EngineConfiguration configure the the jaxrpc service with it.

Since:
27-April-2004
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.jboss.axis.client.Service (src)
Service.HandlerRegistryImpl (src)
 
Field Summary
 
Fields inherited from class org.jboss.axis.client.Service (src)
cachedWSDL, cachingWSDL, config, engine, serviceName, wsdlLocation, wsdlService
 
Constructor Summary
ServiceImpl()
          Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL.
ServiceImpl(QName (src)  serviceName)
          Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL.
ServiceImpl(java.net.URL wsdlDoc, QName (src)  serviceName)
          Constructs a new Service object for the service in the WSDL document pointed to by the wsdlDoc URL and serviceName parameters.
 
Method Summary
 Call (src) createCall()
          Overwrite to provide a Call object that is ws4ee aware.
protected  AxisClient (src) getAxisClient()
          Get the AxisClient engine.
protected  EngineConfiguration (src) getEngineConfiguration()
          Use the EngineConfigurationFinder.getClientEngineConfiguration() to discover the client engine configuration.
protected  java.rmi.Remote getGeneratedStub(QName (src)  portName, java.lang.Class proxyInterface)
          With the proxyInterface and the service's portName, we have ALMOST enough info to find a generated stub.
 HandlerRegistry (src) getHandlerRegistry()
          J2EE components should not use the getHandlerRegistry() method.
 JavaWsdlMapping (src) getJavaWsdlMapping()
           
protected  Parser (src) getParser()
          Turn off automatic wrapped style
 java.rmi.Remote getPort(java.lang.Class seiClass)
          Returns the dynamic proxy for the given SEI.
 java.rmi.Remote getPort(QName (src)  portName, java.lang.Class seiClass)
          Returns the dynamic proxy for the given SEI.
 java.util.Iterator getPorts()
          Returns an Iterator for the list of QNames of service endpoints grouped by this service

For a partial wsdl see ws-1.1 spec section 4.2.2.5 Service method use with partial WSDL

 ServiceDescription (src) getServiceDescription(java.lang.String portName)
           
 QName (src) getServiceName()
          Get the service name for this service.
protected  java.lang.String getTargetEnpointAddress()
          The service may provide the target endpoint address, in case the client wsdl port does not contain a valid address.
 TypeMappingRegistry (src) getTypeMappingRegistry()
          J2EE components should not use the getTypeMappingRegistry() method.
 Definition getWsdlDefinition()
           
protected  Port getWSDLPort(java.lang.Class seiClass)
          Get the WSDL Port for a given service portComponentLinkEndpoint interface

This looks up the port from the jaxrpc-mapping before defaulting to the Axis functionality.

 void initService(ServiceDescription (src)  serviceDesc, java.lang.String portName)
          Add a service description for the client service
 void setCallProperties(java.util.Properties callProperties)
          Set the default call properties to use with every created call
 void setJavaWsdlMapping(JavaWsdlMapping (src)  javaWsdlMapping)
           
 void setTargetEndpointAddress(java.lang.String targetEndpointAddress)
           
 void setWsdlDefinition(Definition wsdlDefinition)
           
 
Methods inherited from class org.jboss.axis.client.Service (src)
createCall, createCall, createCall, getCacheWSDL, getCalls, getEngine, getMaintainSession, getPort, getPort, getReference, getWSDLDocumentLocation, getWSDLParser, getWSDLService, setCacheWSDL, setEngine, setEngineConfiguration, setMaintainSession, setTypeMappingRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceImpl

public ServiceImpl()
Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL.


ServiceImpl

public ServiceImpl(QName (src)  serviceName)
Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL.


ServiceImpl

public ServiceImpl(java.net.URL wsdlDoc,
                   QName (src)  serviceName)
            throws ServiceException (src) 
Constructs a new Service object for the service in the WSDL document pointed to by the wsdlDoc URL and serviceName parameters.

Parameters:
wsdlDoc - URL of the WSDL document
serviceName - Qualified name of the desired service
Throws:
ServiceException (src) - If there's an error finding or parsing the WSDL
Method Detail

initService

public void initService(ServiceDescription (src)  serviceDesc,
                        java.lang.String portName)
                 throws ServiceException (src) 
Add a service description for the client service

Parameters:
serviceDesc - The Service description to add
portName - The optional port name
Throws:
ServiceException (src)

getHandlerRegistry

public HandlerRegistry (src)  getHandlerRegistry()
J2EE components should not use the getHandlerRegistry() method. A container provider must throw a java.lang.UnsupportedOperationException from the getHandlerRegistry() method of the Service Interface. Handler support is documented in Chapter 6 Handlers.

Specified by:
getHandlerRegistry in interface Service (src)
Overrides:
getHandlerRegistry in class Service (src)
Returns:
HandlerRegistry

getTypeMappingRegistry

public TypeMappingRegistry (src)  getTypeMappingRegistry()
J2EE components should not use the getTypeMappingRegistry() method. A container provider must throw a java.lang.UnsupportedOperationException from the getTypeMappingRegistry() method of the Service Interface.

Specified by:
getTypeMappingRegistry in interface Service (src)
Overrides:
getTypeMappingRegistry in class Service (src)
Returns:
TypeMappingRegistry The registry

getPort

public java.rmi.Remote getPort(java.lang.Class seiClass)
                        throws ServiceException (src) 
Returns the dynamic proxy for the given SEI.

Specified by:
getPort in interface Service (src)
Overrides:
getPort in class Service (src)
Parameters:
seiClass - The Remote object returned by this method will also implement the given proxyInterface
Returns:
java.rmi.Remote The stub implementation
Throws:
ServiceException (src) - If there's an error

getPort

public java.rmi.Remote getPort(QName (src)  portName,
                               java.lang.Class seiClass)
                        throws ServiceException (src) 
Returns the dynamic proxy for the given SEI.

Specified by:
getPort in interface Service (src)
Overrides:
getPort in class Service (src)
Parameters:
portName - The name of the service port
seiClass - The Remote object returned by this method will also implement the given proxyInterface
Returns:
java.rmi.Remote The stub implementation.
Throws:
ServiceException (src) - If there's an error

getGeneratedStub

protected java.rmi.Remote getGeneratedStub(QName (src)  portName,
                                           java.lang.Class proxyInterface)
                                    throws ServiceException (src) 
Description copied from class: Service (src)
With the proxyInterface and the service's portName, we have ALMOST enough info to find a generated stub. The generated stub is named after the binding, which we can get from the service's port. This binding is likely in the same namespace (ie, package) that the proxyInterface is in. So try to find and instantiate .Stub. If it doesn't exist, return null.

Overrides:
getGeneratedStub in class Service (src)
Throws:
ServiceException (src)

setCallProperties

public void setCallProperties(java.util.Properties callProperties)
Set the default call properties to use with every created call

Parameters:
callProperties - the properties to set
See Also:
createCall()

getServiceDescription

public ServiceDescription (src)  getServiceDescription(java.lang.String portName)

getWsdlDefinition

public Definition getWsdlDefinition()

setWsdlDefinition

public void setWsdlDefinition(Definition wsdlDefinition)

getJavaWsdlMapping

public JavaWsdlMapping (src)  getJavaWsdlMapping()

setJavaWsdlMapping

public void setJavaWsdlMapping(JavaWsdlMapping (src)  javaWsdlMapping)

createCall

public Call (src)  createCall()
                throws ServiceException (src) 
Overwrite to provide a Call object that is ws4ee aware.

Specified by:
createCall in interface Service (src)
Overrides:
createCall in class Service (src)
Returns:
Call Used for invoking the Web Service
Throws:
ServiceException (src) - If there's an error

getPorts

public java.util.Iterator getPorts()
                            throws ServiceException (src) 
Returns an Iterator for the list of QNames of service endpoints grouped by this service

For a partial wsdl see ws-1.1 spec section 4.2.2.5 Service method use with partial WSDL

Specified by:
getPorts in interface Service (src)
Overrides:
getPorts in class Service (src)
Returns:
Returns java.util.Iterator with elements of type javax.xml.namespace.QName
Throws:
ServiceException (src) - If this Service class does not have access to the required WSDL metadata

getServiceName

public QName (src)  getServiceName()
Get the service name for this service.

Specified by:
getServiceName in interface Service (src)
Overrides:
getServiceName in class Service (src)
Returns:
QName Fully qualified name of this service.

getAxisClient

protected AxisClient (src)  getAxisClient()
Get the AxisClient engine.

Overrides:
getAxisClient in class Service (src)

getEngineConfiguration

protected EngineConfiguration (src)  getEngineConfiguration()
Use the EngineConfigurationFinder.getClientEngineConfiguration() to discover the client engine configuration.

Overrides:
getEngineConfiguration in class Service (src)

getParser

protected Parser (src)  getParser()
Turn off automatic wrapped style

Overrides:
getParser in class Service (src)

getTargetEnpointAddress

protected java.lang.String getTargetEnpointAddress()
The service may provide the target endpoint address, in case the client wsdl port does not contain a valid address. This maybe the case for ws4ee clients that use a port-component-link element.

Overrides:
getTargetEnpointAddress in class Service (src)

setTargetEndpointAddress

public void setTargetEndpointAddress(java.lang.String targetEndpointAddress)

getWSDLPort

protected Port getWSDLPort(java.lang.Class seiClass)
                    throws ServiceException (src) 
Get the WSDL Port for a given service portComponentLinkEndpoint interface

This looks up the port from the jaxrpc-mapping before defaulting to the Axis functionality.

Note, this method is not part of standard Axis.

Overrides:
getWSDLPort in class Service (src)
Parameters:
seiClass - The service portComponentLinkEndpoint interface class
Returns:
A wsdl Port
Throws:
ServiceException (src) - If there's an error