Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.wsif
Interface WSIFService  view WSIFService download WSIFService.java


public interface WSIFService

A WSIFService is a factory via which WSIFPorts are retrieved. This follows the J2EE design pattern of accessing resources (WSIFPorts, in this case) via a factory which is retrieved from the context in which the application is running. When WSIF is hosted in an app server, the container can manage service invocation details by providing a factory implementation that follows the app servers wishes and guidelines. The factory is assumed to be for a specific portType; i.e., the factory knows how to factor WSIFPorts for a given portType. As such the getPort() methods do not take portType arguments.


Method Summary
 java.util.Iterator getAvailablePortNames()
          Get the names of the available ports
 WSIFMessage getContext()
          Gets the context information for this WSIFService.
 Definition getDefinition()
          Get the Definition object representing the wsdl document
 WSIFPort getPort()
          Returns an appropriate WSIFPort for the portType that this factory supports.
 WSIFPort getPort(java.lang.String portName)
          Returns a WSIFPort for the indicated port.
 java.lang.Object getStub(java.lang.Class iface)
          Get the dynamic proxy that will implement an interface for a port This method will attempt to use the preferred port if set otherwise it will use the first available port.
 java.lang.Object getStub(java.lang.String portName, java.lang.Class iface)
          Get the dynamic proxy that will implement an interface for a port
 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)
          Inform WSIF that a particular XML type (referred to in the WSDL) actually maps to a particular Java class.
 void setContext(WSIFMessage context)
          Sets the context information for this WSIFService.
 void setPreferredPort(java.lang.String portName)
          Set the preferred port
 

Method Detail

getPort

public WSIFPort getPort()
                 throws WSIFException
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.


getPort

public WSIFPort getPort(java.lang.String portName)
                 throws WSIFException
Returns a WSIFPort for the indicated port.


getStub

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


getStub

public java.lang.Object getStub(java.lang.Class iface)
                         throws WSIFException
Get the dynamic proxy that will implement an interface for a port This method will attempt to use the preferred port if set otherwise it will use the first available port.


mapType

public void mapType(javax.xml.namespace.QName xmlType,
                    java.lang.Class javaType)
             throws WSIFException
Inform WSIF that a particular XML type (referred to in the WSDL) actually maps to a particular Java class. Use this method when there is no schema definition for this type, or when the mapping is sufficiently complicated that WSIF does not understand the schema definition. Calling this method overrides whatever schema is present in the WSDL for this type.


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. This enables WSIF to map schema definitions to real java classes.


setPreferredPort

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


getAvailablePortNames

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


getDefinition

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


getContext

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


setContext

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