Saturday, October 9, 2010

Listening Channel vs. Host TP Channel in Oracle B2B 11g

In 10g era of Oracle B2B, we had two kinds of channels to send/receive documents –


1. Internal Delivery Channel – IDC’s (Internal Delivery Channels) are used to enable Oracle B2B to communicate with backend applications. When I say backend, then it may be any application/product running behind Oracle B2B within same enterprise network.

In case of an outbound flow, Oracle B2B receives documents from backend applications through an IDC and sends it to the targeted remote trading partner after required processing.

In case of an inbound flow, Oracle B2B receives documents from remote trading partners through a Delivery Channel and sends it to backend application through an IDC.

In Oracle B2B 10g, there were only two default IDC’s - IP_IN_QUEUE and IP_OUT_QUEUE(both are AQ’s) where as in Oracle B2B 11g, we have two more default IDC’s which are B2B_IN_Queue and B2B_Out_Queue (both are JMS) however at a time either of JMS or AQ IDC’s may be active.

2. Delivery Channel – DC’s (Delivery Channels) are used to enable Oracle B2B to communicate with remote trading partners.

In case of an outbound flow, Oracle B2B sends the document to remote trading partner using the remote TP’s DC selected in the agreement, however in case of an inbound flow, Oracle B2B receives a document through a Host TP delivery channel.

In Oracle B2B 10g, there is one default Host TP delivery channel – http://host:port/b2b/transportServlet and similarly in Oracle B2B 11g, we have one default Host TP delivery channel – http://host:soa_server_port/b2b/httpReceiver



Now after brief introduction of IDC and DC let’s come back to our topic – Listening Channel vs. Host TP channel.



Host TP Channels – Channels defined under host TP configuration can be either used as an IDC (if “internal” checkbox is checked) or it can be used as a shared delivery channel for all remote TP’s (if “internal” checkbox is NOT checked).



The first use is something which you are very familiar with, but second one is a new feature. If you mark a channel, defined under host TP configuration, as external then it serves as a common delivery channel that all remote trading partners can use as their delivery endpoints and will appear in the list of channels under the remote trading partner in the agreement(as this is considered outbound delivery channel).



Listening Channels – A listening channel listens on an endpoint for messages from remote trading partner or backend applications hence it can be used as an IDC or as a DC, depending upon the “internal” checkbox selection but in both the cases it is used to send messages to your Oracle B2B system. When a Listening Channel is marked as External (Internal checkbox not selected in the channel attributes), then it can be used by Remote Trading Partner(s) to send messages to your B2B system (Inbound).



When a Listening Channel is marked as Internal, then it can be used by backend application(s) to send messages to your B2B system (Outbound).



A listening channel never participates in any agreement hence it can be modified or deleted without affecting any existing deployments.



There is one more thing very important here that the channel’s marked as internal can be of “Generic Protocols” only. No internal channel can use any other protocol except “Generic” ones however Oracle B2B allows to select any protocol for an internal channel.

13 comments:

  1. Hello Anuj,

    Thanks for the detailed post. Still I have a doubt.

    Can we say that when we have custom queues defined and if we need to use them for an outbound scenario, we need to use the listening channel am i ryt?

    Also default IP_OUT_QUEUE can be used only if the msg is sent from backend? Can we use the default queue while configuring listening channel?

    Please clarify

    ReplyDelete
  2. Hi,

    @ Can we say that when we have custom queues defined and if we need to use them for an outbound scenario, we need to use the listening channel am i ryt?

    Yes. For custom queues, you need to define listening channel.

    @Also default IP_OUT_QUEUE can be used only if the msg is sent from backend?

    Yes, IP_OUT_QUEUE is an internal delivery channel which is used to receive outbound messages from back-end applications.

    @Can we use the default queue while configuring listening channel?

    Yes, if B2B is not listening to the particular default queue. For an example, suppose you have configured B2B to use default JMS queues instead of AQ queues but still you want to post messages to default AQ from back-end then you may create a listening channel for default AQ queue. Though it is technically possible, I personally do not recommend to create listening channels for default queues.

    ReplyDelete
  3. Thanks Anuj for the clarifications.

    ReplyDelete
  4. Hi Anuj

    I have recently started working in Oracle B2B 11g. I have a specific requirement where i have to send and receive EDI file with AS2 message exchange protocol. I am not able to configure the channel and agreement to meet the requirement, any input in this regard will be really helpful.

    ReplyDelete
    Replies
    1. You may be interested in EDI samples available here -

      http://java.net/projects/oraclesoasuite11g/pages/B2B

      Delete
    2. Hi Anuj,

      This is a nice and helpful write up. The java.net site is down, so I am unable to get any sample b2b projects from there. If you have any of the code samples on your local can you please send me zipped b2b projects on my mail- akshatpaharia272@gmail.com. Thanks in advance for help.

      Delete
  5. Hi Anuj

    We have a requirement where we have to process encrypted data in B2B.
    Is it possible in the B2B layer to poll for an encrypted file?
    At the same time we don't have the valid xsd to parse the encrypted file.

    ReplyDelete
  6. Hi Anuj,

    I am brand new to Oracle B2B and I am just getting started. There is one thing I don't fully understand:

    A listening channel listens on an endpoint for messages from remote trading partner [...]. When a Listening Channel is marked as External (Internal checkbox not selected in the channel attributes), then it can be used by Remote Trading Partner(s) to send messages to your B2B system (Inbound).
    [...]
    A listening channel never participates in any agreement [...].

    Does that mean, an agreement is not needed for a remote partner to send messages to the host? So, any remote partner could just send a message to that Listening Channel's endpoint? So, when do I need an "inbound" agreement?

    Best

    ReplyDelete
  7. For future visitors, I found the answer to my question posted above: see "Getting Started with
    Oracle SOA Suite 11g R1 – A Hands-On Tutorial", Heidi Buelow, Manas Deb, Jayaram Kasi, Demed L'Her, Prasen Palvankar, 2009, p. 445:

    In addition, B2B also provides Listening Channels. A listening channel allows the
    B2B server to receive documents from any trading partner. Messages received via
    a listening channel are analyzed to identify the type of document received and the
    identity of the trading partner that sent it. If both the document type and revision
    and the trading partner are registered in the B2B, then an agreement is selected and
    the processing continues.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Hi Anuj,

    I have been going through your B2B posts and really found them very informative. Appreciate all your inputs.

    I am also new to Oracle B2B , i did set up an AS2 inbound channel with a TP and i am receiving a txt message to JMS queue. I need to store this message as a file . I am trying create a SOA composite with JMS adaptor and trying to identify a message using message identifiers. This seems to be not working. Is this a correct way ? or is there any other good way to achieve this? Please share your thoughts.

    Thanks
    padmini

    ReplyDelete
  10. Hi Anju,
    I am new to Oracle B2b.
    We have a requirement like polling the jms queue by b2b layer and placing it into another queue.Without using soa composite. How can we poll the queues in b2b .

    Thanks,
    Divya.

    ReplyDelete
  11. Hi Anju,

    I need some details about same channels in the 12C.
    Also explain below information is valid for 12C?

    In Oracle B2B 10g, there is one default Host TP delivery channel – http://host:port/b2b/transportServlet and similarly in Oracle B2B 11g, we have one default Host TP delivery channel – http://host:soa_server_port/b2b/httpReceiver

    ReplyDelete