org.apache.wsif.base
Class WSIFServiceFactoryImpl

java.lang.Object
  |
  +--org.apache.wsif.WSIFServiceFactory
        |
        +--org.apache.wsif.base.WSIFServiceFactoryImpl

public class WSIFServiceFactoryImpl
extends WSIFServiceFactory

Factory class used to create instances of WSIFService

Author:
Mark Whitlock, Owen Burroughs

Constructor Summary
WSIFServiceFactoryImpl()
           
 
Method Summary
 void cachingOn(boolean on)
          Set caching of servies on/off.
 WSIFService getService(javax.wsdl.Definition def)
          Returns a new WSIFService.
 WSIFService getService(javax.wsdl.Definition def, javax.wsdl.Service service)
          Returns a new WSIFService.
 WSIFService getService(javax.wsdl.Definition def, javax.wsdl.Service service, javax.wsdl.PortType portType)
          Returns a new WSIFService.
 WSIFService getService(javax.wsdl.Definition def, java.lang.String serviceNS, java.lang.String serviceName, java.lang.String portTypeNS, java.lang.String portTypeName)
          Returns a new WSIFService.
 WSIFService getService(java.lang.String wsdlLoc, java.lang.ClassLoader cl, java.lang.String serviceNS, java.lang.String serviceName, java.lang.String portTypeNS, java.lang.String portTypeName)
          Create a WSIF service instance from WSDL document URL using a ClassLoader to find local resources.
 WSIFService getService(java.lang.String wsdlLoc, java.lang.String serviceNS, java.lang.String serviceName, java.lang.String portTypeNS, java.lang.String portTypeName)
          Create a WSIFService from WSDL document URL.
 
Methods inherited from class org.apache.wsif.WSIFServiceFactory
newInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSIFServiceFactoryImpl

public WSIFServiceFactoryImpl()
Method Detail

getService

public WSIFService getService(java.lang.String wsdlLoc,
                              java.lang.String serviceNS,
                              java.lang.String serviceName,
                              java.lang.String portTypeNS,
                              java.lang.String portTypeName)
                       throws WSIFException
Create a WSIFService from WSDL document URL.
If serviceName or serviceNS is null, then WSDL document must have exactly one service in it.
If portTypeName or portTypeNS is null, then WSDL document must have exactly one portType in it and all ports of the selected service must implement the same portType.
Overrides:
getService in class WSIFServiceFactory
Parameters:
wsdlLoc - The URL for the wsdl's location
serviceNS - The namespace of the service
serviceName - The name of the service
portTypeNS - The namespace of the port type
portTypeName - The name of the port type
Returns:
The service
Throws:
A - WSIFException if an error occurs when creating the service

getService

public WSIFService getService(java.lang.String wsdlLoc,
                              java.lang.ClassLoader cl,
                              java.lang.String serviceNS,
                              java.lang.String serviceName,
                              java.lang.String portTypeNS,
                              java.lang.String portTypeName)
                       throws WSIFException
Create a WSIF service instance from WSDL document URL using a ClassLoader to find local resources.
If serviceName or serviceNS is null, then WSDL document must have exactly one service in it.
If portTypeName or portTypeNS is null, then WSDL document must have exactly one portType in it and all ports of the selected service must implement the same portType.
Overrides:
getService in class WSIFServiceFactory
Parameters:
wsdlLoc - The URL for the wsdl's location
cl - A ClassLoader to use in locating the wsdl
serviceNS - The namespace of the service
serviceName - The name of the service
portTypeNS - The namespace of the port type
portTypeName - The name of the port type
Returns:
The service
Throws:
A - WSIFException if an error occurs when creating the service

getService

public WSIFService getService(javax.wsdl.Definition def)
                       throws WSIFException
Returns a new WSIFService.
Overrides:
getService in class WSIFServiceFactory
Parameters:
def - The Definition object representing the wsdl
Returns:
The service
Throws:
A - WSIFException if an error occurs when creating the service

getService

public WSIFService getService(javax.wsdl.Definition def,
                              javax.wsdl.Service service)
                       throws WSIFException
Returns a new WSIFService.
Overrides:
getService in class WSIFServiceFactory
Parameters:
def - The Definition object representing the wsdl
service - The Service object representing the service to use
Returns:
The service
Throws:
A - WSIFException if an error occurs when creating the service

getService

public WSIFService getService(javax.wsdl.Definition def,
                              javax.wsdl.Service service,
                              javax.wsdl.PortType portType)
                       throws WSIFException
Returns a new WSIFService.
Overrides:
getService in class WSIFServiceFactory
Parameters:
def - The Definition object representing the wsdl
service - The Service object representing the service to use
portType - The PortType object representing the port type to use
Returns:
The service
Throws:
A - WSIFException if an error occurs when creating the service

getService

public WSIFService getService(javax.wsdl.Definition def,
                              java.lang.String serviceNS,
                              java.lang.String serviceName,
                              java.lang.String portTypeNS,
                              java.lang.String portTypeName)
                       throws WSIFException
Returns a new WSIFService.
Overrides:
getService in class WSIFServiceFactory
Parameters:
def - The Definition object representing the wsdl
serviceNS - The namespace of the service
serviceName - The name of the service
portTypeNS - The namespace of the port type
portTypeName - The name of the port type
Returns:
The service
Throws:
A - WSIFException if an error occurs when creating the service

cachingOn

public void cachingOn(boolean on)
Set caching of servies on/off. The default is off. If caching is on then a call to getService will first check if a service matching the parameters specified has already been created and if so a reference to that instance of WSIFService is returned.
Overrides:
cachingOn in class WSIFServiceFactory
Parameters:
on - Flag to indicate whether or not caching of services should be used


Copyright © 2002, 2002 Apache XML Project. All Rights Reserved.