X-kannel Headers not working.

Kirti Mandwade <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <CACz0=Aip8SxDGzfk==MH1asYEdnazr0P+vne4RVrNUuUYb3akg@mail.gmail.com>
Hello,

Is support to X-kannel Headers removed as when I try sending SMS with
X-kannel Headers using HTTP POST it gives me Authorization failed.
Here is what I am doing.

 String url = "http://u.v.w.x:13003/cgi-bin/sendsms";

  CloseableHttpClient httpClient = HttpClients.createDefault();
  HttpPost httpPost = new HttpPost(url);
  httpPost.setHeader("content-type", "text/plain");
  CloseableHttpResponse response = null;
  StringEntity entity = null;
  List <NameValuePair> headers = new ArrayList <NameValuePair>();
  headers.add(new BasicNameValuePair("X-Kannel-Username", "abc"));
  headers.add(new BasicNameValuePair("X-Kannel-Password", "123"));
  headers.add(new BasicNameValuePair("X-Kannel-From", "abc123abc"));
  headers.add(new BasicNameValuePair("X-Kannel-To", "278132300004"));
  headers.add(new BasicNameValuePair("X-Kannel-SMSC", "send"));

    entity = new StringEntity("hello", ContentType.create(
            "text/plain"));


httpPost.setEntity(new UrlEncodedFormEntity(headers));
httpPost.setEntity(entity);




       response = httpClient.execute(httpPost);
                 System.out.println(response.getStatusLine());

              EntityUtils.consume(entity);



I have set accept-x-kannel headers to true in sms-service group of kannel
configuration

group = sms-service
accept-x-kannel-headers = true


Sending SMS using POST method with XML is working perfectly I am using
Kannel svn-r5114 User's Guide.Please let me know if this feature has been
removed or there is something wrong in the way i am doing it.Thanks
Kirti
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.