2 Replies Latest reply on Feb 10, 2011 5:35 PM by rouadec

    MTOM attachment decoding for digest with respect to "XML Schema Part 2: Datatypes Second Edition"

    rouadec Newbie

      While setting up a communication between a jboss 5.1.0GA using the standard web-services stack (I get "X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1" in my HTTP headers) and a datapower appliance we came to an issue regarding the MTOM messages we exchange.

       

      The messages are transferred with binary attachements using MTOM, they are also signed.

      The signature is applied on the message with the binary attachement encoded in base64.

       

      The signatures do not match since the digest of the body do not match since the base64 encoded version of the attachement used to calculate the digest is different :

      • - jboss enforces a  limit on line length of base 64-encoded data to 76 characters
      • - datapower do not and use a base64 form on one line.

       

      After checking the documentations describing this standard I think the way datapower does it is the correct one.

       

      http://www.w3.org/TR/soap12-mtom/#mime-serialization points to http://www.w3.org/TR/2005/REC-xop10-20050125/#introduction which in turns points to http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#base64Binary which states that :

      • "For compatibility with older mail gateways, [RFC 2045] suggests that base64 data should have lines limited to at most 76 characters in length. This line-length limitation is not mandated in the lexical forms of base64Binary data and must not be enforced by XML Schema processors."
      • "Note: For some values the canonical form defined above does not conform to [RFC 2045], which requires breaking with linefeeds at appropriate intervals."

       

      Am I correct in my assumption?

      Is this behaviour configurable on the Jboss side of things?

       

      Antoine