To set any of the Web services preferences, follow
these steps:
- Click Window > Preferences to open the Preferences
notebook.
- Expand Web services or Web and XML,
and click the preference category that you want to set
- Select the check boxes that you want to set as the default when creating
your Web service.
- Click OK to apply the changes and close the Preferences
notebook.
If you require more information on any of the options, select the option
and press F1.Web services tools enable you
to define the following preferences:
- Axis Emitter
- This page allows you to set the following preferences used when creating
or consuming Axis Web services.
- WSDL2Java
- Generate code for all elements: By default, WSDL2Java only generates code
for those elements in the WSDL file that are referenced. For additional information
regarding how referencing works refer to the Axis reference guide:
- Emits separate Helper classes for metadata: If you select this option
WSDL2Java will create a separate helper class that contains the metadata rather
than including it in the skeleton.
- Prefers building beans to straight arrays for wrapped XML array types:
The default behavior is to map this XML construct: <element name="array">
<complexType>
<sequence>
<element name="item" type="xs:string"/>
</sequence>
</complexType>
</element>to a Java String array (String[]). If you would rather
a specific JavaBean class (ArrayOfString) be generated for these types of
schemas, select this option.
- Add scope to deploy.wsdd: This indicates how to deploy the server implementation.
Application uses one instance of the implementation class for all requests.
Request creates a new instance of the implementation class for each request.
Session creates a new instance of the implementation class for each session.
- Timeout in seconds: The default is 45. Use -1 to disable the timeout.
- Java2WSDL
- Look for allowed methods in inherited class: If this option is specified,
the Java2WSDL parser will look into extended classes to determine the list
of methods to export into the WSDL file.
- Analyze the service class for compliance to JAX-RPC before generating
code: If selected, the tools will examine the Java service class and its value
types to determine if it satisfies important requirements of the JAX-RPC specification.
- Profile Compliance and Validation
- The WS-I Compliance preferences allow you to select your level of compliance
with the WS-I Simple SOAP Binding Profile (SSBP) and WS-I Attachement Profile
(AP). Note: if you change the level of WS-I compliance while WS-I incompliances
are listed in the Task view, the Task view will not be automatically updated.
The workspace must be revalidated before the warnings will be removed from
the Task view. For more information on WS-I, refer to:
- For validation preferences, you can choose whether or not WSDL files consumed
by the Web services wizards are validated, and whether or not the WSDL validation
must complete before the wizard will move to the next step.
- Project Topology
- The Project Topology preferences allow you to:
- Select the default client project type that the Web services wizards will
create when generating a Web service client. You can also set the order in
which the client project types will be listed in the wizard. Note that this
selection is simply a default and an alternate project type can be selected
in the wizard.
- Select whether you want to generate the Web service and the Web service
client in the same EAR project or different EAR projects. Generating the service
and client into different EAR projects can reduce the chance of conflicts
that occur when both exist in a single EAR project, but uses more system resources.
- Resource Management
- The Resource Management preferences enable you to determine the file and
folder creation and overwriting defaults that you want to use when creating
your Web service.
- Overwrite files without warning: selecting this will allow the wizards
to overwrite any existing files in the workspace without prompting. If it
is not selected you will be prompted each time a file needs to be overwritten.
- Create folders when necessary: selecting this enables the wizards to create
any required folders.
- Check out files without warning: select to check out files without receiving
a warning message asking for confirmation.
- Merge generated skeleton file: this check box is disabled by default.
If this check box is enabled, when a skeleton file of the same name already
exists in the workspace, the newly generated skeleton file will merge with
the existing skeleton file. Enable this to preserve code that you have already
modified in the existing skeleton files.
Note that when this preference
is enabled, if you change the return type of an interface, the resulting skeleton
file will have a method returning the type as defined in the new interface
but would have a method body from the original skeleton file (which would
be returning a different type). This will result in an compilation error
that the you will have to correct manually.
- Scenario Defaults
- The Scenario Defaults preferences enable you to set the following scenario
defaults that you want to use when creating your Web service:
- which type of Web service and client you want to be selected by default.
- which phases of the Web service lifecycle you want to complete in the
wizard.
- if you want the Web Services Explorer to launch by default so that you
can publish your Web service to a UDDI registry.
- if you want the Web service SOAP traffic routed through a TCP/IP monitor
so that you can monitor the SOAP packets and optionally test them for WS-I
compliance.
Note that all these defaults can be overridden in the wizard.
- Server and Runtime
- Select the server, Web service run-time environment, and J2EE version
that you want selected by default in the Web services wizard. Note that all
these defaults can be overridden in the wizard.
- Test Facility Defaults
- can select whether to have the wizard automatically launch a test facility,
and you can select your preferred type of test facility
- WSDL files
- When creating a WSDL file in the WSDL editor, you can set the default
target namespace. If you do not select to change the default, your WSDL file
will have http://tempuri.org as its target namespace.