Before using the Bean2WebService tool, you must set up the Web services command line as follows:
Now, you can use the Bean2WebService tool to create a Web service.
To create a Web service with the Bean2WebService tool, enter the following in the command prompt:
Note: <BeanName> must be the final argument. See The Bean2WebService tool for a list of mandatory and optional arguments.
This is an example of how to use the Bean2WebService tool:
Bean2WebService -host localhost:9080 -cp c:\Working\src -project MyBean com.ibm.wsdk.MyBean
The main output of the Bean2WebService tool is a file called <ProjectName>EAR.ear in the root of the generated directory structure. The WEB-INF directory is also generated under <ProjectName>. This directory holds the generated WSDL file, Java classes, and so on. If you do not specify the -server-side-only argument, a client-side directory that contains some extra Java files, including serializer and deserializer classes for your complex types, will also be created.
Once you have generated an EAR file, you can deploy it to a server to make it available to others.