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

Assumption that message label and message direction are synonymous


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: codegen
    • Labels:


      It looks like there's an assumption that message label and message direction will always be synonymous.

      I've been trying to create an Axis2 code generation template that would use the value of a message's "messageLabel" attribute in a WSDL2 document. Unfortunately, that value doesn't appear in the Document created by the AxisServiceBasedMultiLanguageEmitter. I looked into this a bit and found that the actual value of the message label is lost in sub-class implementations of the abstract AxisOperation method
      addMessage(AxisMessage, String)
      called by WSDL20ToAxisServiceBuilder.createAxisMessage(). WSDL20ToAxisServiceBuilder.populateOperations exhibits the assumption in the for loop that iterates over the InterfaceMessageReferences.

      If I'm reading the WSDL2 spec right, the message exchange pattern defines the label constraints for its messages. So, it seems like the classification should be based on the message reference's getDirection(). While what's there now may work, it won't if a new MEP is defined. I think getDirection() should work regardless.

      WSDL2's ability to accommodate new MEPs also calls into question Axis2's practice of mapping MEP strings to constant integer values throughout the code. Why not just stick with the MEP strings to support extensibility now?


        1. AxisMessage.patch.txt
          0.8 kB
          Peter Danielsen
        2. AxisServiceBasedMultiLanguageEmitter.patch.txt
          1 kB
          Peter Danielsen
        3. WSDL20ToAxisServiceBuilder.patch.txt
          2 kB
          Peter Danielsen



            • Assignee:
              keithgchapman Keith Godwin Chapman
              pdanielsen Peter Danielsen
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: