All you have to do to replicate my problem is try to send a message to a queue 
hosted on the service bus. If you can get the message to send then you've done 
what I can't. I would like to give you an endpoint but that's out of my reach. 
I can try to ask someone about the logistics of creating a public endpoint for 
testing purposes.


In any case, here is the method I am using to send a message. I include 
bcpkix-jdk15on-1.47.jar and bcprov-jdk15on-1.47.jar as well as proton-j-0.7.jar 
in my buildpath.

        public static void send() {
                String address = 
"amqps://XXXXX:XXXXX@[namespaceXXXX].windows.servicebus.net/[entityXXXX]";
                Messenger msgr = Proton.messenger();            
                try{
                        System.out.println("starting the messenger.");
                        msgr.start();
                        System.out.println("setting outgoing window.");
                        msgr.setOutgoingWindow(1);
                        System.out.println("creating a message.");
                        Message msg = Proton.message();
                        System.out.println("setting the message address to : 
"+address+".");
                        msg.setAddress(address);
                        UUID id = UUID.randomUUID();
                        System.out.println("setting message id to: "+id+".");
                        msg.setMessageId(id);
                        System.out.println("setting the body to 'Hello 
world'.");
                        msg.setBody(new AmqpValue("Hello world"));
                        System.out.println("putting the message.");
                        msgr.put(msg);
                        System.out.println("getting outgoing tracker.");
                        Tracker tracker = msgr.outgoingTracker();
                        System.out.println("sending the message.");
                        msgr.send();
                        System.out.println("send status is 
"+msgr.getStatus(tracker)+".");
                        System.out.println("stopping the messenger.");          
        
                        msgr.stop();
                }
                catch(Exception e) {
                        e.printStackTrace();
                }
        }// end method send

I use the same code for the swig bindings and it works.




-Jimmy

-----Original Message-----
From: Rafael Schloming [mailto:r...@alum.mit.edu] 
Sent: Thursday, June 12, 2014 11:19 AM
To: proton@qpid.apache.org
Subject: Re: Swig java bindings proton0.7

I'd like to take a look at the proton-j issue that is preventing interop with 
service bus. Do you know if it would be possible for me to reproduce the 
proton-j issue myself? Ideally it would be nice to have a publicly accessible 
amqp endpoint for service bus that we could use to pro-actively verify interop 
prior to each release.

--Rafael


On Thu, Jun 12, 2014 at 1:39 PM, Jimmy Campbell <t-jic...@microsoft.com>
wrote:

> I haven't been able to talk to the Microsoft Azure Service Bus with 
> proton-j but I can do it with proton-c. So I have been using proton-c 
> with the swig bindings on android.
>
> -Jimmy
>
> -----Original Message-----
> From: Rafael Schloming [mailto:r...@alum.mit.edu]
> Sent: Thursday, June 12, 2014 10:38 AM
> To: proton@qpid.apache.org
> Subject: Re: Swig java bindings proton0.7
>
> Yeah, there was a discussion on the list a while back. They were 
> originally created for testing purposes, and were proving to be 
> difficult to maintain.
> We opted to remove them and have more resources to focus on bringing 
> the pure Java implementation up to parity with C. As far as I know you 
> are the only one who has attempted actually using them outside of our 
> testing framework. Is there a particular reason you were using it 
> instead of the pure Java impl?
>
> --Rafael
>
>
> On Wed, Jun 11, 2014 at 5:20 PM, Jimmy Campbell 
> <t-jic...@microsoft.com>
> wrote:
>
> > I've been using proton0.6 for a while now and I am using swig java 
> > bindings. I downloaded version 0.7 today and can't find the java
> bindings.
> > They were removed?
> >
> > -Jimmy
> >
>

Reply via email to