You really don't need to modify wsdl for this. If you use the Eclipse Helios Web Service Client Wizard, in the second step (optional), where you specify the output folder for the generated source, check the box "Define custom mapping for namespace for packaging". Select this field and in the following form you can define your custom package associations.
EDIT 1:
Link to
Official DocumentationEDIT 2:
Wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://mycompany.com/MyService.wsdl" xmlns:scm="http://mycompany.com/MyService.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://mycompany.com/MyService.wsdl"> ...
For a simple wsdl, as shown above, the user mapping will look like this.
http://mycompany.com/MyService.wsdl - com.mycompany.ws.workflow http://mycompany.com/MyService.xsd - com.mycompany.ws.workflow.schema
You can click "Add" and enter the namespace and package names, or you can save the display in the properties file and click "Import" to add it all at once. I prefer the properties file. You should also avoid namespace URLs and other special characters if you intend to use a properties file. Your properties file should look like the one below.
nsmapping.properties
http\://mycompany.com/MyService.wsdl=com.mycompany.ws.workflow http\://mycompany.com/MyService.xsd=com.mycompany.ws.workflow.schema
Excerpt from official documentation.
The contents of the properties file must be in the format namespace = package. You will need to avoid some special characters in the property files. For example, http: // someNamespace = somePackage should be http: // someNamespace = somePackage. Otherwise, the colon (:) will be considered as a separator, which will lead to an attempt to match http with // someNamespace = somePackage.
source share