...then you simply tell the system where the WSDL is located, choose a client style and you're done.
NetBeans prepares a reference to each operation that you can simply drag wherever you need it: NetBeans will create a skeleton for you to customize.
I have just received the happy assignment of documenting all the tests for a system we're realizing on the IBM i5 platform using RPGLE. The project started with more than 600 pages of detailed requirements we delivered more than one year ago, without a single line of code. Now it looks like the customer has decided that we should start developing (at last!), and I wanted (and I still want) to avoid rewriting the Ulysses, as nobody is probably going to read it (probably the same fate shared by our detailed requirements, even if they were actually very good).
Luckily the system must expose all its features via web services, and we must also integrate them in a Java web application, so I thought "well, I have to prepare a facade and test it anyway, why don't I write some fixtures and document the system with Fit tables?"
After some debates with non technical managers, who often prefer a sound ream of paper, I convinced them of the advantages of my solution, then I started working right on it:
- deploy a new instance of FitNesse (copy and launch would be closer)
- create a simple test table
- create a new project in NetBeans for the facade
- create a new web service client
- create a new class that uses the web service
- create a new project in NetBeans for the fixtures
- add the reference to the facade
- create a new fixtures for the test table
javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/my/path/to/Project/xml-resources/web-service-references/SERVICE_WS/wsdl/22.214.171.124_12345/web/services/SERVICE_WS.wsdl. It failed with: C:\my\path\to\Service\xml-resources\web-service-references\SERVICE_WS\wsdl\126.96.36.199_12345\web\services\SERVICE_WS.wsdl (Impossibile trovare il percorso specificato).
That's strange... we'd already use this reference and jar trick in other projects and it worked perfectly well... following tonyx's advice I tried to work out the reference to the wsdl file, directly cabled in one of the NetBeans generated classes. After some experimenting I managed to tell NetBeans to always refer to the online wsdl for classes generation: you simply right-click your reference, select the menu item Edit web service attributes and from the wsimport options you add the option wsdllocation with the URL of the wsdl as a value.
Now my FitNesse instance happily colors my test table! Ops... red cells? the service is not working as expected... well, when do you want to know you have a problem? As soon as possible, which is now. Hey, you there, RPGLE guys... take a look at this! :-)