Reputation: 3736
I'm using the apache CFX wsdl2java tool to convert a wsdl into java classes. The general set-up works fine, but I'm having trouble with this command:
-p [ wsdl-namespace= ] PackageName
The documentation says:
Specifies zero, or more, package names to use for the generated code. Optionally specifies the WSDL namespace to package name mapping.
However, it only works for a single package for me. The first command below works, the second and the third one doesn't. Did I mess up some syntax?
1) -p namespace1=com.name.webservices http://url-to-my-wsdl.com
2) -p namespace1=com.name.webservices com.name.common http://url-to-my-wsdl.com
3) -p namespace1=com.name.webservices namespaceforcommonobjects=com.name.common http://url-to-my-wsdl.com
In the second example, I'm trying to put everything from namespace1 into package webservices, and all the rest into package common.
In the third example I'm trying to put everything from namespace1 into package webservices, and everything from namespaceforcommonbojects into package common.
I keep getting an exception in my console saying: "Unexpacted argument" and then the url to my wsld, except in example 1, which works fine but does not hve the output I desire...).
Upvotes: 0
Views: 964
Reputation: 279
You need to add -p switch before each namespace to package mapping.
-p namespace1=com.name.webservices -p namespaceforcommonobjects=com.name.common http://url-to-my-wsdl.com
Upvotes: 1