You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by troypayne <tr...@gmail.com> on 2013/09/14 19:19:21 UTC

Does apns-camel support a sandbox environment?

Hello Riders,

I've setup my scala project to send push notifications to a deviceToken
(hex), using a sandbox cert. I'm not receiving any of the notifications to
my device and I'm not sure if the ApnsServiceFactory is configured for
sandbox or production.

Has anyone else come across this problem?



--
View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does apns-camel support a sandbox environment?

Posted by troypayne <tr...@gmail.com>.
perhaps I'm using an incorrect version, here's what's in my build.sbt

  "com.typesafe.akka"   %%  "akka-actor"      % "2.1.4"          %
"compile",
  "com.typesafe.akka"   %%  "akka-testkit"    % "2.1.4"          % "test",
  "com.typesafe.akka"   %   "akka-camel_2.10" % "2.1.4"           %
"compile",
  "org.apache.camel"    %   "camel-apns"      % "2.10.0"            %
"compile",

I really appreciate your help on this.


On Sun, Sep 15, 2013 at 3:18 PM, Troy Payne <tr...@gmail.com> wrote:

> ok i'll try that. is camel-apns for akka (scala) open source by any chance?
>
>
> On Sun, Sep 15, 2013 at 7:02 AM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5739411h40@n5.nabble.com> wrote:
>
>> Try without scala + akka and just plain java and get something
>> working. And read the docs at http://camel.apache.org/apns, and this
>> blog
>> http://blog.xebia.fr/2010/09/30/creer-un-composant-apache-camel-de-connexion-a-lapns-1-sur-3/
>> And check the unit tests of camel-apns.
>>
>> On Sun, Sep 15, 2013 at 12:57 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739411&i=0>>
>> wrote:
>>
>> > ok so i just tried this (I put gate and feedback on both)
>> > and I still got nothing. Do you know of a good way to debug? I'm not
>> seeing
>> > any problems spitting out in my console:
>> >
>> > class APNService extends Actor with Producer with Oneway {
>> > def endpointUri = "apns:notify"
>> >
>> > override def preStart() {
>> >  super.preStart()
>> >
>> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> > apnsServiceFactory.setCertificatePath("sandbox.p12")
>> >  apnsServiceFactory.setCertificatePassword("*******")
>> > apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>>
>> >  apnsServiceFactory.setGatewayPort(2195)
>> > apnsServiceFactory.setFeedbackHost("ssl://
>> gateway.sandbox.push.apple.com")
>> >  apnsServiceFactory.setFeedbackPort(2195)
>> > val apnsService = apnsServiceFactory.getApnsService()
>> > val apnsComponent = camelContext.getComponent("apns",
>> > classOf[ApnsComponent])
>> >  apnsComponent.setApnsService(apnsService)
>> > }
>> > }
>> >
>> > class APNBackService extends Actor with Consumer {
>> >
>> > def endpointUri = "apns:consumer?timeUnit=SECONDS"
>> >
>> > def receive = {
>> >  case camelMessage: CamelMessage => {
>> > val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
>> > camelContext)
>> >  // @TODO: set all instances of this device to "none" in the database
>> > println("delete: "+ inactiveDevice)
>> >  }
>> > case unknown => println(unknown)
>> > }
>> >
>> >  override def preStart() {
>> > super.preStart()
>> >
>> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
>> > apnsServiceFactory.setCertificatePassword("*******")
>> >  apnsServiceFactory.setGatewayHost("ssl://
>> gateway.sandbox.push.apple.com")
>> > apnsServiceFactory.setGatewayPort(2195)
>> >  apnsServiceFactory.setFeedbackHost("ssl://
>> gateway.sandbox.push.apple.com")
>> > apnsServiceFactory.setFeedbackPort(2195)
>> >  val apnsService = apnsServiceFactory.getApnsService()
>> > val apnsComponent = camelContext.getComponent("apns",
>> > classOf[ApnsComponent])
>> >  apnsComponent.setApnsService(apnsService)
>> > }
>> > }
>> >
>> >
>> > On Sun, Sep 15, 2013 at 6:54 AM, Claus Ibsen-2 [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739411&i=1>>
>> wrote:
>> >
>> >> On the apnsServiceFactory
>> >>
>> >> On Sun, Sep 15, 2013 at 12:51 PM, troypayne <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5739409&i=0>>
>> >> wrote:
>> >>
>> >> > I have two different actors for each, code looks like this:
>> >> >
>> >> > class APNService extends Actor with Producer with Oneway {
>> >> > def endpointUri = "apns:notify"
>> >> >
>> >> > override def preStart() {
>> >> > super.preStart()
>> >> >
>> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
>> >> > apnsServiceFactory.setCertificatePassword("*******")
>> >> >  apnsServiceFactory.setGatewayHost("ssl://
>> gateway.sandbox.push.apple.com")
>> >>
>> >> > apnsServiceFactory.setGatewayPort(2195)
>> >> >  val apnsService = apnsServiceFactory.getApnsService()
>> >> > val apnsComponent = camelContext.getComponent("apns",
>> >> > classOf[ApnsComponent])
>> >> >  apnsComponent.setApnsService(apnsService)
>> >> > }
>> >> > }
>> >> >
>> >> > class APNBackService extends Actor with Consumer {
>> >> >
>> >> > def endpointUri = "apns:consumer?timeUnit=SECONDS"
>> >> >
>> >> > def receive = {
>> >> >  case camelMessage: CamelMessage => {
>> >> > val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
>> >> > camelContext)
>> >> >  // @TODO: set all instances of this device to "none" in the
>> database
>> >> > println("delete: "+ inactiveDevice)
>> >> >  }
>> >> > case unknown => println(unknown)
>> >> > }
>> >> >
>> >> >  override def preStart() {
>> >> > super.preStart()
>> >> >
>> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
>> >> > apnsServiceFactory.setCertificatePassword("*****")
>> >> >  apnsServiceFactory.setGatewayHost("ssl://
>> gateway.sandbox.push.apple.com")
>> >>
>> >> > apnsServiceFactory.setGatewayPort(2195)
>> >> >  val apnsService = apnsServiceFactory.getApnsService()
>> >> > val apnsComponent = camelContext.getComponent("apns",
>> >> > classOf[ApnsComponent])
>> >> >  apnsComponent.setApnsService(apnsService)
>> >> > }
>> >> > }
>> >> >
>> >> > where do I set setFeedbackHost / port in regard to these two
>> separate
>> >> > actors?
>> >> >
>> >> >
>> >> > On Sun, Sep 15, 2013 at 6:37 AM, Claus Ibsen-2 [via Camel] <
>> >> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739409&i=1>>
>>
>> >> wrote:
>> >> >
>> >> >> There ought to be a setFeedbackHost / port also you need to set.
>> >> >>
>> >> >> On Sun, Sep 15, 2013 at 12:32 PM, troypayne <[hidden email]<
>> >> http://user/SendEmail.jtp?type=node&node=5739407&i=0>>
>> >> >> wrote:
>> >> >>
>> >> >> > by any chance do you know how to do this?
>> >> >> >
>> >> >> > Here's how I'm doing it, but I'm still not receiving any
>> >> notifications
>> >> >> >
>> >> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >> >> >  apnsServiceFactory.setCertificatePath("dev.p12")
>> >> >> > apnsServiceFactory.setCertificatePassword("*********")
>> >> >> >  apnsServiceFactory.setGatewayHost("
>> gateway.sandbox.push.apple.com")
>> >> >> > apnsServiceFactory.setGatewayPort(2195)
>> >> >> >  val apnsService = apnsServiceFactory.getApnsService()
>> >> >> > val apnsComponent = camelContext.getComponent("apns",
>> >> >> > classOf[ApnsComponent])
>> >> >> >  apnsComponent.setApnsService(apnsService)
>> >> >> >
>> >> >> > I sort of did this taking a wild guess
>> >> >> >
>> >> >> >
>> >> >> > On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
>> >> >> > [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5739407&i=1>>
>> >>
>> >> >> wrote:
>> >> >> >
>> >> >> >> Hi
>> >> >> >>
>> >> >> >> Yeah I think you need to configure the gateway and feedback
>> >> host/port
>> >> >> >> to be the sandbox, on the
>> >> >> >> org.apache.camel.component.apns.factory.ApnsServiceFactory.
>> >> >> >>
>> >> >> >> They are default configured for production.
>> >> >> >>
>> >> >> >>
>> >> >> >> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<
>> >> >> http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
>> >> >> >> wrote:
>> >> >> >>
>> >> >> >> > Hello Riders,
>> >> >> >> >
>> >> >> >> > I've setup my scala project to send push notifications to a
>> >> >> deviceToken
>> >> >> >> > (hex), using a sandbox cert. I'm not receiving any of the
>> >> >> notifications
>> >> >> >> to
>> >> >> >> > my device and I'm not sure if the ApnsServiceFactory is
>> configured
>> >> >> for
>> >> >> >> > sandbox or production.
>> >> >> >> >
>> >> >> >> > Has anyone else come across this problem?
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > View this message in context:
>> >> >> >>
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
>> >> >> >> > Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Claus Ibsen
>> >> >> >> -----------------
>> >> >> >> Red Hat, Inc.
>> >> >> >> Email: [hidden email]<
>> >> >> http://user/SendEmail.jtp?type=node&node=5739403&i=1>
>> >> >> >> Twitter: davsclaus
>> >> >> >> Blog: http://davsclaus.com
>> >> >> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >> >> >>
>> >> >> >>
>> >> >> >> ------------------------------
>> >> >> >>  If you reply to this email, your message will be added to the
>> >> >> discussion
>> >> >> >> below:
>> >> >> >>
>> >> >> >>
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
>> >> >> >>  To unsubscribe from Does apns-camel support a sandbox
>> environment?,
>> >> >> click
>> >> >> >> here<
>> >> >>
>> >> >> >> .
>> >> >> >> NAML<
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > View this message in context:
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
>> >> >>
>> >> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Claus Ibsen
>> >> >> -----------------
>> >> >> Red Hat, Inc.
>> >> >> Email: [hidden email]<
>> >> http://user/SendEmail.jtp?type=node&node=5739407&i=2>
>> >> >> Twitter: davsclaus
>> >> >> Blog: http://davsclaus.com
>> >> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >> >>
>> >> >>
>> >> >> ------------------------------
>> >> >>  If you reply to this email, your message will be added to the
>> >> discussion
>> >> >> below:
>> >> >>
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739407.html
>> >> >>  To unsubscribe from Does apns-camel support a sandbox
>> environment?,
>> >> click
>> >> >> here<
>> >> >> .
>> >> >> NAML<
>> >>
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739408.html
>> >>
>> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> Email: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5739409&i=2>
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> discussion
>> >> below:
>> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739409.html
>> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
>> click
>> >> here<
>> >> .
>> >> NAML<
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739410.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739411&i=2>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739411.html
>>  To unsubscribe from Does apns-camel support a sandbox environment?, click
>> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
>> .
>> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739479.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does apns-camel support a sandbox environment?

Posted by troypayne <tr...@gmail.com>.
ok i'll try that. is camel-apns for akka (scala) open source by any chance?


On Sun, Sep 15, 2013 at 7:02 AM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5739411h40@n5.nabble.com> wrote:

> Try without scala + akka and just plain java and get something
> working. And read the docs at http://camel.apache.org/apns, and this
> blog
> http://blog.xebia.fr/2010/09/30/creer-un-composant-apache-camel-de-connexion-a-lapns-1-sur-3/
> And check the unit tests of camel-apns.
>
> On Sun, Sep 15, 2013 at 12:57 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739411&i=0>>
> wrote:
>
> > ok so i just tried this (I put gate and feedback on both)
> > and I still got nothing. Do you know of a good way to debug? I'm not
> seeing
> > any problems spitting out in my console:
> >
> > class APNService extends Actor with Producer with Oneway {
> > def endpointUri = "apns:notify"
> >
> > override def preStart() {
> >  super.preStart()
> >
> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> > apnsServiceFactory.setCertificatePath("sandbox.p12")
> >  apnsServiceFactory.setCertificatePassword("*******")
> > apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>
> >  apnsServiceFactory.setGatewayPort(2195)
> > apnsServiceFactory.setFeedbackHost("ssl://gateway.sandbox.push.apple.com")
>
> >  apnsServiceFactory.setFeedbackPort(2195)
> > val apnsService = apnsServiceFactory.getApnsService()
> > val apnsComponent = camelContext.getComponent("apns",
> > classOf[ApnsComponent])
> >  apnsComponent.setApnsService(apnsService)
> > }
> > }
> >
> > class APNBackService extends Actor with Consumer {
> >
> > def endpointUri = "apns:consumer?timeUnit=SECONDS"
> >
> > def receive = {
> >  case camelMessage: CamelMessage => {
> > val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
> > camelContext)
> >  // @TODO: set all instances of this device to "none" in the database
> > println("delete: "+ inactiveDevice)
> >  }
> > case unknown => println(unknown)
> > }
> >
> >  override def preStart() {
> > super.preStart()
> >
> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
> > apnsServiceFactory.setCertificatePassword("*******")
> >  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>
> > apnsServiceFactory.setGatewayPort(2195)
> >  apnsServiceFactory.setFeedbackHost("ssl://
> gateway.sandbox.push.apple.com")
> > apnsServiceFactory.setFeedbackPort(2195)
> >  val apnsService = apnsServiceFactory.getApnsService()
> > val apnsComponent = camelContext.getComponent("apns",
> > classOf[ApnsComponent])
> >  apnsComponent.setApnsService(apnsService)
> > }
> > }
> >
> >
> > On Sun, Sep 15, 2013 at 6:54 AM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739411&i=1>>
> wrote:
> >
> >> On the apnsServiceFactory
> >>
> >> On Sun, Sep 15, 2013 at 12:51 PM, troypayne <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5739409&i=0>>
> >> wrote:
> >>
> >> > I have two different actors for each, code looks like this:
> >> >
> >> > class APNService extends Actor with Producer with Oneway {
> >> > def endpointUri = "apns:notify"
> >> >
> >> > override def preStart() {
> >> > super.preStart()
> >> >
> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
> >> > apnsServiceFactory.setCertificatePassword("*******")
> >> >  apnsServiceFactory.setGatewayHost("ssl://
> gateway.sandbox.push.apple.com")
> >>
> >> > apnsServiceFactory.setGatewayPort(2195)
> >> >  val apnsService = apnsServiceFactory.getApnsService()
> >> > val apnsComponent = camelContext.getComponent("apns",
> >> > classOf[ApnsComponent])
> >> >  apnsComponent.setApnsService(apnsService)
> >> > }
> >> > }
> >> >
> >> > class APNBackService extends Actor with Consumer {
> >> >
> >> > def endpointUri = "apns:consumer?timeUnit=SECONDS"
> >> >
> >> > def receive = {
> >> >  case camelMessage: CamelMessage => {
> >> > val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
> >> > camelContext)
> >> >  // @TODO: set all instances of this device to "none" in the database
> >> > println("delete: "+ inactiveDevice)
> >> >  }
> >> > case unknown => println(unknown)
> >> > }
> >> >
> >> >  override def preStart() {
> >> > super.preStart()
> >> >
> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
> >> > apnsServiceFactory.setCertificatePassword("*****")
> >> >  apnsServiceFactory.setGatewayHost("ssl://
> gateway.sandbox.push.apple.com")
> >>
> >> > apnsServiceFactory.setGatewayPort(2195)
> >> >  val apnsService = apnsServiceFactory.getApnsService()
> >> > val apnsComponent = camelContext.getComponent("apns",
> >> > classOf[ApnsComponent])
> >> >  apnsComponent.setApnsService(apnsService)
> >> > }
> >> > }
> >> >
> >> > where do I set setFeedbackHost / port in regard to these two separate
> >> > actors?
> >> >
> >> >
> >> > On Sun, Sep 15, 2013 at 6:37 AM, Claus Ibsen-2 [via Camel] <
> >> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739409&i=1>>
>
> >> wrote:
> >> >
> >> >> There ought to be a setFeedbackHost / port also you need to set.
> >> >>
> >> >> On Sun, Sep 15, 2013 at 12:32 PM, troypayne <[hidden email]<
> >> http://user/SendEmail.jtp?type=node&node=5739407&i=0>>
> >> >> wrote:
> >> >>
> >> >> > by any chance do you know how to do this?
> >> >> >
> >> >> > Here's how I'm doing it, but I'm still not receiving any
> >> notifications
> >> >> >
> >> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >> >> >  apnsServiceFactory.setCertificatePath("dev.p12")
> >> >> > apnsServiceFactory.setCertificatePassword("*********")
> >> >> >  apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
>
> >> >> > apnsServiceFactory.setGatewayPort(2195)
> >> >> >  val apnsService = apnsServiceFactory.getApnsService()
> >> >> > val apnsComponent = camelContext.getComponent("apns",
> >> >> > classOf[ApnsComponent])
> >> >> >  apnsComponent.setApnsService(apnsService)
> >> >> >
> >> >> > I sort of did this taking a wild guess
> >> >> >
> >> >> >
> >> >> > On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
> >> >> > [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5739407&i=1>>
> >>
> >> >> wrote:
> >> >> >
> >> >> >> Hi
> >> >> >>
> >> >> >> Yeah I think you need to configure the gateway and feedback
> >> host/port
> >> >> >> to be the sandbox, on the
> >> >> >> org.apache.camel.component.apns.factory.ApnsServiceFactory.
> >> >> >>
> >> >> >> They are default configured for production.
> >> >> >>
> >> >> >>
> >> >> >> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<
> >> >> http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
> >> >> >> wrote:
> >> >> >>
> >> >> >> > Hello Riders,
> >> >> >> >
> >> >> >> > I've setup my scala project to send push notifications to a
> >> >> deviceToken
> >> >> >> > (hex), using a sandbox cert. I'm not receiving any of the
> >> >> notifications
> >> >> >> to
> >> >> >> > my device and I'm not sure if the ApnsServiceFactory is
> configured
> >> >> for
> >> >> >> > sandbox or production.
> >> >> >> >
> >> >> >> > Has anyone else come across this problem?
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > View this message in context:
> >> >> >>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
> >> >> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Claus Ibsen
> >> >> >> -----------------
> >> >> >> Red Hat, Inc.
> >> >> >> Email: [hidden email]<
> >> >> http://user/SendEmail.jtp?type=node&node=5739403&i=1>
> >> >> >> Twitter: davsclaus
> >> >> >> Blog: http://davsclaus.com
> >> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> >> >> >>
> >> >> >>
> >> >> >> ------------------------------
> >> >> >>  If you reply to this email, your message will be added to the
> >> >> discussion
> >> >> >> below:
> >> >> >>
> >> >> >>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
> >> >> >>  To unsubscribe from Does apns-camel support a sandbox
> environment?,
> >> >> click
> >> >> >> here<
> >> >>
> >> >> >> .
> >> >> >> NAML<
> >> >>
> >>
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > View this message in context:
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
> >> >>
> >> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Claus Ibsen
> >> >> -----------------
> >> >> Red Hat, Inc.
> >> >> Email: [hidden email]<
> >> http://user/SendEmail.jtp?type=node&node=5739407&i=2>
> >> >> Twitter: davsclaus
> >> >> Blog: http://davsclaus.com
> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> >> >>
> >> >>
> >> >> ------------------------------
> >> >>  If you reply to this email, your message will be added to the
> >> discussion
> >> >> below:
> >> >>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739407.html
> >> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
> >> click
> >> >> here<
> >> >> .
> >> >> NAML<
> >>
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739408.html
> >>
> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5739409&i=2>
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739409.html
> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
> click
> >> here<
> >> .
> >> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739410.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739411&i=2>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739411.html
>  To unsubscribe from Does apns-camel support a sandbox environment?, click
> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739477.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does apns-camel support a sandbox environment?

Posted by Claus Ibsen <cl...@gmail.com>.
Try without scala + akka and just plain java and get something
working. And read the docs at http://camel.apache.org/apns, and this
blog http://blog.xebia.fr/2010/09/30/creer-un-composant-apache-camel-de-connexion-a-lapns-1-sur-3/
And check the unit tests of camel-apns.

On Sun, Sep 15, 2013 at 12:57 PM, troypayne <tr...@gmail.com> wrote:
> ok so i just tried this (I put gate and feedback on both)
> and I still got nothing. Do you know of a good way to debug? I'm not seeing
> any problems spitting out in my console:
>
> class APNService extends Actor with Producer with Oneway {
> def endpointUri = "apns:notify"
>
> override def preStart() {
>  super.preStart()
>
> val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> apnsServiceFactory.setCertificatePath("sandbox.p12")
>  apnsServiceFactory.setCertificatePassword("*******")
> apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>  apnsServiceFactory.setGatewayPort(2195)
> apnsServiceFactory.setFeedbackHost("ssl://gateway.sandbox.push.apple.com")
>  apnsServiceFactory.setFeedbackPort(2195)
> val apnsService = apnsServiceFactory.getApnsService()
> val apnsComponent = camelContext.getComponent("apns",
> classOf[ApnsComponent])
>  apnsComponent.setApnsService(apnsService)
> }
> }
>
> class APNBackService extends Actor with Consumer {
>
> def endpointUri = "apns:consumer?timeUnit=SECONDS"
>
> def receive = {
>  case camelMessage: CamelMessage => {
> val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
> camelContext)
>  // @TODO: set all instances of this device to "none" in the database
> println("delete: "+ inactiveDevice)
>  }
> case unknown => println(unknown)
> }
>
>  override def preStart() {
> super.preStart()
>
> val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>  apnsServiceFactory.setCertificatePath("sandbox.p12")
> apnsServiceFactory.setCertificatePassword("*******")
>  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
> apnsServiceFactory.setGatewayPort(2195)
>  apnsServiceFactory.setFeedbackHost("ssl://gateway.sandbox.push.apple.com")
> apnsServiceFactory.setFeedbackPort(2195)
>  val apnsService = apnsServiceFactory.getApnsService()
> val apnsComponent = camelContext.getComponent("apns",
> classOf[ApnsComponent])
>  apnsComponent.setApnsService(apnsService)
> }
> }
>
>
> On Sun, Sep 15, 2013 at 6:54 AM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5739409h78@n5.nabble.com> wrote:
>
>> On the apnsServiceFactory
>>
>> On Sun, Sep 15, 2013 at 12:51 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739409&i=0>>
>> wrote:
>>
>> > I have two different actors for each, code looks like this:
>> >
>> > class APNService extends Actor with Producer with Oneway {
>> > def endpointUri = "apns:notify"
>> >
>> > override def preStart() {
>> > super.preStart()
>> >
>> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
>> > apnsServiceFactory.setCertificatePassword("*******")
>> >  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>>
>> > apnsServiceFactory.setGatewayPort(2195)
>> >  val apnsService = apnsServiceFactory.getApnsService()
>> > val apnsComponent = camelContext.getComponent("apns",
>> > classOf[ApnsComponent])
>> >  apnsComponent.setApnsService(apnsService)
>> > }
>> > }
>> >
>> > class APNBackService extends Actor with Consumer {
>> >
>> > def endpointUri = "apns:consumer?timeUnit=SECONDS"
>> >
>> > def receive = {
>> >  case camelMessage: CamelMessage => {
>> > val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
>> > camelContext)
>> >  // @TODO: set all instances of this device to "none" in the database
>> > println("delete: "+ inactiveDevice)
>> >  }
>> > case unknown => println(unknown)
>> > }
>> >
>> >  override def preStart() {
>> > super.preStart()
>> >
>> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
>> > apnsServiceFactory.setCertificatePassword("*****")
>> >  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>>
>> > apnsServiceFactory.setGatewayPort(2195)
>> >  val apnsService = apnsServiceFactory.getApnsService()
>> > val apnsComponent = camelContext.getComponent("apns",
>> > classOf[ApnsComponent])
>> >  apnsComponent.setApnsService(apnsService)
>> > }
>> > }
>> >
>> > where do I set setFeedbackHost / port in regard to these two separate
>> > actors?
>> >
>> >
>> > On Sun, Sep 15, 2013 at 6:37 AM, Claus Ibsen-2 [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739409&i=1>>
>> wrote:
>> >
>> >> There ought to be a setFeedbackHost / port also you need to set.
>> >>
>> >> On Sun, Sep 15, 2013 at 12:32 PM, troypayne <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5739407&i=0>>
>> >> wrote:
>> >>
>> >> > by any chance do you know how to do this?
>> >> >
>> >> > Here's how I'm doing it, but I'm still not receiving any
>> notifications
>> >> >
>> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >> >  apnsServiceFactory.setCertificatePath("dev.p12")
>> >> > apnsServiceFactory.setCertificatePassword("*********")
>> >> >  apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
>> >> > apnsServiceFactory.setGatewayPort(2195)
>> >> >  val apnsService = apnsServiceFactory.getApnsService()
>> >> > val apnsComponent = camelContext.getComponent("apns",
>> >> > classOf[ApnsComponent])
>> >> >  apnsComponent.setApnsService(apnsService)
>> >> >
>> >> > I sort of did this taking a wild guess
>> >> >
>> >> >
>> >> > On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
>> >> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739407&i=1>>
>>
>> >> wrote:
>> >> >
>> >> >> Hi
>> >> >>
>> >> >> Yeah I think you need to configure the gateway and feedback
>> host/port
>> >> >> to be the sandbox, on the
>> >> >> org.apache.camel.component.apns.factory.ApnsServiceFactory.
>> >> >>
>> >> >> They are default configured for production.
>> >> >>
>> >> >>
>> >> >> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<
>> >> http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
>> >> >> wrote:
>> >> >>
>> >> >> > Hello Riders,
>> >> >> >
>> >> >> > I've setup my scala project to send push notifications to a
>> >> deviceToken
>> >> >> > (hex), using a sandbox cert. I'm not receiving any of the
>> >> notifications
>> >> >> to
>> >> >> > my device and I'm not sure if the ApnsServiceFactory is configured
>> >> for
>> >> >> > sandbox or production.
>> >> >> >
>> >> >> > Has anyone else come across this problem?
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > View this message in context:
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
>> >> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Claus Ibsen
>> >> >> -----------------
>> >> >> Red Hat, Inc.
>> >> >> Email: [hidden email]<
>> >> http://user/SendEmail.jtp?type=node&node=5739403&i=1>
>> >> >> Twitter: davsclaus
>> >> >> Blog: http://davsclaus.com
>> >> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >> >>
>> >> >>
>> >> >> ------------------------------
>> >> >>  If you reply to this email, your message will be added to the
>> >> discussion
>> >> >> below:
>> >> >>
>> >> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
>> >> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
>> >> click
>> >> >> here<
>> >>
>> >> >> .
>> >> >> NAML<
>> >>
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
>> >>
>> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> Email: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5739407&i=2>
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> discussion
>> >> below:
>> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739407.html
>> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
>> click
>> >> here<
>> >> .
>> >> NAML<
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739408.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739409&i=2>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739409.html
>>  To unsubscribe from Does apns-camel support a sandbox environment?, click
>> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
>> .
>> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739410.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Does apns-camel support a sandbox environment?

Posted by troypayne <tr...@gmail.com>.
ok so i just tried this (I put gate and feedback on both)
and I still got nothing. Do you know of a good way to debug? I'm not seeing
any problems spitting out in my console:

class APNService extends Actor with Producer with Oneway {
def endpointUri = "apns:notify"

override def preStart() {
 super.preStart()

val apnsServiceFactory = new ApnsServiceFactory(camelContext)
apnsServiceFactory.setCertificatePath("sandbox.p12")
 apnsServiceFactory.setCertificatePassword("*******")
apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
 apnsServiceFactory.setGatewayPort(2195)
apnsServiceFactory.setFeedbackHost("ssl://gateway.sandbox.push.apple.com")
 apnsServiceFactory.setFeedbackPort(2195)
val apnsService = apnsServiceFactory.getApnsService()
val apnsComponent = camelContext.getComponent("apns",
classOf[ApnsComponent])
 apnsComponent.setApnsService(apnsService)
}
}

class APNBackService extends Actor with Consumer {

def endpointUri = "apns:consumer?timeUnit=SECONDS"

def receive = {
 case camelMessage: CamelMessage => {
val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
camelContext)
 // @TODO: set all instances of this device to "none" in the database
println("delete: "+ inactiveDevice)
 }
case unknown => println(unknown)
}

 override def preStart() {
super.preStart()

val apnsServiceFactory = new ApnsServiceFactory(camelContext)
 apnsServiceFactory.setCertificatePath("sandbox.p12")
apnsServiceFactory.setCertificatePassword("*******")
 apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
apnsServiceFactory.setGatewayPort(2195)
 apnsServiceFactory.setFeedbackHost("ssl://gateway.sandbox.push.apple.com")
apnsServiceFactory.setFeedbackPort(2195)
 val apnsService = apnsServiceFactory.getApnsService()
val apnsComponent = camelContext.getComponent("apns",
classOf[ApnsComponent])
 apnsComponent.setApnsService(apnsService)
}
}


On Sun, Sep 15, 2013 at 6:54 AM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5739409h78@n5.nabble.com> wrote:

> On the apnsServiceFactory
>
> On Sun, Sep 15, 2013 at 12:51 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739409&i=0>>
> wrote:
>
> > I have two different actors for each, code looks like this:
> >
> > class APNService extends Actor with Producer with Oneway {
> > def endpointUri = "apns:notify"
> >
> > override def preStart() {
> > super.preStart()
> >
> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
> > apnsServiceFactory.setCertificatePassword("*******")
> >  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>
> > apnsServiceFactory.setGatewayPort(2195)
> >  val apnsService = apnsServiceFactory.getApnsService()
> > val apnsComponent = camelContext.getComponent("apns",
> > classOf[ApnsComponent])
> >  apnsComponent.setApnsService(apnsService)
> > }
> > }
> >
> > class APNBackService extends Actor with Consumer {
> >
> > def endpointUri = "apns:consumer?timeUnit=SECONDS"
> >
> > def receive = {
> >  case camelMessage: CamelMessage => {
> > val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
> > camelContext)
> >  // @TODO: set all instances of this device to "none" in the database
> > println("delete: "+ inactiveDevice)
> >  }
> > case unknown => println(unknown)
> > }
> >
> >  override def preStart() {
> > super.preStart()
> >
> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >  apnsServiceFactory.setCertificatePath("sandbox.p12")
> > apnsServiceFactory.setCertificatePassword("*****")
> >  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
>
> > apnsServiceFactory.setGatewayPort(2195)
> >  val apnsService = apnsServiceFactory.getApnsService()
> > val apnsComponent = camelContext.getComponent("apns",
> > classOf[ApnsComponent])
> >  apnsComponent.setApnsService(apnsService)
> > }
> > }
> >
> > where do I set setFeedbackHost / port in regard to these two separate
> > actors?
> >
> >
> > On Sun, Sep 15, 2013 at 6:37 AM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739409&i=1>>
> wrote:
> >
> >> There ought to be a setFeedbackHost / port also you need to set.
> >>
> >> On Sun, Sep 15, 2013 at 12:32 PM, troypayne <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5739407&i=0>>
> >> wrote:
> >>
> >> > by any chance do you know how to do this?
> >> >
> >> > Here's how I'm doing it, but I'm still not receiving any
> notifications
> >> >
> >> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >> >  apnsServiceFactory.setCertificatePath("dev.p12")
> >> > apnsServiceFactory.setCertificatePassword("*********")
> >> >  apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
> >> > apnsServiceFactory.setGatewayPort(2195)
> >> >  val apnsService = apnsServiceFactory.getApnsService()
> >> > val apnsComponent = camelContext.getComponent("apns",
> >> > classOf[ApnsComponent])
> >> >  apnsComponent.setApnsService(apnsService)
> >> >
> >> > I sort of did this taking a wild guess
> >> >
> >> >
> >> > On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
> >> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739407&i=1>>
>
> >> wrote:
> >> >
> >> >> Hi
> >> >>
> >> >> Yeah I think you need to configure the gateway and feedback
> host/port
> >> >> to be the sandbox, on the
> >> >> org.apache.camel.component.apns.factory.ApnsServiceFactory.
> >> >>
> >> >> They are default configured for production.
> >> >>
> >> >>
> >> >> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<
> >> http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
> >> >> wrote:
> >> >>
> >> >> > Hello Riders,
> >> >> >
> >> >> > I've setup my scala project to send push notifications to a
> >> deviceToken
> >> >> > (hex), using a sandbox cert. I'm not receiving any of the
> >> notifications
> >> >> to
> >> >> > my device and I'm not sure if the ApnsServiceFactory is configured
> >> for
> >> >> > sandbox or production.
> >> >> >
> >> >> > Has anyone else come across this problem?
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > View this message in context:
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
> >> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Claus Ibsen
> >> >> -----------------
> >> >> Red Hat, Inc.
> >> >> Email: [hidden email]<
> >> http://user/SendEmail.jtp?type=node&node=5739403&i=1>
> >> >> Twitter: davsclaus
> >> >> Blog: http://davsclaus.com
> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> >> >>
> >> >>
> >> >> ------------------------------
> >> >>  If you reply to this email, your message will be added to the
> >> discussion
> >> >> below:
> >> >>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
> >> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
> >> click
> >> >> here<
> >>
> >> >> .
> >> >> NAML<
> >>
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
> >>
> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5739407&i=2>
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739407.html
> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
> click
> >> here<
> >> .
> >> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739408.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739409&i=2>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739409.html
>  To unsubscribe from Does apns-camel support a sandbox environment?, click
> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739410.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does apns-camel support a sandbox environment?

Posted by Claus Ibsen <cl...@gmail.com>.
On the apnsServiceFactory

On Sun, Sep 15, 2013 at 12:51 PM, troypayne <tr...@gmail.com> wrote:
> I have two different actors for each, code looks like this:
>
> class APNService extends Actor with Producer with Oneway {
> def endpointUri = "apns:notify"
>
> override def preStart() {
> super.preStart()
>
> val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>  apnsServiceFactory.setCertificatePath("sandbox.p12")
> apnsServiceFactory.setCertificatePassword("*******")
>  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
> apnsServiceFactory.setGatewayPort(2195)
>  val apnsService = apnsServiceFactory.getApnsService()
> val apnsComponent = camelContext.getComponent("apns",
> classOf[ApnsComponent])
>  apnsComponent.setApnsService(apnsService)
> }
> }
>
> class APNBackService extends Actor with Consumer {
>
> def endpointUri = "apns:consumer?timeUnit=SECONDS"
>
> def receive = {
>  case camelMessage: CamelMessage => {
> val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
> camelContext)
>  // @TODO: set all instances of this device to "none" in the database
> println("delete: "+ inactiveDevice)
>  }
> case unknown => println(unknown)
> }
>
>  override def preStart() {
> super.preStart()
>
> val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>  apnsServiceFactory.setCertificatePath("sandbox.p12")
> apnsServiceFactory.setCertificatePassword("*****")
>  apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
> apnsServiceFactory.setGatewayPort(2195)
>  val apnsService = apnsServiceFactory.getApnsService()
> val apnsComponent = camelContext.getComponent("apns",
> classOf[ApnsComponent])
>  apnsComponent.setApnsService(apnsService)
> }
> }
>
> where do I set setFeedbackHost / port in regard to these two separate
> actors?
>
>
> On Sun, Sep 15, 2013 at 6:37 AM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5739407h16@n5.nabble.com> wrote:
>
>> There ought to be a setFeedbackHost / port also you need to set.
>>
>> On Sun, Sep 15, 2013 at 12:32 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739407&i=0>>
>> wrote:
>>
>> > by any chance do you know how to do this?
>> >
>> > Here's how I'm doing it, but I'm still not receiving any notifications
>> >
>> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>> >  apnsServiceFactory.setCertificatePath("dev.p12")
>> > apnsServiceFactory.setCertificatePassword("*********")
>> >  apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
>> > apnsServiceFactory.setGatewayPort(2195)
>> >  val apnsService = apnsServiceFactory.getApnsService()
>> > val apnsComponent = camelContext.getComponent("apns",
>> > classOf[ApnsComponent])
>> >  apnsComponent.setApnsService(apnsService)
>> >
>> > I sort of did this taking a wild guess
>> >
>> >
>> > On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739407&i=1>>
>> wrote:
>> >
>> >> Hi
>> >>
>> >> Yeah I think you need to configure the gateway and feedback host/port
>> >> to be the sandbox, on the
>> >> org.apache.camel.component.apns.factory.ApnsServiceFactory.
>> >>
>> >> They are default configured for production.
>> >>
>> >>
>> >> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
>> >> wrote:
>> >>
>> >> > Hello Riders,
>> >> >
>> >> > I've setup my scala project to send push notifications to a
>> deviceToken
>> >> > (hex), using a sandbox cert. I'm not receiving any of the
>> notifications
>> >> to
>> >> > my device and I'm not sure if the ApnsServiceFactory is configured
>> for
>> >> > sandbox or production.
>> >> >
>> >> > Has anyone else come across this problem?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
>> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> Email: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5739403&i=1>
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> discussion
>> >> below:
>> >>
>> >>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
>> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
>> click
>> >> here<
>>
>> >> .
>> >> NAML<
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739407&i=2>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739407.html
>>  To unsubscribe from Does apns-camel support a sandbox environment?, click
>> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
>> .
>> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739408.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Does apns-camel support a sandbox environment?

Posted by troypayne <tr...@gmail.com>.
I have two different actors for each, code looks like this:

class APNService extends Actor with Producer with Oneway {
def endpointUri = "apns:notify"

override def preStart() {
super.preStart()

val apnsServiceFactory = new ApnsServiceFactory(camelContext)
 apnsServiceFactory.setCertificatePath("sandbox.p12")
apnsServiceFactory.setCertificatePassword("*******")
 apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
apnsServiceFactory.setGatewayPort(2195)
 val apnsService = apnsServiceFactory.getApnsService()
val apnsComponent = camelContext.getComponent("apns",
classOf[ApnsComponent])
 apnsComponent.setApnsService(apnsService)
}
}

class APNBackService extends Actor with Consumer {

def endpointUri = "apns:consumer?timeUnit=SECONDS"

def receive = {
 case camelMessage: CamelMessage => {
val inactiveDevice = camelMessage.getBodyAs(classOf[InactiveDevice],
camelContext)
 // @TODO: set all instances of this device to "none" in the database
println("delete: "+ inactiveDevice)
 }
case unknown => println(unknown)
}

 override def preStart() {
super.preStart()

val apnsServiceFactory = new ApnsServiceFactory(camelContext)
 apnsServiceFactory.setCertificatePath("sandbox.p12")
apnsServiceFactory.setCertificatePassword("*****")
 apnsServiceFactory.setGatewayHost("ssl://gateway.sandbox.push.apple.com")
apnsServiceFactory.setGatewayPort(2195)
 val apnsService = apnsServiceFactory.getApnsService()
val apnsComponent = camelContext.getComponent("apns",
classOf[ApnsComponent])
 apnsComponent.setApnsService(apnsService)
}
}

where do I set setFeedbackHost / port in regard to these two separate
actors?


On Sun, Sep 15, 2013 at 6:37 AM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5739407h16@n5.nabble.com> wrote:

> There ought to be a setFeedbackHost / port also you need to set.
>
> On Sun, Sep 15, 2013 at 12:32 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739407&i=0>>
> wrote:
>
> > by any chance do you know how to do this?
> >
> > Here's how I'm doing it, but I'm still not receiving any notifications
> >
> > val apnsServiceFactory = new ApnsServiceFactory(camelContext)
> >  apnsServiceFactory.setCertificatePath("dev.p12")
> > apnsServiceFactory.setCertificatePassword("*********")
> >  apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
> > apnsServiceFactory.setGatewayPort(2195)
> >  val apnsService = apnsServiceFactory.getApnsService()
> > val apnsComponent = camelContext.getComponent("apns",
> > classOf[ApnsComponent])
> >  apnsComponent.setApnsService(apnsService)
> >
> > I sort of did this taking a wild guess
> >
> >
> > On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5739407&i=1>>
> wrote:
> >
> >> Hi
> >>
> >> Yeah I think you need to configure the gateway and feedback host/port
> >> to be the sandbox, on the
> >> org.apache.camel.component.apns.factory.ApnsServiceFactory.
> >>
> >> They are default configured for production.
> >>
> >>
> >> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
> >> wrote:
> >>
> >> > Hello Riders,
> >> >
> >> > I've setup my scala project to send push notifications to a
> deviceToken
> >> > (hex), using a sandbox cert. I'm not receiving any of the
> notifications
> >> to
> >> > my device and I'm not sure if the ApnsServiceFactory is configured
> for
> >> > sandbox or production.
> >> >
> >> > Has anyone else come across this problem?
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5739403&i=1>
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
> >>  To unsubscribe from Does apns-camel support a sandbox environment?,
> click
> >> here<
>
> >> .
> >> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739407&i=2>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739407.html
>  To unsubscribe from Does apns-camel support a sandbox environment?, click
> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739408.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does apns-camel support a sandbox environment?

Posted by Claus Ibsen <cl...@gmail.com>.
There ought to be a setFeedbackHost / port also you need to set.

On Sun, Sep 15, 2013 at 12:32 PM, troypayne <tr...@gmail.com> wrote:
> by any chance do you know how to do this?
>
> Here's how I'm doing it, but I'm still not receiving any notifications
>
> val apnsServiceFactory = new ApnsServiceFactory(camelContext)
>  apnsServiceFactory.setCertificatePath("dev.p12")
> apnsServiceFactory.setCertificatePassword("*********")
>  apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
> apnsServiceFactory.setGatewayPort(2195)
>  val apnsService = apnsServiceFactory.getApnsService()
> val apnsComponent = camelContext.getComponent("apns",
> classOf[ApnsComponent])
>  apnsComponent.setApnsService(apnsService)
>
> I sort of did this taking a wild guess
>
>
> On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5739403h92@n5.nabble.com> wrote:
>
>> Hi
>>
>> Yeah I think you need to configure the gateway and feedback host/port
>> to be the sandbox, on the
>> org.apache.camel.component.apns.factory.ApnsServiceFactory.
>>
>> They are default configured for production.
>>
>>
>> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
>> wrote:
>>
>> > Hello Riders,
>> >
>> > I've setup my scala project to send push notifications to a deviceToken
>> > (hex), using a sandbox cert. I'm not receiving any of the notifications
>> to
>> > my device and I'm not sure if the ApnsServiceFactory is configured for
>> > sandbox or production.
>> >
>> > Has anyone else come across this problem?
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739403&i=1>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
>>  To unsubscribe from Does apns-camel support a sandbox environment?, click
>> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
>> .
>> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Does apns-camel support a sandbox environment?

Posted by troypayne <tr...@gmail.com>.
by any chance do you know how to do this?

Here's how I'm doing it, but I'm still not receiving any notifications

val apnsServiceFactory = new ApnsServiceFactory(camelContext)
 apnsServiceFactory.setCertificatePath("dev.p12")
apnsServiceFactory.setCertificatePassword("*********")
 apnsServiceFactory.setGatewayHost("gateway.sandbox.push.apple.com")
apnsServiceFactory.setGatewayPort(2195)
 val apnsService = apnsServiceFactory.getApnsService()
val apnsComponent = camelContext.getComponent("apns",
classOf[ApnsComponent])
 apnsComponent.setApnsService(apnsService)

I sort of did this taking a wild guess


On Sun, Sep 15, 2013 at 6:25 AM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5739403h92@n5.nabble.com> wrote:

> Hi
>
> Yeah I think you need to configure the gateway and feedback host/port
> to be the sandbox, on the
> org.apache.camel.component.apns.factory.ApnsServiceFactory.
>
> They are default configured for production.
>
>
> On Sat, Sep 14, 2013 at 7:19 PM, troypayne <[hidden email]<http://user/SendEmail.jtp?type=node&node=5739403&i=0>>
> wrote:
>
> > Hello Riders,
> >
> > I've setup my scala project to send push notifications to a deviceToken
> > (hex), using a sandbox cert. I'm not receiving any of the notifications
> to
> > my device and I'm not sure if the ApnsServiceFactory is configured for
> > sandbox or production.
> >
> > Has anyone else come across this problem?
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5739403&i=1>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739403.html
>  To unsubscribe from Does apns-camel support a sandbox environment?, click
> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5739376&code=dHJveXBheW5lQGdtYWlsLmNvbXw1NzM5Mzc2fC05MjM2MjYwOTI=>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376p5739406.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does apns-camel support a sandbox environment?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah I think you need to configure the gateway and feedback host/port
to be the sandbox, on the
org.apache.camel.component.apns.factory.ApnsServiceFactory.

They are default configured for production.


On Sat, Sep 14, 2013 at 7:19 PM, troypayne <tr...@gmail.com> wrote:
> Hello Riders,
>
> I've setup my scala project to send push notifications to a deviceToken
> (hex), using a sandbox cert. I'm not receiving any of the notifications to
> my device and I'm not sure if the ApnsServiceFactory is configured for
> sandbox or production.
>
> Has anyone else come across this problem?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Does-apns-camel-support-a-sandbox-environment-tp5739376.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen