Adding prefix for all package names while using wsimport ant task

1.9k views Asked by At

I am using wsimport ant task to generate client codes. As known, the package names of auto-generated classes are determined according to the namespaces located in WSDL.
I want to change these package names and add prefix for package names. For example, if namespace in wsdl is com.example, then the package "prefix.com.example" will be generated.

I tried 2 different solutions to handle this issue; but they coudnt help me.

  1. -p prefix.com.example command used in wsimport ant task doesnt work for me, because all generated classes are included in one package with this command.
  2. jaxws or jaxb binding files work in the same way. If I add this tag <jaxb:package name="prefix.com.example" />, the generated classes are included in one package named prefix.com.example.

I just want to add prefix to all namespaces for package names while generating client codes.
Is there any other solution about this subject?

Thanks in advance.

0

There are 0 answers