Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
New Contributor
victortao
Posts: 2
Registered: ‎10-18-2010
My Device: Bold 9700
My Carrier: Verizon

Trouble with bad message fragment

Hello,

 

I've been trying to get a push message sent from my ruby server.  Based on the documentation and forum posts I've read, The message I'm sending to my MDS simulator should be working:

 

====

 

 

POST /pap HTTP/1.1
Accept: */*
Connection: close
User-Agent: CubeTree
Content-Type: multipart/related; boundary=mPsbVQo0a68eIL3OAxnm; type=application/xml
Authorization: 
Content-Length: 585
X-Rim-Push-Dest-Port: 5000
Host: 192.168.104.128:8080
X-Wap-Application-Id: /
--mPsbVQo0a68eIL3OAxnm
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
<pap>
  <push-message source-reference="xxx-xxxxxxxxxxxxxxxx" push-id="1288743490" deliver-before-timestamp="2010-11-02T17:23:10Z">
    <address address-value="2100000a"/>
    <quality-of-service delivery-method="unconfirmed"/>
  </push-message>
</pap>
--mPsbVQo0a68eIL3OAxnm
Content-Type: text/plain
Push-Message-ID: 1288743490
Test
--mPsbVQo0a68eIL3OAxnm--

 

 

===

 

But I just get errors back from the simulator:

 

===

 

 

HTTP/1.1 202 Accepted

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=A661C4E2D2E1CCE256BA57CB732F09BD; Path=/

Via: MDS_4.1.4.19

Content-Type: application/xml

Content-Length: 436

Date: Wed, 03 Nov 2010 00:18:10 GMT

Connection: close

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "http://www.wapforum.org/DTD/pap_2.0.dtd" [<?wap-pap-ver supported-versions="2.0"?>]>

<pap product-name="Research In Motion Ltd. Mobile Data Service"><badmessage-response bad-message-fragment="--mPsbVQo0a68eIL3OAxnm

Content-Type: application/xml; charset=UTF-8

 

&lt;?xml version=&quot;1.0&quot; encoding" code="2000"/></pap>

 

 

===

 

Any ideas what could be wrong?  It's probably a stupid mistake, a by-product of me staring at the code too long...

 

Thanks!

Please use plain text.
New Contributor
victortao
Posts: 2
Registered: ‎10-18-2010
My Device: Bold 9700
My Carrier: Verizon

Re: Trouble with bad message fragment

Anyone have any ideas?

 

Thanks!

Please use plain text.
Developer
massimo_olive
Posts: 235
Registered: ‎11-08-2010
My Device: Not Specified

Re: Trouble with bad message fragment

Did u try and get rid of:

Content-Type: application/xml; charset=UTF-8

 

 

Please use plain text.
New Contributor
billblume
Posts: 6
Registered: ‎03-31-2010
My Device: 8300
My Carrier: AT&T

Re: Trouble with bad message fragment

I encountered the same problem, It seems that the MDS simulator does not accept PAP 2.1.  Try changing your doctype to:

 

<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "http://www.wapforum.org/DTD/pap_2.0.dtd" [<?wap-pap-ver supported-versions="2.0"?>]>

 

 

Please use plain text.
Contributor
yfujiki
Posts: 13
Registered: ‎10-18-2011
My Device: BlackBerry 9630
My Carrier: Verizon

Re: Trouble with bad message fragment

Having the same problem! Did somebody figure out?
Please use plain text.