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

XmlOptions used to serialize a message in a generated Stub are not accessible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.4
    • 1.7.0
    • Tools
    • None
    • Windows XP, Ecplise IDE 3.5

    Description

      I use the Axis2 wsdl2java generator with the following options: -uri MyTest.wsdl -o Test -d xmlbeans -s -u -sn Test_Service -pn Test_Port -ns2p
      In the generated stub the toOM(RequestDocument param) function creates XmlOptions to serialize the message:

      org.apache.xmlbeans.XmlOptions xmlOptions = new org.apache.xmlbeans.XmlOptions();
      param.save(outputStream, xmlOptions.setSaveNoXmlDecl());

      As a consequence XmlOption used while instantiating the param element are not taken into account. In particular if we specify the use of default namespace as follows:

      org.apache.xmlbeans.XmlOptions xmlOptions = new org.apache.xmlbeans.XmlOptions();
      xmlOptions.setUseDefaultNamespace();
      RequestDocument query = RequestDocument .Factory.newInstance(xmlOptions);

      Would it be possible to

      • either keep the XmlOptions as an attribute of the XmlObject (or XmlTokenSource)
      • or provide a method to pass XmlOptions to the client stub for reuse while serializing the messages.

      Attachments

        Activity

          People

            veithen Andreas Veithen
            yguerro Yoann Guerro
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: