Extension SDK

oracle.jdeveloper.webservices
Class StubSkelModel

java.lang.Object
  extended byoracle.jdeveloper.webservices.StubSkelModel

public final class StubSkelModel
extends java.lang.Object

This class provides a public API for generating web service stubs and skeletons.

The most simple use case is to create a new stub, based on an existing WSDL document. To do this, instantiate the StubSkelModel as follows:

StubSkelModel model = new StubSkelModel(wsdlDoc);

where wsdlDoc is the URL of the WSDL document from which to generate the stub. All of the properties (available on the Stub/Skeleton wizard) will initially be defaulted to the values described in the accessor methods on this class. These default values may be overwritten using the accessors.

When you are ready to create the stub, call commit() on the StubSkelModel. Calling:

model.commit(false);

will result in generation occurring without any UI interaction. Alternatively, you can call:

model.commit(true);

and the stub/skeleton wizard will be invoked, to allow UI interaction before completion.


Constructor Summary
StubSkelModel(java.net.URL wsdlDoc)
          Create a StubSkelModel.
 
Method Summary
 void commit(boolean showUI)
          Commit changes to the model and generates stubs/skeletons.
static void generateEmbeddedStub(oracle.jdevimpl.webservices.ide.WebServicesContainer wsCont)
          Generate a stub for use against a web service (described by the given WebServicesContainer) running on the embedded OC4J server.
 java.lang.String getDefaultPackage()
          Get the default package into which stubs, skeletons and beans will be generated.
 StubSkelArtifact[] getGeneratedArtifacts()
          Get the artifacts generated by the stub/skeleton wizard.
 java.net.URL getWSDLFileLocation()
          Get the location of the WSDL file which this StubSkelModel is based on.
 boolean isGenAuthCode()
          Is basic HTTP authentication code generation selected?
 boolean isGenMainMethod()
          Is main method generation selected?
 boolean isGenSkeletons()
          Is skeleton generation selected?
 boolean isGenStubs()
          Is stub generation selected?
 boolean isImportWSDLFile()
          Is WSDL file import selected?
 void setDefaultPackage(java.lang.String defaultPackage)
          Set the default package into which stubs, skeletons and beans will be generated.
 void setGenAuthCode(boolean genAuthCode)
          Set whether basic HTTP authentication code should be generated into the stub.
 void setGenMainMethod(boolean genMainMethod)
          Set whether a main method (plus stub object instantiation) should be generated into the stub.
 void setGenSkeletons(boolean genSkeletons)
          Set whether to generate skeletons or not.
 void setGenStubs(boolean genStubs)
          Set whether to generate stubs or not.
 void setImportWSDLFile(boolean importWSDLFile)
          Set whether to import the WSDL file using for generation into the navigator as a node.
 void setOpenFiles(boolean openFiles)
          Set whether you want the web services log window to appear, and the generated files to be opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubSkelModel

public StubSkelModel(java.net.URL wsdlDoc)
Create a StubSkelModel. Only the URL of the WSDL file needs to be specified. The rest of the properties are initially defaulted, but may be set using the accessors.

Method Detail

getWSDLFileLocation

public java.net.URL getWSDLFileLocation()
Get the location of the WSDL file which this StubSkelModel is based on. This cannot be changed since it acts as the unique identifier for the model.


setGenAuthCode

public void setGenAuthCode(boolean genAuthCode)
Set whether basic HTTP authentication code should be generated into the stub. The default is false.


isGenAuthCode

public boolean isGenAuthCode()
Is basic HTTP authentication code generation selected?


setGenStubs

public void setGenStubs(boolean genStubs)
Set whether to generate stubs or not. The default is true.


isGenStubs

public boolean isGenStubs()
Is stub generation selected?


setGenSkeletons

public void setGenSkeletons(boolean genSkeletons)
Set whether to generate skeletons or not. The default is false.


isGenSkeletons

public boolean isGenSkeletons()
Is skeleton generation selected?


setGenMainMethod

public void setGenMainMethod(boolean genMainMethod)
Set whether a main method (plus stub object instantiation) should be generated into the stub. The default is false.


isGenMainMethod

public boolean isGenMainMethod()
Is main method generation selected?


setImportWSDLFile

public void setImportWSDLFile(boolean importWSDLFile)
Set whether to import the WSDL file using for generation into the navigator as a node. The default is false.


isImportWSDLFile

public boolean isImportWSDLFile()
Is WSDL file import selected?


setDefaultPackage

public void setDefaultPackage(java.lang.String defaultPackage)
Set the default package into which stubs, skeletons and beans will be generated.


getDefaultPackage

public java.lang.String getDefaultPackage()
Get the default package into which stubs, skeletons and beans will be generated.


setOpenFiles

public void setOpenFiles(boolean openFiles)
Set whether you want the web services log window to appear, and the generated files to be opened. The default is true, although it will always be false when commit is called with showUI set to false.


getGeneratedArtifacts

public StubSkelArtifact[] getGeneratedArtifacts()
Get the artifacts generated by the stub/skeleton wizard. If commit() has not been called this method will return null. Each StubSkelArtifact object specifies the class name and type of the generated artifact. Artifacts can be of type STUB, SKELETON or BEAN.


generateEmbeddedStub

public static void generateEmbeddedStub(oracle.jdevimpl.webservices.ide.WebServicesContainer wsCont)
Generate a stub for use against a web service (described by the given WebServicesContainer) running on the embedded OC4J server.


commit

public void commit(boolean showUI)
            throws java.lang.Exception
Commit changes to the model and generates stubs/skeletons.

Throws:
java.lang.Exception

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.