uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

27.2 Using the catalog functionality (when developing a Web Services client)

Specify a catalog file by using the -catalog option of the cjwsimport command to use the catalog functionality when developing a stub based Web Services client. For details on the -catalog option, see 14.1(2) List of options.

According to the mapping information of a catalog file, the cjwsimport command maps the WSDL specified in an argument and the namespace or the location of an XML schema that this WSDL references, to a different WSDL or XML schema location. The cjwsimport command also scans the WSDL and XML schema in the mapped location and generates a Java code.

Organization of this section
(1) Mapping targets
(2) Notes
(3) Example of mapping

(1) Mapping targets

Table 27-1 lists mapping targets of the catalog functionality in the cjwsimport command and Table 27-2 lists mapping targets in the code generated by a WSDL specified in the arguments of the cjwsimport command.

Table 27-1 Mapping targets in the cjwsimport command

No. Mapping target Supported
1 Location of the WSDL specified in the arguments of the cjwsimport command N

Legend:
N: Not supported.

Table 27-2 Mapping targets in the code generated by a WSDL specified in the arguments of the cjwsimport command

No. Element Attribute Support
1 wsdl:import namespace N
2 location Y
3 xsd:import namespace Y#
4 schemaLocation Y
5 xsd:include schemaLocation Y

Legend:
Y: Supported.
N: Not supported.

#
The namespace attribute is mapped only when the xsd:import element has only the namespace attribute. If the xsd:import element contains both the namespace and schemaLocation attributes, the namespace attribute is not considered a mapping target.

(2) Notes

Do not change the values of the following locations and elements when using the catalog functionality when developing a Web Services client.

Use the -wsdllocation option of the cjwsimport command to change the values of the aforementioned locations or elements. For details, see 14.1 cjwsimport command.

(3) Example of mapping

The following figure shows an example of mapping an XML schema location that a WSDL refers by using the catalog functionality when developing a Web Services client.

Figure 27-1 Example of mapping an XML schema location that a WSDL refers

[Figure]

[Figure]

In this figure, a remote XML schema location is specified in the schemaLocation attribute of the xsd:include element of the WSDL. The figure also shows procedures when the catalog functionality is disabled and enabled.

When the catalog functionality is disabled
The cjwsimport command generates a Java code by reading the remote XML schema.

When the catalog functionality is enabled
As per the information on mapping the catalog file, map the remote XML schema location specified in the schemaLocation attribute of the xsd:include element to a local XML schema location. The cjwsimport command reads the local XML schema and generates a Java code.