I manage to push message using test_ppg in kannel source successfully. But when Iam trying to push message from Java application, this fails :(.
When it fails I am getting only few lines of error message :
2006-08-24 14:22:53 [5660] [11] DEBUG: HTTP: Creating HTTPClient for `192.168.0.102'.
2006-08-24 14:22:53 [5660] [14] DEBUG: PPG: ip_allowed_by_ppg: ip found from allowed list
2006-08-24 14:22:53 [5660] [14] INFO: PPG: Accept request </cgi-bin/wappush.cgi> from < 192.168.0.102>
2006-08-24 14:22:53 [5660] [14] WARNING: PPG: headers_acceptable: got unacceptable push headers
2006-08-24 14:22:53 [5660] [14] WARNING: PPG: Unparsable push headers, the request unacceptable
2006-08-24 14:22:53 [5660] [14] DEBUG: PPG: send_bad_message_response: telling pi
2006-08-24 14:22:53 [5660] [14] DEBUG: HTTP: Resetting HTTPClient for `192.168.0.102'.
2006-08-24 14:22:53 [5660] [10] DEBUG: HTTP: Destroying HTTPClient area 0x8421e38.
2006-08-24 14:22:53 [5660] [10] DEBUG: HTTP: Destroying HTTPClient for `192.168.0.102'.
that's it. Do i need to get more log?
Thanks
Prasad
On 8/23/06,
Aarno Syvänen <[EMAIL PROTECTED]> wrote:
Hi Kavuri,If you listen ppg connection, you would get bad message fragment,You must do this any case, i think: otherwise you would not did yousuccess delivering the push.AarnoOn 23 Aug 2006, at 08:26, Kavuri Prasad wrote:Hi Aarno,I don't have any bad message fragment. I am using log-level=0 in both sms and wap configuration.This problem stopped my work :( . Any alternatives..?Thanks,Prasad
On 8/22/06, Aarno Syvänen < [EMAIL PROTECTED]> wrote:Hi Kavuri,
PPG should return an error message containing 'bad message fragment'.This would tell wher ePPG believes the error is.
On 22 Aug 2006, at 09:53, Kavuri Prasad wrote:
Hi Aarno,
sorry for posting again (previouse mail bounced from kannel)
Here is my code :
buffer.append("--asdlfkjiurwgasf\r\n")
.append("Content-Type: application/xml\r\n\r\n")
.append("<?xml version=\"1.0\"?>\r\n").append("<!DOCTYPE pap PUBLIC \"-//WAPFORUM//DTD PAP//EN\"\r\n")
.append("\" http://www.wapforum.org/DTD/pap_1.0.dtd\ ">\r\n")
.append("<pap>\r\n")
.append("<push-message push-id=\"").append(vMessageID.trim())
.append("\"\r\n deliver-before-timestamp=\"2007-09-28T06:45:00Z\" \r\n")
.append("deliver-after-timestamp=\"2006-07-28T06:45:00Z\" ")
.append("progress-notes-requested=\"true\">\r\n")
.append("<address address-value=\"WAPPUSH=")
.append(target).append("/TYPE=PLMN\"/>\r\n")
.append("<quality-of-service delivery-method=\"unconfirmed\"\r\nnetwork-required=\"true\"\r\n network=\"GSM\"\r\nbearer-required=\"true\"\r\nbearer=\"SMS\"/>")
.append("</push-message>\r\n")
.append("</pap>\r\n\r\n").append("--asdlfkjiurwgasf\r\n")
.append("Content-Type: text/vnd.wap.si\r\n\r\n")
.append("<?xml version=\"1.0\"?>\r\n")
.append("<!DOCTYPE si PUBLIC \"-//WAPFORUM//DTD SI 1.0//EN\"\r\n")
.append("\" http://www.wapforum.org/DTD/si.dtd\">\r\n")
.append("<si>\r\n")
.append("<indication action="" si-id=\"")
.append(vMessageID)
.append("\" href="">.append(" http://wap.yahoo.com ")
.append("\">")
.append("Download the Foodreg Application")
.append("</indication>\r\n")
.append("</si>\r\n").append( "--asdlfkjiurwgasf--\r\n\r\n");
Sending http request using postmethod :
Part[] parts = { new StringPart("Content-Type","multipart/related; boundary=asdlfkjiurwgasf; type=\"application/xml\"")};
post.setRequestEntity(new MultipartRequestEntity(parts, post.getParams()));//post.setRequestHeader("Content-Type","\"multipart/related;\"boundary=asdlfkjiurwgasf;type=\"application/xml\"");
//post.setParameter("\"Content-Type\"","\"multipart/related;\" boundary=asdlfkjiurwgasf; type=\"application/xml\"");
//post.setParameter("Accept", "application/xml");
//post.setParameter("Content-Length","");
post.setQueryString(new NameValuePair[] {
new NameValuePair("username", "yyyyy"),
new NameValuePair("password", "xxx"),Any suggestions ??
new NameValuePair("to", target),
new NameValuePair("text", message)
});
int status = client.executeMethod(post);
Thanks for your kind support