org.ws4d.java.wsdl
Class WSDLRepository

java.lang.Object
  extended by org.ws4d.java.wsdl.WSDLRepository

public class WSDLRepository
extends java.lang.Object

This class implements the WSDL Manager for handling predefined WSDLs in a so called WSDL Repository.


Field Summary
static boolean DEMO_MODE
           
 
Method Summary
 void clear()
          Removes the entire content of the WSDL repository.
 void delete(QName portType)
           
static WSDLRepository getInstance()
           
 Iterator getPortTypes()
           
static java.lang.String getRepoPath()
           
 Schema getSchema(java.lang.String schemaLocation, java.lang.String namespace)
           
 WSDL getWsdl(QName portType)
           
 WSDL getWSDL(java.lang.String fileName)
           
 java.io.InputStream getWsdlInputStream(QName portType)
           
 WSDL loadAndStore(java.io.InputStream in, java.lang.String fileName)
           
 WSDL loadAndStore(URI wsdlUri)
           
 WSDL loadAndStore(URI fromUri, java.lang.String fileName)
           
static WSDL loadWsdl(URI wsdlUri)
           
 void store(URI fromLocation, java.lang.String fileName)
          Imports a WSDL including any referenced WSDL and XML Schema files from the specified location fromLocation.
 void store(WSDL wsdl, java.lang.String fileName)
           
 void storeSchema(URI fromLocation, java.lang.String fileName)
          Imports an XML Schema including any referenced XML Schema files from the specified location fromLocation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEMO_MODE

public static final boolean DEMO_MODE
See Also:
Constant Field Values
Method Detail

getRepoPath

public static java.lang.String getRepoPath()

getInstance

public static WSDLRepository getInstance()

loadWsdl

public static WSDL loadWsdl(URI wsdlUri)
                     throws java.io.IOException
Throws:
java.io.IOException

getWsdlInputStream

public java.io.InputStream getWsdlInputStream(QName portType)

getWsdl

public WSDL getWsdl(QName portType)

getSchema

public Schema getSchema(java.lang.String schemaLocation,
                        java.lang.String namespace)

getPortTypes

public Iterator getPortTypes()

loadAndStore

public WSDL loadAndStore(URI fromUri,
                         java.lang.String fileName)
                  throws java.io.IOException
Throws:
java.io.IOException

loadAndStore

public WSDL loadAndStore(java.io.InputStream in,
                         java.lang.String fileName)
                  throws java.io.IOException
Throws:
java.io.IOException

loadAndStore

public WSDL loadAndStore(URI wsdlUri)
                  throws java.io.IOException
Throws:
java.io.IOException

store

public void store(WSDL wsdl,
                  java.lang.String fileName)

store

public void store(URI fromLocation,
                  java.lang.String fileName)
           throws java.io.IOException
Imports a WSDL including any referenced WSDL and XML Schema files from the specified location fromLocation. If fileName is neither null nor equal to the empty String "", the WSDL will be stored within the repository to a file with that name. Otherwise, if it is null, a file name will be derived from the URI the WSDL is loaded from (fromLocation). Finally, if fileName is equal to the empty String, the WSDL file will be searched for its target namespace and a file name will be derived there from.

Parameters:
fromLocation - the location to load the file from
fileName - the name of the file to store the imported WSDL to within the repository; may be null or the empty String
Throws:
java.io.IOException - if either accessing the WSDL or any of the files it references or writing into the repository fails

storeSchema

public void storeSchema(URI fromLocation,
                        java.lang.String fileName)
                 throws java.io.IOException
Imports an XML Schema including any referenced XML Schema files from the specified location fromLocation. If fileName is neither null nor equal to the empty String "", the schema will be stored within the repository to a file with that name. Otherwise, if it is null, a file name will be derived from the URI the schema is loaded from (fromLocation). Finally, if fileName is equal to the empty String, the schema file will be searched for its target namespace and a file name will be derived there from.

Parameters:
fromLocation - the location to load the file from
fileName - the name of the file to store the imported schema to within the repository; may be null or the empty String
Throws:
java.io.IOException - if either accessing the schema or any of the files it references or writing into the repository fails

getWSDL

public WSDL getWSDL(java.lang.String fileName)

delete

public void delete(QName portType)

clear

public void clear()
Removes the entire content of the WSDL repository.