Question

In the last 26 or so hours calls to ServiceBusConstract.getQueue(path) where path is a non-existent queue are throwing a ServiceException whose ultimate cause is a binding issue.

Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.w3.org/2005/Atom", local:"feed"). Expected elements are <{http://schemas.microsoft.com/netservices/2010/10/servicebus/connect}QueueDescription>,<{http://schemas.microsoft.com/netservices/2010/10/servicebus/connect}SubscriptionDescription>,<{http://schemas.microsoft.com/netservices/2010/10/servicebus/connect}TopicDescription>,<{http://www.w3.org/2005/Atom}entry> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:647)

This is true when using both 0.4.0 and 0.4.1 versions of the SDK.

Previously,this call returned a GetQueueResult whose .getValue() method returned null. Found this as my tests are now failing.

Have the production services been updates to no longer be compatible with this call? What is the expected behavior of ServiceBusContract.getQueue(nonExistentPath)?

Was it helpful?

Solution

It is expected to throw a ServiceException. We actually have a unit test to validate this behavior, please see getNonExistQueueFail() in the following file.

https://github.com/WindowsAzure/azure-sdk-for-java/blob/master/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusConfigurationTest.java

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top