Java Reference
In-Depth Information
<xs:complexType name="CreateUserResponse">
<xs:element name="userId" type="xs:integer"/>
In addition to the UserDTO , the schema includes a CreateUserResponse . The re-
sponse is used to communicate the ID of the new user back to the client for subsequent web
service invocations.
Now that the schema is created, you use the JAXB generator tool provided by the JDK to
turn the schema into real Java objects:
xjc -d <base directory> /ActionBazaar-ejb/src/main/java/ -p UserDTO.xsd
After the real Java objects are created, you can turn your attention to the WSDL of the
web service. The WSDL file is shown in listing 8.4 . The WSDL file should be placed
in META-INF/wsdl. Because the WSDL references the UserDTO.xsd file, UserDTO.xsd
should be placed in the same directory. The UserService.wsdl file defines one service,
createUser , which will be implemented in the code.
Search WWH ::

Custom Search