ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzamy_5.4.0.1/50/webserv/wswsifprovjv.htm

70 lines
3.8 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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 the Java provider</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h5><A NAME="wswsifprovjv">Use the Java provider</A></h5>
<p>The WSIF Java Provider allows WSIF to invoke Java classes and JavaBeans. This means that in a thin-client environment, such as a Java virtual machine, you can define shortcuts to local Java code.</p>
<p>The WSIF Java Provider is not intended to be used in a J2EE environment. There is a difference between a client that uses the WSIF Java Provider to invoke a Java component and one that implements a Web service as a Java component on the server side.</p>
<p>The Java binding exploits the format binding for type mapping. The format binding allows WSDL to define the mapping between XML Schema types and Java types.</p>
<p>The Java provider requires the targeted Java classes to be in the class path of the client. The Java method is invoked synchronously, in-process, in-thread, with the current thread and ORB contexts.</p>
<p>The Java provider is not transactional. </p>
<p><strong>The Java provider - writing the WSDL extension</strong></p>
<p>The Java provider allows the invocation of a method on a local Java object. To use the Java provider, you require this binding specified in the WSDL:</p>
<p><strong>Note:</strong> For legal information about this code example, see the <a href="../program/codex.htm" target="_">Code example disclaimer</a>.</p>
<pre>&lt;!-- Java binding --&gt;
&lt;binding .... &gt;
&lt;java:binding /&gt;
&lt;format:typeMapping style=&quot;Java&quot; encoding=&quot;Java&quot;/&gt;<em>?</em>
&lt;format:typeMap name=&quot;qname&quot; formatType=&quot;nmtoken&quot;/&gt;<em>*</em>
&lt;/format:typeMapping&gt;
&lt;operation&gt;<em>*</em>
&lt;java:operation
methodName=&quot;nmtoken&quot;
parameterOrder=&quot;nmtoken&quot;
returnPart=&quot;nmtoken&quot;<em>?</em>
methodType=&quot;instance|constructor&quot; /&gt;
&lt;input name=&quot;nmtoken&quot;<em>?</em> /&gt;<em>?</em>
&lt;output name=&quot;nmtoken&quot;<em>?</em> /&gt;<em>?</em>
&lt;fault name=&quot;nmtoken&quot;<em>?</em> /&gt;<em>?</em>
&lt;/operation&gt;
&lt;/binding&gt;</pre>
<p>where <em>?</em> means optional and <em>*</em> means 0 or more.</p>
<p><strong>Notes:</strong> </p>
<ul>
<li>The format:typeMap name attribute is a qualified name of a simple or complex type used by one of the Java operations.</li>
<li>The format:typeMap formatType attribute is the fully qualified Class name for the Java Class that the element specified by name maps to.</li>
<li>The java:operation methodName attribute is the name of the method on the Java object that is called by the operation.</li>
<li>The java:operation parameterOrder attribute contains a whitespace-separated list of part names that define the order in which they are passed to the Java Object's method.</li>
<li>The java:operation methodType attribute must be set to either instance or constructor. The value specifies whether the method being invoked on the object is an instance method or a constructor for the object. </li></ul>
<pre>&lt;service ... &gt;
&lt;port&gt;*
&lt;java:address
className=&quot;nmtoken&quot;/&gt;
&lt;/port&gt;
&lt;/service&gt;</pre>
<p><strong>Note:</strong> The java:address className attribute specifies the fully qualified class name of the object containing the method to invoke.</p>
</body>
</html>