Search code examples
javajaxbjava-metro-frameworkwsimportwsit

Rename all the exception classes who are generated with wsimport


When a generate my code with wsimport using a .net wsdl I've got extreme long exception classes like [servicename][operationname]FaultFaultFaultMessage.

I know how to rename each single exception but can I use a jaxb .xjb file to "template" all the exceptions at once?


Solution

  • You have two options:

    1. Write a plugin for XJC.

    2. Use XSLT or XQuery to generate an .xjb file from the WSDL. You can use more than one .xjb file per xjc invocation.

    Good luck.