Invalid Element in SOAP Response
I am developing a series of web services in Perl for consumption by Java clients that use Apache Axis stubs created via WSDL2Java. The problem I am having is that when we need to add a field to one of the Perl objects for the benefit of one client, the element returned for the new field causes other Java clients to throw and error similar to the following:
org.xml.sax.SAXException: Invalid element in my.package.SomeException - New Element
Now, I realize that this is because the element has not been added to the schema in the WSDL from which the client code was generated. However, why does Axis not just ignore extra elements? Is there a way to force it to ignore unrecognized elements?
Ignoring unknown elements is the default behavior for .NET clients, which makes it very easy to modify the underlying service without breaking clients. Given the behavior of Axis clients, it becomes necessary for every department that depends on our service to roll out changes at the same time. While this may be the "correct" behavior (strictly speaking), it is a design which greatly restricts the flexibility of enterprise service providers.
Any ideas you may have to work around this issue would be greatly appreciated.