Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-02


oracle.webservices.model
Class Factory

java.lang.Object
  extended by oracle.webservices.model.Factory


public abstract class Factory
extends Object

Abstract interface for model factories. A default implementation is provide by the newInstance method.


Constructor Summary
Factory()
           

 

Method Summary
abstract  Model createModel(QName name)
          Creates an empty model for a service with the unique name.
abstract  Serializer getSerializer(QName name)
          Returns the serializer (if any) registered for the provided extension type.
abstract  Model loadModel(Definition definition, QName service)
          Loads a model for the given service from the given WSDL definition.
abstract  Model loadModel(Element model)
          Loads a model from a DOM element created using the storeModel method.
abstract  Model loadModel(URL wsdlUrl, QName service)
          Loads a model of the indicated service from a WSDL specified by the wsdlUrl
static Factory newInstance()
          This method can be used to create a default implementation of a model factory.
abstract  void registerSerializer(Serializer serializer)
          Adds a serializer to the model's serializer registry.
abstract  Element storeModel(Model model, Document document)
          Serializes the model to a DOM element.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Factory

public Factory()

Method Detail

newInstance

public static Factory newInstance()
                           throws ClassNotFoundException,
                                  IllegalAccessException,
                                  InstantiationException
This method can be used to create a default implementation of a model factory. A new instance of the default model factory is created for each request.
Returns:
The default implementation of the model factory.
Throws:
ClassNotFoundException - If the default factory implementation cannot be loaded.
IllegalAccessException - If a security check prevents the default factory implementation cannot be loaded.
InstantiationException - If the default factory implementation cannot be instantiated.

registerSerializer

public abstract void registerSerializer(Serializer serializer)
Adds a serializer to the model's serializer registry. This serializer will replace any existing serializers previously registered with identical extension type names.
Parameters:
serializer - The serializer to register.

getSerializer

public abstract Serializer getSerializer(QName name)
Returns the serializer (if any) registered for the provided extension type.
Parameters:
name - The extension type name to query the serializer registry.
Returns:
The serializer registered with this extension type name. May return null.

createModel

public abstract Model createModel(QName name)
Creates an empty model for a service with the unique name.
Parameters:
name - The unique qualified name of the service.
Returns:
An empty model.

loadModel

public abstract Model loadModel(Definition definition,
                                QName service)
Loads a model for the given service from the given WSDL definition.
Parameters:
definition - The WSDL definition from which to load the model.
service - The unique service within the WSDL to model.
Returns:
A model of the service.

loadModel

public abstract Model loadModel(URL wsdlUrl,
                                QName service)
                         throws WSDLException
Loads a model of the indicated service from a WSDL specified by the wsdlUrl
Parameters:
wsdlUrl - The URL for a WSDL from which to load the service's model.
service - The QName of the service to model within the WSDL.
Returns:
A model of the service.
Throws:
WSDLException - If the WSDL cannot be retrieved or parsed.

loadModel

public abstract Model loadModel(Element model)
                         throws SerializationException
Loads a model from a DOM element created using the storeModel method.
Parameters:
model - The root element of the serialized model.
Returns:
A model created by deserializing the model element.
Throws:
SerializationException - If the model cannot be deserialized from the element.

storeModel

public abstract Element storeModel(Model model,
                                   Document document)
                            throws SerializationException
Serializes the model to a DOM element.
Parameters:
model - The model to serialize.
document - The document from which DOM elements will be created.
Returns:
The root element of the serialized model.
Throws:
SerializationException - If the model cannot be serialized.

Skip navigation links

Copyright © 2006, 2009 Oracle. All Rights Reserved.