camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From troypayne <troypa...@gmail.com>
Subject Re: Does apns-camel support a sandbox environment?
Date Sun, 15 Sep 2013 19:19:11 GMT
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.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message