Hi Kavuri,
No, i meant dump of test_ppg. It will dump what it is sending to ppg.
Aarno
On 25 Aug 2006, at 10:47, Kavuri Prasad wrote: Dear Aarno,
Here is the dump of successfull WAPPush :
2006-08-25 16:27:20 [13299] [11] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'. 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: ip_allowed_by_ppg: ip found from allowed list 2006-08-25 16:27:20 [13299] [14] INFO: PPG: Accept request </cgi-bin/wappush.cgi> from <127.0.0.1> 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: http_read_thread: pap multipart accepted 2006-08-25 16:27:20 [13299] [14] INFO: client address was <+60133186859>, accepted 2006-08-25 16:27:20 [13299] [14] DEBUG: PAP COMPILER: doing semantic analysis for address type a phone number 2006-08-25 16:27:20 [13299] [14] DEBUG: using defaults instead of anys 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: http_read_thread: pap control entity compiled ok 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: transform_message: push message content and headers valid 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: push machine 1 created 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: store_push_data: push machine 1 appended to unit push list 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: send_push_response: telling pi 2006-08-25 16:27:20 [13299] [14] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1'. 2006-08-25 16:27:20 [13299] [14] INFO: PPG: handle_push_message: push message accepted for processing 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: OTA request for unit push 2006-08-25 16:27:20 [13299] [14] INFO: PPG: unconfirmed push delivered to OTA 2006-08-25 16:27:20 [13299] [14] DEBUG: PPG: destroying push machine 1 2006-08-25 16:27:20 [13299] [9] DEBUG: OTA: event arrived 2006-08-25 16:27:20 [13299] [9] DEBUG: OTA: made connectionless session service request 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP (UNIT): event arrived 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP_UNIT: Connectionless push accepted 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP: Mapping `application/vnd.wap.sic', WSP 1.2 to 0x002e. 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP: Mapping `Content-Length', WSP 1.3 to 0x000d. 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP: Mapping `Content-Type', WSP 1.3 to 0x0011. 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP: Mapping `Encoding-Version', WSP 1.3 to 0x0043. 2006-08-25 16:27:20 [13299] [2] DEBUG: WDP (wapbox): delivering 1 segments to bearerbox 2006-08-25 16:27:20 [13299] [2] DEBUG: WSP (UNIT): delivering to wdp 2006-08-25 16:27:20 [13299] [0] WARNING: Received other message than wdp/admin, ignoring! 2006-08-25 16:27:20 [13299] [10] DEBUG: HTTP: Destroying HTTPClient area 0x97e72e8. 2006-08-25 16:27:20 [13299] [10] DEBUG: HTTP: Destroying HTTPClient for `127.0.0.1'. --------------------
I am not so sure whether I am using correctly or not. My java file is :
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"); //.append("--multipart-boundary--\r\n");
and Post parameters: Part[] parts = { new StringPart("Content-Type","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\"");
Is there any wrong? Please advise me. I am really thank ful to you all.
Thanks, Prasad
On 8/25/06, Aarno Syvänen <[EMAIL PROTECTED]> wrote: Hi Kavuri,
when you run test_ppg, it will dump push heders and push mulipart doc. Did you use exactly same headers ?
|
- Re: Push messages using java Aarno Syvänen
-