70 lines
3.8 KiB
HTML
70 lines
3.8 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 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><!-- Java binding -->
|
|
<binding .... >
|
|
<java:binding />
|
|
<format:typeMapping style="Java" encoding="Java"/><em>?</em>
|
|
<format:typeMap name="qname" formatType="nmtoken"/><em>*</em>
|
|
</format:typeMapping>
|
|
<operation><em>*</em>
|
|
<java:operation
|
|
methodName="nmtoken"
|
|
parameterOrder="nmtoken"
|
|
returnPart="nmtoken"<em>?</em>
|
|
methodType="instance|constructor" />
|
|
<input name="nmtoken"<em>?</em> /><em>?</em>
|
|
<output name="nmtoken"<em>?</em> /><em>?</em>
|
|
<fault name="nmtoken"<em>?</em> /><em>?</em>
|
|
</operation>
|
|
</binding></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><service ... >
|
|
<port>*
|
|
<java:address
|
|
className="nmtoken"/>
|
|
</port>
|
|
</service></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>
|