|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.client.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.
Nested Class Summary | |
protected static class |
Service.HandlerRegistryImpl
|
Field Summary | |
protected static HashMap |
cachedWSDL
|
protected static boolean |
cachingWSDL
|
protected EngineConfiguration |
config
|
protected AxisEngine |
engine
|
protected javax.xml.namespace.QName |
serviceName
|
protected String |
wsdlLocation
|
protected javax.wsdl.Service |
wsdlService
|
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(EngineConfiguration config)
Constructs a new Service object as above, but also passing in the EngineConfiguration which should be used to set up the AxisClient. |
|
Service(InputStream wsdlInputStream,
javax.xml.namespace.QName serviceName)
Constructs a new Service object for the service in the WSDL document in the wsdlInputStream and serviceName parameters. |
|
Service(Parser parser,
javax.xml.namespace.QName serviceName)
Constructs a new Service object for the service in the WSDL document |
|
Service(javax.xml.namespace.QName serviceName)
Constructs a new Service object - this assumes the caller will set the appropriate fields by hand rather than getting them from the WSDL. |
|
Service(String wsdlLocation,
javax.xml.namespace.QName serviceName)
Constructs a new Service object for the service in the WSDL document pointed to by the wsdlLocation and serviceName parameters. |
|
Service(URL wsdlDoc,
javax.xml.namespace.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 | |
javax.xml.rpc.Call |
createCall()
Creates a new Call object with no prefilled data. |
javax.xml.rpc.Call |
createCall(javax.xml.namespace.QName portName)
Creates a new Call object - will prefill as much info from the WSDL as it can. |
javax.xml.rpc.Call |
createCall(javax.xml.namespace.QName portName,
javax.xml.namespace.QName operationName)
Creates a new Call object - will prefill as much info from the WSDL as it can. |
javax.xml.rpc.Call |
createCall(javax.xml.namespace.QName portName,
String operationName)
Creates a new Call object - will prefill as much info from the WSDL as it can. |
protected AxisClient |
getAxisClient()
|
boolean |
getCacheWSDL()
Tells whether or not we're caching WSDL |
javax.xml.rpc.Call[] |
getCalls(javax.xml.namespace.QName portName)
Gets an array of preconfigured Call objects for invoking operations on the specified port. |
AxisEngine |
getEngine()
Returns the current AxisEngine used by this Service and all of the Call objects created from this Service object. |
protected EngineConfiguration |
getEngineConfiguration()
Constructs a EngineConfig if one is not available. |
javax.xml.rpc.handler.HandlerRegistry |
getHandlerRegistry()
Returns the configured HandlerRegistry instance for this Service instance. |
boolean |
getMaintainSession()
If true, this service wants to track sessions. |
protected Parser |
getParser()
Stub out, to give clients the cahnce to modify parser properties TDI 15-Jun-2004 |
Remote |
getPort(Class proxyInterface)
Return a dynamic proxy for the given proxy interface. |
Remote |
getPort(javax.xml.namespace.QName portName,
Class proxyInterface)
Return either an instance of a generated stub, if it can be found, or a dynamic proxy for the given proxy interface. |
Remote |
getPort(String endpoint,
Class proxyInterface)
Return an object which acts as a dynamic proxy for the passed interface class. |
protected Remote |
getPort(String endpoint,
javax.xml.namespace.QName portName,
Class proxyInterface)
|
Iterator |
getPorts()
Returns an Iterator for the list of
QName s of service endpoints grouped by this
service |
Reference |
getReference()
Returns a reference to this object. |
javax.xml.namespace.QName |
getServiceName()
Returns the qualified name of the service (if one is set). |
protected String |
getTargetEnpointAddress()
The service may provide the target endpoint address, in case the client wsdl port does not contain a valid address. |
javax.xml.rpc.encoding.TypeMappingRegistry |
getTypeMappingRegistry()
Returns the current TypeMappingRegistry or null. |
URL |
getWSDLDocumentLocation()
Returns the location of the WSDL document used to prefill the data (if one was used at all). |
Parser |
getWSDLParser()
|
protected javax.wsdl.Port |
getWSDLPort(Class seiClass)
Get the WSDL Port for a given service endpoint interface This implementation gets the wsdl port that corresponds to the class name, if not found it just get the first one we have. |
protected javax.wsdl.Service |
getWSDLService()
|
void |
setCacheWSDL(boolean flag)
Allows users to turn caching of WSDL documents on or off. |
void |
setEngine(AxisEngine engine)
Sets this Service's AxisEngine. |
void |
setEngineConfiguration(EngineConfiguration config)
Set this Service's engine configuration. |
void |
setMaintainSession(boolean yesno)
Determine whether we'd like to track sessions or not. |
void |
setTypeMappingRegistry(javax.xml.rpc.encoding.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 |
Field Detail |
protected transient AxisEngine engine
protected transient EngineConfiguration config
protected javax.xml.namespace.QName serviceName
protected String wsdlLocation
protected javax.wsdl.Service wsdlService
protected static HashMap cachedWSDL
protected static boolean cachingWSDL
Constructor Detail |
public Service()
public Service(javax.xml.namespace.QName serviceName)
public Service(EngineConfiguration config)
public Service(URL wsdlDoc, javax.xml.namespace.QName serviceName) throws javax.xml.rpc.ServiceException
wsdlDoc
- URL of the WSDL documentserviceName
- Qualified name of the desired service
javax.xml.rpc.ServiceException
- If there's an error finding or parsing the WSDLpublic Service(Parser parser, javax.xml.namespace.QName serviceName) throws javax.xml.rpc.ServiceException
parser
- Parser for this serviceserviceName
- Qualified name of the desired service
javax.xml.rpc.ServiceException
- If there's an errorpublic Service(String wsdlLocation, javax.xml.namespace.QName serviceName) throws javax.xml.rpc.ServiceException
wsdlLocation
- Location of the WSDL relative to the current dirserviceName
- Qualified name of the desired service
javax.xml.rpc.ServiceException
- If there's an error finding or parsing the WSDLpublic Service(InputStream wsdlInputStream, javax.xml.namespace.QName serviceName) throws javax.xml.rpc.ServiceException
wsdlInputStream
- InputStream containing the WSDLserviceName
- Qualified name of the desired service
javax.xml.rpc.ServiceException
- If there's an error finding or parsing the WSDLMethod Detail |
protected Parser getParser()
protected javax.wsdl.Service getWSDLService()
public Parser getWSDLParser()
protected AxisClient getAxisClient()
public Remote getPort(javax.xml.namespace.QName portName, Class proxyInterface) throws javax.xml.rpc.ServiceException
getPort
in interface javax.xml.rpc.Service
portName
- The name of the service portproxyInterface
- The Remote object returned by this
method will also implement the given proxyInterface
javax.xml.rpc.ServiceException
- If there's an errorpublic Remote getPort(Class proxyInterface) throws javax.xml.rpc.ServiceException
getPort
in interface javax.xml.rpc.Service
proxyInterface
- The Remote object returned by this
method will also implement the given proxyInterface
javax.xml.rpc.ServiceException
- If there's an errorprotected javax.wsdl.Port getWSDLPort(Class seiClass) throws javax.xml.rpc.ServiceException
seiClass
- The service endpoint interface class
javax.xml.rpc.ServiceException
- If there's an errorpublic Remote getPort(String endpoint, Class proxyInterface) throws javax.xml.rpc.ServiceException
endpoint
- the URL which will be used as the SOAP endpointproxyInterface
- the interface class which we wish to mimic
via a dynamic proxy
javax.xml.rpc.ServiceException
protected Remote getPort(String endpoint, javax.xml.namespace.QName portName, Class proxyInterface) throws javax.xml.rpc.ServiceException
javax.xml.rpc.ServiceException
public javax.xml.rpc.Call createCall(javax.xml.namespace.QName portName) throws javax.xml.rpc.ServiceException
createCall
in interface javax.xml.rpc.Service
portName
- PortName in the WSDL doc to search for
javax.xml.rpc.ServiceException
- If there's an errorprotected String getTargetEnpointAddress()
public javax.xml.rpc.Call createCall(javax.xml.namespace.QName portName, String operationName) throws javax.xml.rpc.ServiceException
createCall
in interface javax.xml.rpc.Service
portName
- PortName in the WSDL doc to search foroperationName
- Operation(method) that's going to be invoked
javax.xml.rpc.ServiceException
- If there's an errorpublic javax.xml.rpc.Call createCall(javax.xml.namespace.QName portName, javax.xml.namespace.QName operationName) throws javax.xml.rpc.ServiceException
createCall
in interface javax.xml.rpc.Service
portName
- PortName in the WSDL doc to search foroperationName
- Operation(method) that's going to be invoked
javax.xml.rpc.ServiceException
- If there's an errorpublic javax.xml.rpc.Call createCall() throws javax.xml.rpc.ServiceException
createCall
in interface javax.xml.rpc.Service
javax.xml.rpc.ServiceException
- If there's an errorpublic javax.xml.rpc.Call[] getCalls(javax.xml.namespace.QName portName) throws javax.xml.rpc.ServiceException
getCalls
in interface javax.xml.rpc.Service
javax.xml.rpc.ServiceException
- - If this Service class does not have access
to the required WSDL metadata or if an illegal portName is specified.public javax.xml.rpc.handler.HandlerRegistry getHandlerRegistry()
getHandlerRegistry
in interface javax.xml.rpc.Service
UnsupportedOperationException
- - if the Service
class does not support the configuration of a
HandlerRegistry.public URL getWSDLDocumentLocation()
getWSDLDocumentLocation
in interface javax.xml.rpc.Service
public javax.xml.namespace.QName getServiceName()
getServiceName
in interface javax.xml.rpc.Service
public Iterator getPorts() throws javax.xml.rpc.ServiceException
Iterator
for the list of
QName
s of service endpoints grouped by this
service
getPorts
in interface javax.xml.rpc.Service
java.util.Iterator
with elements
of type javax.xml.namespace.QName
javax.xml.rpc.ServiceException
- If this Service class does not
have access to the required WSDL metadatapublic void setTypeMappingRegistry(javax.xml.rpc.encoding.TypeMappingRegistry registry) throws javax.xml.rpc.ServiceException
registry
- The TypeMappingRegistry
javax.xml.rpc.ServiceException
- if there's an errorpublic javax.xml.rpc.encoding.TypeMappingRegistry getTypeMappingRegistry()
getTypeMappingRegistry
in interface javax.xml.rpc.Service
public Reference getReference()
getReference
in interface Referenceable
public void setEngine(AxisEngine engine)
engine
- Sets this Service's AxisEngine to the passed in onepublic AxisEngine getEngine()
public void setEngineConfiguration(EngineConfiguration config)
EngineConfiguration
, do
the following before calling the Service constructor:
AxisProperties.setProperty(EngineConfigurationFactory.SYSTEM_PROPERTY_NAME,
"classname.of.new.EngineConfigurationFactory");
Where the second parameter is the name of your new class that implements
EngineConfigurationFactory
and a
method. See
public static EngineConfigurationFactory newFactory(Object param)
EngineConfigurationFactoryDefault
for an example
of how to do this.
This way, when the Service class constructor calls
EngineConfigurationFactoryFinder.newFactory().getClientEngineConfig()
the getClientEngineConfig() of your own EngineConfigurationFactory will be
called, and your configuration will be used in the constructed Service object.Another way is to use the "discovery" method of
EngineConfigurationFactoryFinder
.
config
- the EngineConfiguration we want to use.protected EngineConfiguration getEngineConfiguration()
public void setMaintainSession(boolean yesno)
yesno
- true if session state is desired, false if not.public boolean getMaintainSession()
public boolean getCacheWSDL()
public void setCacheWSDL(boolean flag)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |