Use the Java provider
The WSIF Java Provider allows WSIF to invoke Java classes and JavaBeans. This means that in a thin-client environment, such as a JVM, you can define shortcuts to local Java code.
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.
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.
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.
The Java provider is not transactional.
The Java provider - writing the WSDL extension
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:
Note: For legal information about this code example, see the Code example disclaimer.
<!-- 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>where ? means optional and * means 0 or more.
Notes:
- The format:typeMap name attribute is a qualified name of a simple or complex type used by one of the Java operations.
- The format:typeMap formatType attribute is the fully qualified Class name for the Java Class that the element specified by name maps to.
- The java:operation methodName attribute is the name of the method on the Java object that is called by the operation.
- 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.
- 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.
<service ... > <port>* <java:address className="nmtoken"/> </port> </service>Note: The java:address className attribute specifies the fully qualified class name of the object containing the method to invoke.