I had
the same problems trying to send Push Mesages from Java using the
HttpUrlConnection.
Checking with Ethereal I found out that the
HttpUrlConnection object breaks the request into two packets and that probably
confuses Kannel.
I
tried using sockets (more work of course) and everything worked
well.
Also
the HttpClient library from Apache Commons works well with kannel and
is much easier to use than HttpUrlConnection.
Just
don't use the HttpUrlConnection object.
Good
luck!
Spyros Sakellariou
-----Original Message-----
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of
Gelvis Sequera
Sent: Tuesday, September 20, 2005 10:56
PM
To: users@kannel.org
Subject: Sending post request in
java
Hi.I'm triying to send to consecutive messages from kannel using the Java HttpUrlConnection, but after I send the first, the smsbox dies (but the bearebox keeps up).My conf file isgroup = smsc
smsc = at
modemtype = wavecom
device = /dev/ttyS1
pin = 1286
sim-buffering = true
speed = 115200
my-number = +58412*******
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
immediate-sendsms-reply = true
group = modems
id = wavecom
name = Wavecom
detect-string = "WAVECOM MODEM"
#broken = true
message-storage = SM
enable-mms = true
init-string = "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0"
need-sleep = true
And my log is2005-09-20 11:05:18 [11434] [3] INFO: sendsms sender:<test:+58412*********> (192.168.1.86) to:<multi-cast> msg:<Se les notifica que los pasantes estan probando el proy SML.. jajaja>
2005-09-20 11:05:18 [11434] [3] DEBUG: message length 68, sending 1 messages
2005-09-20 11:05:18 [11434] [3] DEBUG: Status: 202 Answer: <Sent.>
2005-09-20 11:05:18 [11434] [3] DEBUG: HTTP: Resetting HTTPClient for `192.168.1.86'.
2005-09-20 11:05:18 [11434] [3] PANIC: gwlib/octstr.c:2355: seems_valid_real: Assertion `ostr->data != NULL' failed. (Called from gwlib/octstr.c:317:octstr_destroy.)
2005-09-20 11:05:18 [11434] [3] PANIC: /usr/local/sbin/smsbox(gw_panic+0x19a) [0x808015b]
2005-09-20 11:05:18 [11434] [3] PANIC: /usr/local/sbin/smsbox [0x8086fa2]
2005-09-20 11:05:18 [11434] [3] PANIC: /usr/local/sbin/smsbox(octstr_destroy+0x2f) [0x8081641]
2005-09-20 11:05:18 [11434] [3] PANIC: /usr/local/sbin/smsbox [0x805af7d]
2005-09-20 11:05:18 [11434] [3] PANIC: /usr/local/sbin/smsbox [0x8075dae]
2005-09-20 11:05:18 [11434] [3] PANIC: /lib/libpthread.so.0 [0xb7f0b2fe]
2005-09-20 11:05:18 [11434] [3] PANIC: /lib/libc.so.6(__clone+0x5a) [0xb7cb4ada]
My post request is something like this:<message><submit><da><number>+5841**********</number></da><ud>MESSAGE </ud><from><user>*****</user><pass>*****</pass></from></submit></message>Any Ideas???????????