• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Push Notification to APNS - error

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi i have written a java class to send push notification to APNS.
But i am getting Caused by: java.net.ConnectException: Connection refused: connect exception. Please help me ti fix this. I have given the certificates, password correctly.

ApnsService service = APNS.newService().withCert("D:/iOS/Certificates.p12", "Karthik123")
.withSandboxDestination().build();
System.out.println("Service Created : "+service);
service.start();
System.out.println("Service started");

service.testConnection();
System.out.println("Connection success");
String payload = APNS.newPayload().alertBody(
"This is a sample Notification Message!").build();

System.out.println("Payload Created : "+payload);
String token = "b7ae2ef781d2b4406c9ebf6011ac733c95b59867";
service.push(token, payload);
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using something like https://github.com/notnoop/java-apns ?
 
Gokul Kesavalu
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


Thanks for your reply. I am using JavaPNS. i have created payload and sent. Also i am getting successful transmission to apple push notification server. But it is not received in the iPhone. What will be the issue.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic