Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-9479

msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true"); Does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 6.1.0
    • Web Services
    • None
    • Hide

      There is no work around that we can find and we are blocked.

      Show
      There is no work around that we can find and we are blocked.
    • Hide

      msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true"); <== Put this line in java code
      msg.saveChanges(); <== Put this line in java code
      -Djavax.xml.soap.write-xml-declaration=true <== Put this line as a java option on command line startup.

      We can see that the XML declaration in the message prolog is correct, but by the time the message is actually sent out of JBoss, it goes missing.

      Send SOAP messages to jboss; jboss responds but strips out and does not send xml declaration in the prolog

      <?xml version='1.0' encoding='UTF-8'?> (This is missing!!!)

      We are using TCPMon to confirm that the xml declaration is stripped out and missing in the message sent out of JBoss.

      Show
      msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true"); <== Put this line in java code msg.saveChanges(); <== Put this line in java code -Djavax.xml.soap.write-xml-declaration=true <== Put this line as a java option on command line startup. We can see that the XML declaration in the message prolog is correct, but by the time the message is actually sent out of JBoss, it goes missing. Send SOAP messages to jboss; jboss responds but strips out and does not send xml declaration in the prolog <?xml version='1.0' encoding='UTF-8'?> (This is missing!!!) We are using TCPMon to confirm that the xml declaration is stripped out and missing in the message sent out of JBoss.

      XML Declaration is stripped and missing from the prolog of outbound soap messages from JBoss 6.1.0 . <?xml version='1.0' encoding='UTF-8'?> (This is missing!!!)

      We have tried setting it both with the java start up option (see below) and setting it within java code (see below) We can print out the soap message and see that exists before it is sent out, but it goes missing by the time it is actually sent out from JBoss 6.1.0 . We have carefully monitored and confirmed this with TCPMon. This is blocking us and we are perplexed.

      Here's the start up messages:

      C:\jboss-6.1.0.Final\bin>run -c all -b 0.0.0.0
      Calling C:\jboss-6.1.0.Final\bin\run.conf.bat
      ===============================================================================

      JBoss Bootstrap Environment

      JBOSS_HOME: C:\jboss-6.1.0.Final

      JAVA: C:\Java\jdk1.6.0_23\bin\java

      JAVA_OPTS: -Dprogram.name=run.bat -Dlogging.configuration=file:logging.properties -Djavax.xml.soap.write-xml-declaration=true -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3
      600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -server

      CLASSPATH: C:\Java\jdk1.6.0_23\lib\tools.jar;C:\jboss-6.1.0.Final\bin\run.jar

      ===============================================================================

              rhn-support-asoldano Alessio Soldano
              vail_jira Kristian Woyna (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated: