Wrapping J2EE and JRun Web Services
Accessing a remote web service from a Java application server or JRun 4 is a little more complicated than utilizing a web service from ColdFusion MX or ASP.NET. You need to manually create the proxy for the web service, using some tools that are readily available and preinstalled as part of the JRun 4 installation.
JRun 4 comes with a command-line tool called wsdl2java.exe (located in the Jrun4\bin directory), which is part of the Apache Axis implementation of SOAP. If you are using an alternate J2EE server, you can download the necessary components from http://xml.apache.org/axis. The wsdl2java tool from the Apache web site is a Java .jar file rather than a command-line program. More information on the classes can be found at http://xml.apache.org/axis.
The wsdl2java tool automatically creates most of the Java code necessary to consume the web service from Flash. It transforms a .wsdl file into a Java interface. You can use wsdl2java manually from a command line. To convert the Whois service shown earlier, navigate to the directory containing the wsdl2java.exe file and run it as follows:
wsdl2java -o yourSourceDir http://www.soapclient.com/xml/SQLDataSoap.wsdlUsing the .jar version of wsdl2java, you call it like this:
java org.apache.axis.wsdl.WSDL2Java
http://www.soapclient.com/xml/SQLDataSoap.wsdl -o yourSourceDirIf you are using the wsdl2java.jar file from the Apache site, make sure you include the following classes in your classpath ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access