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

Regression 1.5.x -> 1.6.x, generated jaxbri Transaction processor is incompatible with client code, wrong top level element name used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.7.0
    • codegen
    • None
    • Windows, Sun jdk 1.6.0_24, Axis 1.6.1

    Description

      Following command generates TransactionProcessorMessageReceiverInOut which is incompatible with client.

      wsdl2java.bat -u -d jaxbri -sp -ss -p com.example.jaxb.soap -ns2p urn:schemas-example-com:transaction-data-1.33=com.example.
      jaxb.soap.mo -o src-generated -uri Transaction_1.33.wsdl

      Client code generated with command

      wsdl2java.bat -u -d adb -sp -o src-generated -uri Transaction_1.33.wsdl

      Now when calling generated service through TransactionProcessorStub.runTransaction reply body has top level element name runTransaction and not replyMessage.

      root cause is this line in the generated invokeBusinessLogic method

      envelope = toEnvelope(getSOAPFactory(msgContext), replyMessage1, false, new javax.xml.namespace.QName("urn:schemas-example-com:transaction-data:TransactionProcessor",
      "runTransaction"));

      Generated code works ok when I changed it to use same names as generated toOM(ReplyMessage, boolean). This old toOM is generated the same way both in 1.5 and 1.6 but in 1.6 it is dead code (private method which is not called at all).

      envelope = toEnvelope(getSOAPFactory(msgContext), replyMessage1, false, new javax.xml.namespace.QName("urn:schemas-example-com:transaction-data-1.33",
      "replyMessage"));

      Attachments

        1. Transaction_1.33.wsdl
          2 kB
          Mika Vesterholm
        2. Transaction_1.33.xsd
          1 kB
          Mika Vesterholm

        Issue Links

          Activity

            People

              veithen Andreas Veithen
              mikaves Mika Vesterholm
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: