4

I've inherited the code base for a Java application which talks to a few SOAP web services. Proxy classes to do this are generated using an ANT task calling wsdl2java. As my Java experience is quite limited, I'm still trying to get my head around exactly how this all works.

There is a build-wsdl2java.xml file in the project that seems to contain the configuration information required for the class generation. The file as it stands currently has attributes that aren't currently supported (namespacesmapfile, overWriteTypes, testcaseoverwrite), but if I attempt to resolve this by changing the first to 'namespacemappingfile' and removing the others, the attributes revert back if the project is cleaned. The URL for the WSDL also reverts back if it is changed.

What controls the generation of this file, and where do I define the configuration parameters that it contains?

Cleggy
  • 715
  • 9
  • 24
  • are you sure that file gets generated? – milan Jan 01 '12 at 20:03
  • Definitely. If I remove it, or change the contents, the file is regenerated. I've found the location for the important bits, but still have one or two kinks to iron out. In particular, I can get the web service proxy classes generated in a test namespace, and copy these over and sucessfully use them. But when the same files are included in a project in another namespace, I'm getting build failures at the wsdl2java stage due to unsupported attributes in build-wsdl2java.xml. – Cleggy Jan 02 '12 at 22:13

2 Answers2

2

Finally found out what was controlling this and, more importantly, have got things compiling again. I'm using JBuilder 2008 (an Eclipse based Java IDE from Embarcadero Technologies), and it would appear the client proxy classes were generated from the WSDL by using JBuilders built in support for this, which is effectively a wrapper for wsdl2java as mentioned by Noergaarde.

In order to set settings such as the URL for the WSDL, I had to switch to the Modeling perspective, and use the Model Navigator to change the URL, by selecting the class under the Web Service Client node and using the Properties view.

Cleggy
  • 715
  • 9
  • 24
1

When you do a build of your project, does the timestamp of build-wsdl2java.xml change? ie. is this file generated by the build in another ant file?

At any rate, it certainly sounds like your client stubs are generated using AXIS.

http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL

Noergaarde
  • 21
  • 1