Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invalid Element in SOAP Response

843833Jun 11 2007
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 9 2007
Added on Jun 11 2007
0 comments
512 views