Changeset 552

Show
Ignore:
Timestamp:
03/24/07 13:51:51 (2 years ago)
Author:
sacha
Message:

Multipart mime added content id to ebXML message in a multi part message

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/hefeweizen_library_ebMS_message2.rb

    r542 r552  
    299299      attr_reader :is_sync_reply_set 
    300300      attr_reader :time_to_live 
    301  
     301      attr_reader :soap_only 
    302302      def me 
    303303        "EBMessage2" 
     
    535535 
    536536        else 
    537  
     537          # USER MESSAGE 
    538538           
    539539          #      <enumeration value="always"/> 
     
    595595          cr = "\x0d" 
    596596          lf = "\x0a" 
    597  
    598           ebXML_message << "--HefeWeizenBoundary#{crlf}" 
    599           ebXML_message << "Content-Type: text/xml#{crlf}" 
    600           ebXML_message << "Content_Transfer-Encoding: binary#{crlf}" 
    601           ebXML_message << "#{crlf}" 
     597           
     598          if is_multiparty then 
     599            ebXML_message << "--HefeWeizenBoundary#{crlf}" 
     600            ebXML_message << "Content-Type: text/xml; charset=UTF-8#{crlf}" 
     601            ebXML_message << "Content-Transfer-Encoding: binary#{crlf}" 
     602            ebXML_message << "Content-Id: <1234567890>#{crlf}" 
     603            ebXML_message << "#{crlf}" 
     604          end 
    602605          ebXML_message << <<EOF 
    603606<?xml version="1.0" encoding="UTF-8"?> 
     
    619622        <eb:Timestamp>#{create_timestamp}</eb:Timestamp> 
    620623      </eb:MessageData>#{duplicate_elimination} 
    621     </eb:MessageHeader>#{ack_requested}#{sync_reply_mode}#{signature_skeleton}  </soap:Header> 
     624    </eb:MessageHeader>#{ack_requested}#{sync_reply_mode}#{signature_skeleton}   
     625  </soap:Header> 
    622626  <soap:Body xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"> 
     627EOF 
     628          if is_multiparty then 
     629            ebXML_message << <<EOF 
    623630    <eb:Manifest eb:id="#{create_id(ebMS_message_info['from'])}" eb:version="2.0">#{references} 
    624631    </eb:Manifest> 
     632EOF 
     633          end 
     634          ebXML_message << <<EOF 
    625635  </soap:Body> 
    626636</soap:Envelope> 
     
    630640 
    631641          # ADDING PAYLOADS 
    632           logger.debug "#{me}: Adding #{my_payloads.size.to_s} payloads to ebXML message." if debug 
     642          logger.debug "#{me}: Adding #{my_payloads.size.to_s} payloads to ebXML message." if (debug and is_multiparty) 
    633643          my_payloads.each{ | payload | 
    634644            payload_id = payload[0] 
     
    682692 
    683693          # adding closing line 
    684           ebXML_message << "#{crlf}--HefeWeizenBoundary--#{crlf}" 
     694          ebXML_message << "#{crlf}--HefeWeizenBoundary--#{crlf}" if is_multiparty 
    685695           
    686696          ##          my_command = "echo '#{msg_end}' >> #{file_path}" 
     
    824834 
    825835 
    826         # not implemented: 
    827         @time_to_live = nil 
    828836=begin 
    829837           if validate then