OSCI2-StarterKit


eu.osci.helper
Class EndpointLocator

java.lang.Object
  extended by eu.osci.helper.EndpointLocator

public class EndpointLocator
extends java.lang.Object

This class helps to find the right service and port for the communication. It offers all the typeOfBusinessScenarios of a WSDL and helps to find the associated port and service.
Copyright © 2010 Freie Hansestadt Bremen.
Created by bremen online services Entwicklungs- und Betriebsgesellschaft mbH & Co. KG.
This library (Starter Kit) can be used by anybody according to the Bremer Lizenz für freie Softwarebibliotheken. The license terms can be viewed at www.osci.de or can be ordered at the OSCI-Leitstelle (Die Senatorin für Finanzen, Freie Hansestadt Bremen, Postfach 10 15 40, 28015 Bremen).


Constructor Summary
EndpointLocator(java.io.File wsdl)
          Constructor with a given File to parse a WSDL.
EndpointLocator(java.io.InputStream wsdlStream)
          Constructor with given InputStream to parse a WSDL.
EndpointLocator(java.net.URL wsdl)
          Constructor with given URL to parse a WSDL.
 
Method Summary
 javax.xml.namespace.QName getPortForTypeOfBusinessScenario(java.lang.String typeOfBusinessScenario)
          Finds the QName of the port that includes the associated TypeOfBusinessScenario.
 javax.xml.namespace.QName[] getPortList()
          Returns all port names of the registered WSDL file.
 java.lang.String getPortName()
          Returns the used port name.
 javax.xml.namespace.QName getServiceForTypeOfBusinessScenario(java.lang.String typeOfBusinessScenario)
          Finds the QName of the service that includes the associated TypeOfBusinessScenario.
 javax.xml.namespace.QName[] getServiceList()
          Returns all service names of the registered WSDL file.
 java.lang.String getTypeOfBusinessScenario()
          Returns the registered TypeOfBusinessScenario name.
 java.lang.String[] getTypeOfBusinessScenarioList()
          Returns all TypeOfBusinessScenario names of the registered WSDL file.
 java.net.URL getWsdlFile()
          Returns the URL of the registered WSDL file.
 void usePort(java.lang.String portName)
          Sets the given port name as selected.
 void useTypeOfBusinessScenario(java.lang.String _typeOfBusinessScenario)
          Sets the given TypeOfBusinessScenario name as selected.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointLocator

public EndpointLocator(java.io.InputStream wsdlStream)
                throws org.xml.sax.SAXException,
                       java.io.IOException
Constructor with given InputStream to parse a WSDL.

Parameters:
wsdlStream - The WSDL InputStream.
Throws:
org.xml.sax.SAXException - In case of parsing errors.
java.io.IOException - In case of IO errors.

EndpointLocator

public EndpointLocator(java.net.URL wsdl)
                throws org.xml.sax.SAXException,
                       java.io.IOException
Constructor with given URL to parse a WSDL.

Parameters:
wsdl - The URL of a WSDL .
Throws:
org.xml.sax.SAXException - In case of parsing errors.
java.io.IOException - In case of IO errors.

EndpointLocator

public EndpointLocator(java.io.File wsdl)
                throws org.xml.sax.SAXException,
                       java.io.IOException
Constructor with a given File to parse a WSDL.

Parameters:
wsdl - The File object of a WSDL.
Throws:
org.xml.sax.SAXException - In case of parsing errors.
java.io.IOException - In case of IO errors.
Method Detail

getServiceForTypeOfBusinessScenario

public javax.xml.namespace.QName getServiceForTypeOfBusinessScenario(java.lang.String typeOfBusinessScenario)
Finds the QName of the service that includes the associated TypeOfBusinessScenario.

Parameters:
typeOfBusinessScenario - The TypeOfBusinessScenario to search for.
Returns:
The found QName of the service or null if there is no endpoint with the given TypeOfBusinessScenario.

getPortForTypeOfBusinessScenario

public javax.xml.namespace.QName getPortForTypeOfBusinessScenario(java.lang.String typeOfBusinessScenario)
Finds the QName of the port that includes the associated TypeOfBusinessScenario.

Parameters:
typeOfBusinessScenario - The TypeOfBusinessScenario to search for.
Returns:
The found QName of the port or null if there is no endpoint with the given TypeOfBusinessScenario.

getServiceList

public javax.xml.namespace.QName[] getServiceList()
Returns all service names of the registered WSDL file.

Returns:
A list or all service QNames.

getPortList

public javax.xml.namespace.QName[] getPortList()
Returns all port names of the registered WSDL file.

Returns:
A list or all port QNames.

getTypeOfBusinessScenarioList

public java.lang.String[] getTypeOfBusinessScenarioList()
Returns all TypeOfBusinessScenario names of the registered WSDL file.

Returns:
A list or all TypeOfBusinessScenario names.

useTypeOfBusinessScenario

public void useTypeOfBusinessScenario(java.lang.String _typeOfBusinessScenario)
Sets the given TypeOfBusinessScenario name as selected.

Parameters:
_typeOfBusinessScenario - The TypeOfBusinessScenario name to set.

usePort

public void usePort(java.lang.String portName)
             throws java.io.IOException
Sets the given port name as selected.

Parameters:
portName - The port name that will be used.
Throws:
java.io.IOException

getPortName

public java.lang.String getPortName()
Returns the used port name.


getWsdlFile

public java.net.URL getWsdlFile()
Returns the URL of the registered WSDL file.


getTypeOfBusinessScenario

public java.lang.String getTypeOfBusinessScenario()
Returns the registered TypeOfBusinessScenario name.


OSCI2-StarterKit


Copyright © 2010 Freie Hansestadt Bremen.