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
Contributor
Posts: 10
Registered: ‎07-17-2012
My Device: curve 9360
My Carrier: inwi

getting code=1001 when push to mds but nothing recieved

if it is not a costum application running on my device listning to a specific ,

 

i want to push message to the browser ( who had a listner on port 7874 )

 

but using the RIM pushSDK low level api i send the request and get code=1001 response which is good request

 

but nothing happen in the device side. i'm pushing to BES MDS Here is my Class

 

 

public void initPushSender() {


    addresses.add("my pin");

    PushMessageControl pushMessageControl=new PushMessageControl(false,idGenerator,"Marhaba push",addresses);
    Content papContent =new TextContent("My content sent to device");

    ContentType contentType=new ContentType("TEXT_PLAIN"); //TEXT_PLAIN//TEXT_HTML
    papContent.setContentType(contentType);
    papContent.setHeader("X-Rim-Push-Type", "browser-message");
    papContent.setHeader("X-Rim-Push-Title", "push title");
    papContent.setHeader("X-Rim-Push-Dest-Port", "7874");


    PushSDKPropertiesImpl properties=new PushSDKPropertiesImpl();

    HttpClient client= new HttpClientImpl();

    ((HttpClientImpl) client).setPushSDKProperties(properties);

    PapService papService=new PapServiceImpl();
    papService.setHttpClient(client);

    papService.setPushSDKProperties(properties);

    try {
        PushResponse response =papService.push(null,null,destination,pushMessageControl, papContent);

        System.err.println(response.getCode());
        System.out.println(response);

    } catch (PushSDKException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (BadMessageException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (UnauthorizedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

}

 here is the response :

 

PushResponse ( PapMessage ( net.rim.pushsdk.pap.unmarshal.PushResponse@1a99561    pushId = I14kQdHf00v-1342716445506     )    senderAddress = http://WIN-UHGR7VS88UZ.assabb.com:8080/pap    senderName = WIN-UHGR7VS88UZ_MDS-CS_1    replyTime = Thu Jul 19 16:47:25 UTC 2012    result = ResponseResult ( net.rim.pushsdk.pap.unmarshal.ResponseResult@23e5d1    code = 1001    description = null     )     )

 code =1001  but nothing recieved .

help! please

Contributor
Posts: 10
Registered: ‎07-17-2012
My Device: curve 9360
My Carrier: inwi

Re: getting code=1001 when push to mds but nothing recieved

any help ? please
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: getting code=1001 when push to mds but nothing recieved

Please take a look at one of the samples which sends Browser Channel and Message pushes to see how they should be handled:

http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Sample-code-A-simple-C-push-appli...

 

There is also a Java-based sample included with the Java Development Tools.

 

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 10
Registered: ‎07-17-2012
My Device: curve 9360
My Carrier: inwi

Re: getting code=1001 when push to mds but nothing recieved

i already checked it, and  like i said, the response from server is correct.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: getting code=1001 when push to mds but nothing recieved

You said you were using the "pushSDK low level api", have you tested using the exact C# sample I linked above?

 

The Browser Message Push creates new items in the "Messages" application. Do you see them get populated there?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 10
Registered: ‎07-17-2012
My Device: curve 9360
My Carrier: inwi

Re: getting code=1001 when push to mds but nothing recieved

yes i  did,  the c# example  works fine,  but not  mine, even if i get the correct response from server

Highlighted
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: getting code=1001 when push to mds but nothing recieved

The 1001 response only means that the push was formatted properly to be received by MDS, but does not mean it was formatted correctly for the receiving application. 

 

I would suggest comparing the XML created by your application againts the XML created by the sample application to see what yours is missing.

Garett
@garettBeuk
--
Goodbye everybody!