org.apache.wsif.base
Class WSIFServiceImpl

java.lang.Object
  extended byorg.apache.wsif.base.WSIFServiceImpl
All Implemented Interfaces:
WSIFService

public class WSIFServiceImpl
extends java.lang.Object
implements WSIFService

An entry point to dynamic WSDL invocations.

Author:
Alekander Slominski, Sanjiva Weerawarana, Owen Burroughs , Ant Elder , Jeremy Hughes , Mark Whitlock

Method Summary
static void addExtensionRegistry(javax.wsdl.extensions.ExtensionRegistry reg)
          Add new WSDL model extension registry that is shared by all dynamic WSIF providers.
 java.lang.String deep()
           
 java.util.Iterator getAvailablePortNames()
          Get the names of the available ports
static javax.wsdl.extensions.ExtensionRegistry getCompositeExtensionRegistry()
          Return extension registry that contains ALL declared extensions.
 WSIFMessage getContext()
          Gets the context information for this WSIFService.
 javax.wsdl.Definition getDefinition()
          Get the Definition object representing the wsdl document
static WSIFProvider getDynamicWSIFProvider(java.lang.String namespaceURI)
          Deprecated. this method is replaced by the getProvider method in the org.apache.util.WSIFPluggableProviders class
 WSIFPort getPort()
          Returns an appropriate WSIFPort for the portType that this factory supports.
 WSIFPort getPort(java.lang.String portName)
          Return dynamic port instance selected by port name.
 java.lang.Object getStub(java.lang.Class iface)
          Get the dynamic proxy that will implement the interface iface
 java.lang.Object getStub(java.lang.String portName, java.lang.Class iface)
          Get the dynamic proxy that will implement the interface iface for the port portName.
 void mapPackage(java.lang.String namespace, java.lang.String packageName)
          Add an association between a namespace URI and and a Java package.
 void mapType(javax.xml.namespace.QName xmlType, java.lang.Class javaType)
          Add association between XML and Java type.
 void mapType(javax.xml.namespace.QName xmlType, java.lang.String className)
          Add association between XML and Java type.
static void setAutoLoadProviders(boolean b)
          Deprecated. this method is replaced by the setAutoLoadProviders method in the org.apache.util.WSIFPluggableProviders class
 void setContext(WSIFMessage context)
          Sets the context information for this WSIFService.
static void setDynamicWSIFProvider(java.lang.String providerNamespaceURI, WSIFProvider provider)
          Deprecated. this method is replaced by the overrideDefaultProvider method in the org.apache.util.WSIFPluggableProviders class
 void setPreferredPort(java.lang.String portName)
          Set the preferred port
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setPreferredPort

public void setPreferredPort(java.lang.String portName)
                      throws WSIFException
Set the preferred port

Specified by:
setPreferredPort in interface WSIFService
Parameters:
portName - The name of the port to use
Throws:
WSIFException - if something goes wrong

getAvailablePortNames

public java.util.Iterator getAvailablePortNames()
                                         throws WSIFException
Get the names of the available ports

Specified by:
getAvailablePortNames in interface WSIFService
Returns:
Iterator for list of available port names.
Throws:
WSIFException - if something goes wrong

getPort

public WSIFPort getPort()
                 throws WSIFException
Description copied from interface: WSIFService
Returns an appropriate WSIFPort for the portType that this factory supports. If the service had multiple ports, which one is returned depends on the specific factory - the factory implementation may use whatever heuristic it feels like to select an "appropriate" one.

Specified by:
getPort in interface WSIFService
Returns:
the new WSIFPort
Throws:
WSIFException - if a suitable port cannot be located.

getPort

public WSIFPort getPort(java.lang.String portName)
                 throws WSIFException
Return dynamic port instance selected by port name.

Specified by:
getPort in interface WSIFService
Parameters:
portName - name of the port (local part of the name).
Returns:
the new WSIFPort
Throws:
WSIFException - if the named port is not known or available

mapType

public void mapType(javax.xml.namespace.QName xmlType,
                    java.lang.Class javaType)
             throws WSIFException
Add association between XML and Java type.

Specified by:
mapType in interface WSIFService
Parameters:
xmlType - The qualified xml name
javaType - The Java class
Throws:
WSIFException - if something goes wrong

mapType

public void mapType(javax.xml.namespace.QName xmlType,
                    java.lang.String className)
             throws WSIFException
Add association between XML and Java type.

Parameters:
xmlType - The qualified xml name
className - The Java class name
Throws:
WSIFException

mapPackage

public void mapPackage(java.lang.String namespace,
                       java.lang.String packageName)
                throws WSIFException
Add an association between a namespace URI and and a Java package. Calling this method will trigger the automatic mapping of types, regardless of what was set at the WSIFServiceFactory level, since all the types in the schema(s) need to be examined in order to use the information provided.

Specified by:
mapPackage in interface WSIFService
Parameters:
namespace - The namespace URI
packageName - The full package name
Throws:
WSIFException - if something goes wrong

getDynamicWSIFProvider

public static WSIFProvider getDynamicWSIFProvider(java.lang.String namespaceURI)
Deprecated. this method is replaced by the getProvider method in the org.apache.util.WSIFPluggableProviders class


setDynamicWSIFProvider

public static void setDynamicWSIFProvider(java.lang.String providerNamespaceURI,
                                          WSIFProvider provider)
Deprecated. this method is replaced by the overrideDefaultProvider method in the org.apache.util.WSIFPluggableProviders class


setAutoLoadProviders

public static void setAutoLoadProviders(boolean b)
Deprecated. this method is replaced by the setAutoLoadProviders method in the org.apache.util.WSIFPluggableProviders class


getStub

public java.lang.Object getStub(java.lang.String portName,
                                java.lang.Class iface)
                         throws WSIFException
Get the dynamic proxy that will implement the interface iface for the port portName.

Specified by:
getStub in interface WSIFService
Parameters:
portName - the name of the port
iface - the interface that the stub will implement
Returns:
a stub (a dynamic proxy)
Throws:
WSIFException - if something goes wrong

getStub

public java.lang.Object getStub(java.lang.Class iface)
                         throws WSIFException
Get the dynamic proxy that will implement the interface iface

Specified by:
getStub in interface WSIFService
Returns:
a stub (a dynamic proxy)
Throws:
WSIFException - if something goes wrong

addExtensionRegistry

public static void addExtensionRegistry(javax.wsdl.extensions.ExtensionRegistry reg)
Add new WSDL model extension registry that is shared by all dynamic WSIF providers.


getCompositeExtensionRegistry

public static javax.wsdl.extensions.ExtensionRegistry getCompositeExtensionRegistry()
Return extension registry that contains ALL declared extensions. This is special registry that does not allow to register serializers but only to add new extension registreis through addExtensionRegistry method.

See Also:
addExtensionRegistry(javax.wsdl.extensions.ExtensionRegistry)

getDefinition

public javax.wsdl.Definition getDefinition()
Get the Definition object representing the wsdl document

Specified by:
getDefinition in interface WSIFService
Returns:
The Definition object

getContext

public WSIFMessage getContext()
                       throws WSIFException
Gets the context information for this WSIFService.

Specified by:
getContext in interface WSIFService
Returns:
context
Throws:
WSIFException

setContext

public void setContext(WSIFMessage context)
Sets the context information for this WSIFService.

Specified by:
setContext in interface WSIFService

deep

public java.lang.String deep()


Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.