ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/webserv/wswsifcomp.htm

41 lines
1.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Use complex types</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h5><A NAME="wswsifcomp">Use complex types</A></h5>
<p>WSIF supports the use of user defined complex types through the mapping of complex types to Java classes. This mapping must be specified by the user. The method to use to create these mappings depends on the provider being used. For the Java provider, the mappings are specified in the wsdl file in the binding element. .</p>
<p>The format:typeMap name attribute is a qualified name of a complex type or simple type used by one of the operations.</p>
<p>The format:typeMap formatType attribute is the fully qualified Class name for the Java Class that the element specified by name maps to.</p>
<p>If using the Apache SOAP provider then the mapping of a complex type to a Java Class is specified in the client code through two methods on the org.apache.wsif.WSIFService interface:</p>
<pre>public void mapType(QName elementType, Class javaType)</pre>
and
<pre>public void mapPackage(String namespaceURI, String packageName)</pre>
<p>The mapType allows you to specify a mapping between a WSDL element and method takes a QName representing the complex type or simple type and the corresponding Java Class it maps to.</p>
<p>The mapPackage method allows you to specify a more general mapping between a namespace and a Java package. Any custom complex or simple types whose namespace matches that of the mapping is mapped to a Java Class in the corresponding package. The name of the actual class is derived from the name of the complex type using standard xml to Java naming conventions.</p>
</body>
</html>