Thanks Rene, 7 octets UDH works just fine...
From: [email protected]
To: [email protected]; [email protected]
Subject: RE: wappush rejected
Date: Tue, 26 Apr 2011 19:21:05 +0200



The udh should only be 6 octets long (I think 7 including the length). The rest 
of the string goes into the text field. == Rene From: [email protected] 
[mailto:[email protected]] On Behalf Of Gerardo Corro
Sent: Tuesday, 26 April, 2011 18:53
To: [email protected]
Subject: wappush rejected Hi Kannel people,  I'm trying to send wap-pushes 
using a java program, (plain text messages work ok). I'm getting: 400 - UDH 
field misformed, rejected The messages when formed look like: 
http://localhost:13013/cgi-bin/sendsms?username=synchronica&password=syncpass&from=1811991&to=18112345678&coding=0&udh=%06%05%04%0b%84%23%f0%01%06%04%03%B0%81%EA%02%06%6A%00%85%09%03%6D%65%73%73%65%6E%67%65%72%2E%63%6C%61%72%6F%2E%63%66F%6D%2E%67%74%2F%67%65%74%2F%00%06%01&text=
  I'm putting the percent symbol since in other places it was mentioned like 
the solution, I'm using this java snippet:     private String 
addPercents(String header) {        StringBuilder sb = new StringBuilder();     
   char a[] = header.toCharArray();        for (int i = 0; i < a.length; i++) { 
           if ((i % 2) == 0) {                sb.append("%");            }      
      sb.append(a[i]);        }        return sb.toString();    }  but it's not 
working, I have also tried encoding the URL like this: 
StringBuilder().append("udh=").append(java.net.URLEncoder.encode(message.getHeader(),
 "ISO-8859-1")).append('&').toString(); nothing works. Please assist. Cheers.   
                                       

Reply via email to