Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-3037

'RuntimeException: Unexpected subelement' when wsdl adds a new property


    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.7.0
    • Component/s: codegen
    • Labels:
    • Environment:
      Win2k3, Java 6.0, Axis2 1.2


      I have an client app that was created and had been working, it makes a call to one webservice.
      The webservice was upgraded, it added some new methods and it also added a new property (Type) to one of the return types I was using.
      Now my app will no longer work, i get a runtime error, java.lang.RuntimeException: Unexpected subelement Type, when the results are returned to my service.
      If i rebuilt the client stub code using wsdl2java with the new wsdl my app will work again.

      As I understand it, adding fields to a object should not break any existing code. Any Xml elements returned that are not known elements should be ignored and not cause exceptions in the client code.
      I have tested my assumption with Visual Studio 2005, if i genereate web service client code using the old wsdl I can still call the new service without an exception being thrown because of the new Xml element being returned.

      Is there some option that I don't know of that will allow for new elements to be returned without exceptions being throw?


        1. futures_new.wsdl
          243 kB
          Chris B
        2. futures_old.wsdl
          227 kB
          Chris B
        3. iu.patch
          13 kB
          Vincent Greene
        4. TestRunner.java
          1 kB
          Chris B

          Issue Links



              • Assignee:
                amilachinthaka Amila Chinthaka Suriarachchi
                cbarbara Chris B
              • Votes:
                6 Vote for this issue
                4 Start watching this issue


                • Created: