We have an Axis2 client reading from a SOAP web service; an issue occurred when new client stub classes were generated using WSDL2JAVA and their packages were renamed. The generation tool itself isn't causing the issue, but WSDL2JAVA isn't renaming packages for all classes, so i'm having to do this myself.
Any idea about the best way to rename packages for these classes, without having issues? Such as doing a String replacement in a smart way ?
The web service throws business exceptions in some cases, and they are caught directly by the calling code, however this is not happening anymore and instead of SPECIALException, the client now catches AxisFault.
You can see the XML response below:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Exception message, due to business error.</faultstring>
<detail>
<ns2:SPECIALException
xmlns:ns2="http://com.bla.com/common/exception/xsd/2008/08">
<ns2:code>7</ns2:code>
<ns2:message>Exception message, due to business error.</ns2:message>
</ns2:SPECIALException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Checking this in more detail, the difference are probably due to method populateFaults in the generated BlaServiceStub class, where class names are set as Strings for later use through reflection.