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

Java Development

Reply
Trusted Contributor
Posts: 224
Registered: ‎08-09-2011
My Device: 9550
My Carrier: BBprogrammer

How to give the server Name for non ssl

Hi all,

 

     Currently Working on XMPP lib. here  

 for ssl :final SecureConnection sc = (SecureConnection)Connector.open("ssl://" + this.server + ":" + this.port, Connector.READ_WRITE);

 

 

ssl Socket connection Used .I want to Use the non ssl And for this can any one explain  for that  Socket connction.

  

 

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to give the server Name for non ssl

socket:// maybe?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Trusted Contributor
Posts: 224
Registered: ‎08-09-2011
My Device: 9550
My Carrier: BBprogrammer

Re: How to give the server Name for non ssl

Hi ,
Thank you for Reply, I am Using socket for Non-SSl
as

final StreamConnection connection = (StreamConnection) Connector.open("socket://" + this.host + ":" + this.port);
this.reader = new XmlReader(connection.openInputStream());
this.writer = new XmlWriter(connection.openOutputStream());

And i am getting exception at this.reader.next();

Can you explain why i am getting at while reading the data after opening suceesful Stream connection..

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to give the server Name for non ssl

open does nothing, only when you read/write or request the response code etc is the connection really opened.

what exception do you get? i would suggest to test the connection before you put additional parts (like xml parsing) on it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
Trusted Contributor
Posts: 224
Registered: ‎08-09-2011
My Device: 9550
My Carrier: BBprogrammer

Re: How to give the server Name for non ssl

Is Xmpp chat works for BIS and Wifi,