Send a multimedia WAP push message | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through November 21, 2009 ⬆ |
◄ ► |
Author | Message | |||
Paul Adrian New member Username: Pauladrian Post Number: 1 Registered: 03-2009 |
hello everyone ... could anyone point out a modified example of sendsms.java that sends a WAP push message ? I'd like to use PAP ... thank you | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 545 Registered: 08-2008 |
Hi Paul, If you want to send an multimedia WAP Push message (like the web form in NowSMS), then you can use sendmms.java from http://blog.nowsms.com/2009/02/nowsms-java-example-send-mms-message.html, just add the following statement: mms.addparameter ("MMSWAPPush", "Yes"); If you want to send a WAP Push for your own URL instead, then sendsms.java (http://www.nowsms.com/download/sendsms.java.txt and http://blog.nowsms.com/2009/02/nowsms-java-example-send-sms-message.html) will work, you just use a sequence like this: sendsms.init(); sendsms.server = "http://localhost:8800/"; sendsms.user = "test"; sendsms.password = "test"; sendsms.phonenumber = "+9999999999"; sendsms.text = "This is a test message"; sendsms.wapurl = "http://www.nowsms.com/"; sendsms.send(); This will send a "service indication" (SI) push, which is the normal type of WAP push message. -- Des NowSMS Support | |||
Paul Adrian New member Username: Pauladrian Post Number: 2 Registered: 03-2009 |
Thanks a lot Desosms | |||
Paul Adrian New member Username: Pauladrian Post Number: 3 Registered: 03-2009 |
Hello Desosms... i still have some problems sending wap push message via PAP... Here is the wap push message i send : Content-Type: multipart/related; type=application/xml; boundary=WPL11woVbhESdfalYevGqpdzLCs --WPL11woVbhESdfalYevGqpdzLCs Content-Type: application/xml; charset=UTF-8 <?xml version="1.0"?> <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN" "http://www.wapforum.org/DTD/pap_1.0.dtd"> <pap> <push-message push-id="76456/84/Openwave Push"> <address address-value="WAPPUSH=0746******/TYPE="/> <quality-of-service delivery-method="unconfirmed"> network="GSM" bearer="SMS"/></push-message> </pap> --WPL11woVbhESdfalYevGqpdzLCs Content-Type: text/vnd.wap.si; charset=UTF-8 <?xml version="1.0"?> <!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN" "http://www.wapforum.org/DTD/si.dtd"> <si> <indication href="www.nowsms.com" si-id="SI/701/449" action="signal-high"> You won 1 million dollars </indication> </si> --WPL11woVbhESdfalYevGqpdzLCs-- I send this message with HTTP post on a device but it doesn't show any message.(java code) I have no problems sending sms or mms, but with WAP there's a different story...could you give me some advice? Thanks | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 570 Registered: 08-2008 |
Hi Paul, Does the push work ok if you send it via the NowSMS web interface? Also, try putting the SI part of the XML and sending it via the "Send XML Settings" web form. If that's all working ok, then there must be some issue with the push. The most common issue is not having a "Content-Length:" in the HTTP POST header. Without that, the server doesn't detect that the POST is complete. -- Des NowSMS Support | |||
Paul Adrian New member Username: Pauladrian Post Number: 4 Registered: 03-2009 |
Hello Des, Wap Push works marvelous from the Web Interface...it seems i'm missing something in my code...I'll get back to you when I fix this Thanks you for your time and suggestions |