WAS v8.5 > Develop applications > Develop web services - Invocation framework (WSIF) > Use WSIF to invoke web services > Linking a WSIF service to the underlying implementation of the serviceWriting the WSDL extension that lets your WSIF service invoke a method on a local Java object
Using the WSIF Java provider, WSIF can invoke Java code. This means that, in a thin-client environment such as a JVM or Tomcat test runtime environment, we can define shortcuts to local Java programs. Use this procedure to help to write the Web Services Description Language (WSDL) extension that links your WSIF service to a local Java application.
The WSIF Java provider is not intended for use in a Java EE environment. There is a difference between a client using the WSIF Java provider to invoke a Java component, and implementing a web service as a Java component on the server side.
The WSIF Java binding exploits the format binding for type mapping. Using the format binding, your WSDL can define the mapping between XML schema types and Java types.
The WSIFJava provider requires the targeted Java classes to be on the class path of the client. The Java method is invoked synchronously, in-process, in-thread, with the current thread and ORB contexts.
The WSIF Java provider is not transactional.
The WSIF Java provider does not support the WSIF synchronous timeout. The Java provider will not time out waiting for a Java method to complete.
Use the following procedure, and associated code fragments, to help to specify the WSDL extension that enables your WSIF service to invoke a method on a local Java object.
- Specify the Java binding.
To use the Java provider, you need the following binding specified in the WSDL file:
<!-- Java binding --> <binding .... > <java:binding /> <format:typeMapping style="Java" encoding="Java"/>? <format:typeMap name="qname" formatType="nmtoken"/>* </format:typeMapping> <operation>* <java:operation methodName="nmtoken" parameterOrder="nmtoken" returnPart="nmtoken"? methodType="instance|constructor" /> <input name="nmtoken"? />? <output name="nmtoken"? />? <fault name="nmtoken"? />? </operation> </binding>In this example:
- A question mark (?) means optional, and an asterisk (*) means 0 or more.
- The name attribute of the <format:typeMap> element is a qualified name of a simple or complex type used by one of the Java operations.
- The formatType attribute of the <format:typeMap> element is the fully qualified class name for the Java class to which the element specified by name maps.
- The methodName attribute of the <java:operation> element is the name of the method on the Java object that is called by the operation.
- The parameterOrder attribute of the <java:operation> element contains a white space-separated list of part names that define the order in which they are passed to the Java object method.
- The methodType attribute of the <java:operation> element must be set to either instance or constructor. The value specifies whether the method that is invoked on the object is an instance method or a constructor for the object.
- Specify the <java:address> element.
The className attribute of the <java:address> element specifies the fully qualified class name of the object containing the method to invoke:
<service ... > port* <java:address className="nmtoken"/> </port> </service>
Related concepts:
WSIF and WSDL
Related
Linking a WSIF service to a SOAP over HTTP service
Linking a WSIF service to a JMS-provided service
Writing the WSDL extension that lets your WSIF service invoke an enterprise bean
Reference:
WSIFOperation - Synchronous and asynchronous timeouts reference