Hi,

For Perl questions address a perl group. Besides this is not an XML-POST. This 
is a simple GET with variables in the URL. Additionally you don't seem to bind 
dlr-url at all. You have a lot of issues to resolve, none of them apparently 
with kannel.

BR,
Nikos
  ----- Original Message ----- 
  From: oscar cassetti 
  To: users@kannel.org 
  Sent: Wednesday, February 17, 2010 10:26 PM
  Subject: XML Post and dlr-url


  Hello All,

  I have been stuck on configuring the dlr-url in the XML-POST.  

  To generate the XML I use the Perl Library XML::Writer

  On an Perl script I do something like this 
  #DLR Parameter                                                                
              
      my $amp = URI::Escape::uri_escape('&') ;
      my $dlr_url     =  
'http://localhost/delivery-report.php?send_history_id='.    
URI::Escape::uri_escape( $message->{'ID'}).      $amp . 'to_number='.       
URI::Escape::uri_escape($number).       $amp . 'type=%d' ;

  And then 
  $xml_doc->dataElement('dlr-url' => $dlr_url );

  At this stage my XML writer has converted the dlr_url in a valid XML string.

  However when Kannel is going to use it the string doesn't look decoded.
  See below.

  47 45 54 20 2f 64 65 6c 69 76 65 72 79 2d 72 65   GET /delivery-re
  70 6f 72 74 2e 70 68 70 3f 73 65 6e 64 5f 68 69   port.php?send_hi
  73 74 6f 72 79 5f 69 64 3d 31 33 38 35 33 32 31   story_id=1385321
  35 25 32 36 74 6f 5f 6e 75 6d 62 65 72 3d 33 35   5%26to_number=35
  33 38 37 30 36 33 32 33 34 36 25 32 36 74 79 70   3870632346%26typ
  65 3d 38 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f   e=8 HTTP/1.1..Ho
  73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 0d 0a 43   st: localhost..C
  6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d   onnection: keep-
  61 6c 69 76 65 0d 0a 55 73 65 72 2d 41 67 65 6e   alive..User-Agen
  74 3a 20 4b 61 6e 6e 65 6c 2f 31 2e 34 2e 33 0d   t: Kannel/1.4.3.

  I also tried to use $amp = '&'  without HTML escaping but I get a similar 
problem:

  47 45 54 20 2f 64 65 6c 69 76 65 72 79 2d 72 65   GET /delivery-re
  70 6f 72 74 2e 70 68 70 3f 73 65 6e 64 5f 68 69   port.php?send_hi
  73 74 6f 72 79 5f 69 64 3d 31 33 38 35 33 32 31   story_id=1385321
  34 26 61 6d 70 3b 74 6f 5f 6e 75 6d 62 65 72 3d   4&to_number=
  33 35 33 38 37 30 36 33 32 33 34 36 26 61 6d 70   353870632346&amp
  3b 74 79 70 65 3d 38 20 48 54 54 50 2f 31 2e 31   ;type=8 HTTP/1.1
  0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73   ..Host: localhos
  74 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b   t..Connection: k
  65 65 70 2d 61 6c 69 76 65 0d 0a 55 73 65 72 2d   eep-alive..User-
  41 67 65 6e 74 3a 20 4b 61 6e 6e 65 6c 2f 31 2e   Agent: Kannel/1.
  34 2e 33 0d 0a 0d 0a                              4.3....



  Any idea?

Reply via email to