OK, I got an opportunity to try this out. I need to call a web service that I've developed earlier using the Web Service Provider design element.
First I looked at Axis and noticed that the last release is from 2006.
Then I downloaded Axis2 which is the successor of Axis. I also installed Ant which should generate the Java stubs for me with command "ant generate.client". I tried all "Programmin models" that Web Service Provider supports but always got errors complaining about the WSDL and nothing was generated. I didn't try Axis2 wsdl2java which might have done it.
Next I found
this article by
Stephan Wissel. The generation of Java source with wsdl2java worked fine after adding
-autoNameResolution parameter to command line. I exported the Java classes to a jar file because they are not going to change often. But when I tried to call the web service I got error about
"child element, which is NOT expected". The "Programming model" in my provider was
RPC/Doc/literal. I changed that to
RPC/Wrapped and after that everything seems to work! I'm not really using the Web Service yet but I'm able to call it and return a value.
You need Apache CXF only to generate the Java code based on WSDL (using wsdl2java.bat) because all the Web Service stuff now comes with Java 1.6:
http://www.mkyong.com/webservices/jax-ws/jax-ws-hello-world-example/
There are other tools also for generating the Java but CXF at least is able to generate code that uses these new javax.jws.* classes. Maybe Eclipse would do it even easier (not Designer Eclipse which does not seem to include web service stuff).
I recommend using -p parameter in wsdl2java command line to specify a package for the generated classes. Also note that you need to run Windows command prompt as administrator when running wsdl2java. Otherwise you'll get something like java.io.FileNotFoundException: .\com\microsoft\schemas\_2003\_10\serialization\ObjectFactory.java.
If you get JAXBElement types in parameters, you can use a binding file to get rid of them. But this can cause the data posted to be empty and if so you will need to use JAXBElement types.
And to answer the original question: I don't think you can call a Web Service from the ext-lib REST control.