# Interfacing External Web Services with JBoss.net

One of the promises of web services is to deliver the means of new types of globally networked applications such as the web itself has been able to provide for globally networked documents. Hence, it can be quite useful to to interface existing web services out there, such as the ones listed under xmethods.org and the well-known Google WS-APIs, from within your POJOs, MBeans or EJBeans.

JBoss.net provides the means to "deploy" references to external web services into your application servers JNDI tree from which they are accessible according to the JAX-RPC specification. For this purpose, you usually first obtain the WSDL description of the target services via your browser application or a remote XML-registry. From the WSDL file, you can then generate JAX-RPC compatible factory and stub classes using the WSDL4J tool.

Finally, you package the compiled classes into your WSR file together with a web-service.xml descriptor containing the special "ext-service" tag. This is an element that is specific to jboss.net in order to bind your given javax.xml.rpc.Service subclasses under the given name into JNDI.

Here is an example web service descriptor that demonstrates the deployment of remote Google and Babelfish services. You can also have a look at the jboss.net testsuite.

Often, it is necessary to tunnel through your firewall with such outgoing calls. Remember to set the -Dhttp.proxyHost -Dhttp.proxyPort -Dhttp.proxyUser and -Dhttp.proxyPassword in the jboss startup file for that purpose. If you need https for ingoing or outgoing traffic, be sure that you setup that transport in your web container as well as the jboss.net configuration located in `jboss-net.sar/axis-config.xml`.

"Dr. Schorsch" (christoph.jung@jboss.org) - 2001/09/29, Last update on 2003/10/15

All mentioned trademarks on this page are copyright of their respective owners ... like that ...