endProducers.setSequenceType(Constants.NoProducers);
}
nbr.setEndProducers(endProducers);
} else {
nbr.setFirstBroker(false);
Brokers brokers = new Brokers();
for (BrokerStruct brokerStruct : brokerList) {
Broker brokerElt = new Broker();
BrokerConsumerReference bcr = new BrokerConsumerReference();
bcr.setReference(EncodingUtils.createEndpointReference(brokerStruct.consumerUrl, brokerStruct.brokerID));
brokerElt.setBrokerConsumerReference(bcr);
BrokerProducerReference bpr = new BrokerProducerReference();
bpr.setReference(EncodingUtils.createEndpointReference(brokerStruct.producerUrl, brokerStruct.brokerID));
brokerElt.setBrokerProducerReference(bpr);
brokers.addBrokerToSequence(brokerElt);
}
nbr.setBrokers(brokers);
}
EndpointReference consumerEPR = nb.getBrokerConsumerReference().getReference();
URL consumerUrl = consumerEPR.getEndpointAddress().getAddress();