
The following method uses the wsimport tool, which is available with JDK 1.6. The procedure above is still valid, but it's coupled with jboss-ws, and adds too many dependencies to your extension.

This is an update to the procedures for consuming web services in a Java extension. Now simply invoke the desired actions of the variable stub, corresponding to the desired web methods.To use the generated stubs, simply create an instance of the class xxSoap, where xx is the name of the webservice.With the build.xml file open, in the right tree (Outline), right click the wsdl2java target, select Run As and them Ant Build.Change xx to the location of the wsdl file (can be an URL).

Next add the following target to the end of the file (after the target all).In the section add the following (this will add the necessary jar files to the classpath):.Add the following property "", where xx is the folder where the jar files reside.Add the following property " ", where xx is the folder where java is instaled.Open the build.xml file in the Eclipse (use the left tree).In addition will add a new target to the build.xml file so we can easily generate the stubs that will call the web service. We need to change the build.xml file to add the libraries to the classpath, so the extension can be correctly compiled. Step 3 - Change the build.xml file of the extension Right-click the J2EE folder in the left tree, select properties, and in the tab Libraries tab, click Add External JARs to add each of the above jar files.Click Edit Source Code J2EE in the Integration Studio Toolbar.Add the necessary actions that will be exposed to the Service Studio.Make sure the Application Server is J2EE or Both.

First open Integration Studio, then create a new extension or open an existing one if you want to change it.They can be found inside the client folder. These files can be located inside the jboss. In order to consume a web service in an extension we'll need some libraries. Change the build.xml file of the extension.This technique is usually needed when trying to use unsupported WSDLs. This posts explains how to consume an external WSDL using a Java extension. You can still try this method if the preferred one is not desirable for any particular reason. The method detailed by Leonardo Fernandes below is prefered. : Edit: this post refers to an outdated approach at importing web references.
