Garry,

The QName is used to reference the service, so in your case it should be
  new QName("http://fred/wilma";, "ftp");

To address a specific endpoint, ComponentContext has a method getEndpoint which takes two parameters, one is the QName for the service and the second one is a String referring to the endpoint name. It returns a ServiceEndpoint which you can then use to send messages.


Gert

Garry wrote:
Hi,

I've defined an ftp sender:

  xmlns:gateway="http://fred/wilma";
  ...
  ftp:sender  service="gateway:ftp"  endpoint="sender"  ...

that I'm trying to address from a servicemix-bean POJO:
public class TransferBean implements MessageExchangeListener {

using the following QNames:

  new QName ("http://fred/wilma";, "ftpsender")
  new QName ("http://fred/wilma/ftp";, "sender")
  new QName ("http://fred/wilma/ftp/";, "sender")

none of which correctly resolve my ftp endpoint.  What's the magic QName
incantation that will do the job?

Thanks, Garry



Reply via email to