Invoking service components from Java components

If you want a Java™ component to invoke a component that has a WSDL interface, the Java to WSDL conversion can be generated by the assembly editor.

Note: Everything said below about Java components is also true of standalone references that are backed by Java code, such as a JSP.

When you wire from a Java component to a target component that has a WSDL interface, a reference will be created on the source Java component. During the wiring, you will be asked if you want to generate a Java reference compatible with the target WSDL interface, instead of generating a WSDL reference. By selecting this option, you will be able to generate a Java reference on the source. This Java reference allows you to use static methods rather than dynamic invocation interface (DII) methods to interact with the target service. With this option, two interfaces are generated: synchronous interfaces and asynchronous interfaces. (The asynchronous interfaces will be created after the build run or when you regenerate the implementation.)

You should not modify this generated code. If the WSDL interface is moved, deleted, or changed, the generated interfaces will still exist. You will get an error message if the WSDL interfaces have been changed. To fix the error, you can use the Regenerate Java Interface action on the source reference to regenerate the Java reference code.

If you have already created a WSDL reference on the Java component to access a component that has a WSDL interface, you can use the Convert to Java Reference action to change the source WSDL reference into a Java reference.

The generated Java reference on the source will contain the Java interface. You will be able to open that interface by selecting the reference and right-clicking to select Open Interface. When you generate the implementation for the Java component, it will have a method to locate the referenced service. If the Java implementation has been generated before the new reference has been added, you can use the Synchronize > to implementation action to regenerate the implementation and have the new methods added to it.