Changing the JAX-RPC Web Service Client Type
See Also
For JAX-RPC web services (J2EE 1.4 specification),
two types of web service client can be created in the Web Service Client wizard:
- J2EE Container-generated static stub.
This type is based on JSR-109, which enhances JSR-101 by defining the packaging
of web services into standard J2EE modules, including a new deployment descriptor,
and defining web services that are implemented as session beans or servlets.
This is the recommended and portable (via J2EE 1.4 specification) type.
When you choose this type, the IDE adds deployment information in the
deployment descriptors and the container generates the stub and other artifacts.
- IDE-generated static stub.
This type is based on JSR-101, which defines the mapping of WSDL to Java and vice versa.
It also defines a client API to invoke a remote web service and a runtime environment
on the server to host a web service. This type is not portable.
When you choose this type, the IDE generates
the stub and other
artifacts, packages them in the archive, and deploys them.
- If a web service is consumed in a Java application, no J2EE server
is used. The application runs as a stand-alone JVM process and its
JVM parameters are set per project. Therefore, the J2EE Container-generated
static stub does not apply to Java applications and is not made available in the Client Type
drop-down.
After you create a web service client, you may need to change the type. For example,
maybe you created the client to deploy it to the Sun Java System Application Server
and now you want to deploy it to the Tomcat Web Server. Since the Tomcat Web Server
is not a J2EE container, you may need to change the client type from J2EE Container-generated static stub
to IDE-generated static stub.
To change the web service client type:
- In project.xml, change jsr-109_client to jaxrpc_static_client.
- Close and reopen the project. This regenerates build-impl.xml, using the changed project.xml.
- Clean and build the project. During the build, the changed build-impl.xml causes the build to create stubs.
- Delete the operation(s) that the IDE created for you and
recreate it/them (Web Service Client Resources > Call Web Service
Operation).
In the Files window, look in the build folder and then find the client's package. The client's
package should now contain more files than before. The additional files are the client stubs that the
IDE generated in the steps above.
- See Also
- About Web Services
Legal Notices