Petals SE JSR181

API too limited (can't obtain ServiceEndpoint)

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1.2
  • Fix Version/s: 1.3.0
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    Impossible to call an external endpoint by EP name, using the current APIs.

    The JBI context gives access to a MessageSender (see below), then we can fill in the interface / service names.

    But the Exchange doesn't provide any setEndpoint(endpointName). Instead, there is a setEndpoint(ServiceEndpoint)... but no API is accessible to generate a ServiceEndpoint starting from an endpoint name.

    This requires access to some of the Component's methods (or to the Component itself).

    // Example
    Exchange e = jbiContext.getMessageSender().createExchange(mep);
    e.setInterfaceName(myInterfaceName);
    e.setService(myServiceName);

    // How to set endpoint given an enpoint name ?? No way

    Show
    Impossible to call an external endpoint by EP name, using the current APIs. The JBI context gives access to a MessageSender (see below), then we can fill in the interface / service names. But the Exchange doesn't provide any setEndpoint(endpointName). Instead, there is a setEndpoint(ServiceEndpoint)... but no API is accessible to generate a ServiceEndpoint starting from an endpoint name. This requires access to some of the Component's methods (or to the Component itself). // Example Exchange e = jbiContext.getMessageSender().createExchange(mep); e.setInterfaceName(myInterfaceName); e.setService(myServiceName); // How to set endpoint given an enpoint name ?? No way
  • Environment:
    Petals 4.

Activity

Hide
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 15:46:11 +0200

The most simple solution is to put a method that allows to set all the main attributes on an exchange.

/**
  * Creates an exchange.
  * 
  * @param interfaceName the target interface name (use null as wild card)
  * @param serviceName the target service name (use null as wild card)
  * @param endpointName the target end-point name (use null as wild card)
  * @param operationName the target operation name (can be null but not recommended)
  * @param mep the invocation MEP (not null)
  * @return the created exchange
  * @throws MessagingException
  * @throws PEtALSCDKException
  */
public Exchange createExchange(QName interfaceName, QName serviceName, String endpointName, QName operationName, MEPConstants mep) 
throws MessagingException, PEtALSCDKException;
Show
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 15:46:11 +0200 The most simple solution is to put a method that allows to set all the main attributes on an exchange.
/**
  * Creates an exchange.
  * 
  * @param interfaceName the target interface name (use null as wild card)
  * @param serviceName the target service name (use null as wild card)
  * @param endpointName the target end-point name (use null as wild card)
  * @param operationName the target operation name (can be null but not recommended)
  * @param mep the invocation MEP (not null)
  * @return the created exchange
  * @throws MessagingException
  * @throws PEtALSCDKException
  */
public Exchange createExchange(QName interfaceName, QName serviceName, String endpointName, QName operationName, MEPConstants mep) 
throws MessagingException, PEtALSCDKException;
Hide
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 16:03:35 +0200

Commit #32006

Show
Vincent Zurczak added a comment - Tue, 10 Apr 2012 - 16:03:35 +0200 Commit #32006

People

Dates

  • Created:
    Wed, 7 Mar 2012 - 11:05:33 +0100
    Updated:
    Tue, 10 Apr 2012 - 19:21:14 +0200
    Resolved:
    Tue, 10 Apr 2012 - 16:03:35 +0200