org.apache.axis.client
Class Service

java.lang.Object
  |
  +--org.apache.axis.client.Service
All Implemented Interfaces:
javax.naming.Referenceable, java.io.Serializable, Service

public class Service
extends java.lang.Object
implements Service

Axis' JAXRPC Dynamic Invoation Interface implementation of the Service interface. The Service class should be used a the starting point for access SOAP Web Services. Typically, a Service will be created with a WSDL document and along with a serviceName you can then ask for a Call object that will allow you to invoke a Web Service.

Author:
Doug Davis (dug@us.ibm.com)
See Also:
Serialized Form

Constructor Summary
Service()
          Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL.
Service(ConfigurationProvider configProvider)
          Constructs a new Service object as above, but also passing in the ConfigurationProvider which should be used to set up the AxisClient.
Service(java.io.InputStream wsdlInputStream, QName serviceName)
          Constructs a new Service object for the service in the WSDL document in the wsdlInputStream and serviceName parameters.
Service(java.lang.String wsdlLocation, QName serviceName)
          Constructs a new Service object for the service in the WSDL document pointed to by the wsdlLocation and serviceName parameters.
Service(java.net.URL wsdlDoc, QName 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 createCall()
          Creates a new Call object with no prefilled data.
 Call createCall(QName portName)
          Creates a new Call object - will prefill as much info from the WSDL as it can.
 Call createCall(QName portName, java.lang.String operationName)
          Creates a new Call object - will prefill as much info from the WSDL as it can.
protected  AxisClient getAxisClient()
           
 AxisEngine getEngine()
          Returns the current AxisEngine used by this Service and all of the Call objects created from this Service object.
 java.rmi.Remote getPort(QName portName, java.lang.Class proxyInterface)
          Not implemented yet
 java.util.Iterator getPorts()
          Returns an Iterator that can be used to get all of the ports specified in the WSDL file associated with this Service (if there is a WSDL file).
 javax.naming.Reference getReference()
          Not implemented yet
 QName getServiceName()
          Returns the qualified name of the service (if one is set).
 TypeMappingRegistry getTypeMappingRegistry()
          Returns the current TypeMappingRegistry or null.
 java.net.URL getWSDLDocumentLocation()
          Returns the location of the WSDL document used to prefill the data (if one was used at all).
 void setConfigProvider(ConfigurationProvider configProvider)
          Set this Service's configuration provider.
 void setEngine(AxisEngine engine)
          Sets this Service's AxisEngine.
 void setTypeMappingRegistry(TypeMappingRegistry registry)
          Defines the current Type Mappig Registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service()
        throws JAXRPCException
Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL.
Throws:
JAXRPCException - If there's an error

Service

public Service(ConfigurationProvider configProvider)
        throws JAXRPCException
Constructs a new Service object as above, but also passing in the ConfigurationProvider which should be used to set up the AxisClient.

Service

public Service(java.net.URL wsdlDoc,
               QName serviceName)
        throws JAXRPCException
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:
JAXRPCExceptionIif - there's an error finding or parsing the WSDL

Service

public Service(java.lang.String wsdlLocation,
               QName serviceName)
        throws JAXRPCException
Constructs a new Service object for the service in the WSDL document pointed to by the wsdlLocation and serviceName parameters. This is just like the previous constructor but instead of URL the wsdlLocation parameter points to a file on the filesystem relative to the current directory.
Parameters:
wsdlLocation - Location of the WSDL relative to the current dir
serviceName - Qualified name of the desired service
Throws:
JAXRPCException - If there's an error finding or parsing the WSDL

Service

public Service(java.io.InputStream wsdlInputStream,
               QName serviceName)
        throws JAXRPCException
Constructs a new Service object for the service in the WSDL document in the wsdlInputStream and serviceName parameters. This is just like the previous constructor but instead of reading the WSDL from a file (or from a URL) it is in the passed in InputStream.
Parameters:
wsdlInputStream - InputStream containing the WSDL
serviceName - Qualified name of the desired service
Throws:
JAXRPCException - If there's an error finding or parsing the WSDL
Method Detail

getAxisClient

protected AxisClient getAxisClient()
                            throws JAXRPCException

getPort

public java.rmi.Remote getPort(QName portName,
                               java.lang.Class proxyInterface)
                        throws JAXRPCException
Not implemented yet
Specified by:
getPort in interface Service
Parameters:
portName - ...
proxyInterface - ...
Returns:
java.rmi.Remote ...
Throws:
JAXRPCException - If there's an error

createCall

public Call createCall(QName portName)
                throws JAXRPCException
Creates a new Call object - will prefill as much info from the WSDL as it can. Right now it's just the target URL of the Web Service.
Specified by:
createCall in interface Service
Parameters:
portName - PortName in the WSDL doc to search for
Returns:
Call Used for invoking the Web Service
Throws:
JAXRPCException - If there's an error

createCall

public Call createCall(QName portName,
                       java.lang.String operationName)
                throws JAXRPCException
Creates a new Call object - will prefill as much info from the WSDL as it can. Right now it's target URL, SOAPAction, Parameter types, and return type of the Web Service.
Specified by:
createCall in interface Service
Parameters:
portName - PortName in the WSDL doc to search for
operationName - Operation(method) that's going to be invoked
Returns:
Call Used for invoking the Web Service
Throws:
JAXRPCException - If there's an error

createCall

public Call createCall()
                throws JAXRPCException
Creates a new Call object with no prefilled data. This assumes that the caller will set everything manually - no checking of any kind will be done against the WSDL.
Specified by:
createCall in interface Service
Returns:
Call Used for invoking the Web Service
Throws:
JAXRPCException - If there's an error

getWSDLDocumentLocation

public java.net.URL getWSDLDocumentLocation()
Returns the location of the WSDL document used to prefill the data (if one was used at all).
Specified by:
getWSDLDocumentLocation in interface Service
Returns:
URL URL pointing to the WSDL doc

getServiceName

public QName getServiceName()
Returns the qualified name of the service (if one is set).
Specified by:
getServiceName in interface Service
Returns:
QName Fully qualified name of this service.

getPorts

public java.util.Iterator getPorts()
Returns an Iterator that can be used to get all of the ports specified in the WSDL file associated with this Service (if there is a WSDL file).
Specified by:
getPorts in interface Service
Returns:
Iterator The ports specified in the WSDL file

setTypeMappingRegistry

public void setTypeMappingRegistry(TypeMappingRegistry registry)
                            throws JAXRPCException
Defines the current Type Mappig Registry.
Specified by:
setTypeMappingRegistry in interface Service
Parameters:
registry - The TypeMappingRegistry
Throws:
JAXRPCException - if there's an error

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()
Returns the current TypeMappingRegistry or null.
Specified by:
getTypeMappingRegistry in interface Service
Returns:
TypeMappingRegistry The registry

getReference

public javax.naming.Reference getReference()
Not implemented yet
Specified by:
getReference in interface javax.naming.Referenceable
Returns:
Reference ...

setEngine

public void setEngine(AxisEngine engine)
Sets this Service's AxisEngine. This engine will be shared by all Call objects created from this Service object. Note: Not part of the JAX-RPC spec.
Parameters:
engine - Sets this Service's AxisEngine to the passed in one

getEngine

public AxisEngine getEngine()
Returns the current AxisEngine used by this Service and all of the Call objects created from this Service object. Note: Not part of the JAX-RPC spec.
Returns:
AxisEngine the engine

setConfigProvider

public void setConfigProvider(ConfigurationProvider configProvider)
Set this Service's configuration provider. Note that since all of the constructors create the AxisClient right now, this is basically a no-op. Putting it in now so that we can make lazy engine instantiation work, and not have to duplicate every single Service constructor with a ConfigurationProvider argument.
Parameters:
configProvider - the ConfigurationProvider we want to use.


Copyright © 2001 Apache XML Project. All Rights Reserved.