cancel
Showing results for 
Search instead for 
Did you mean: 

retrieve communication channel status programmatically

Former Member
0 Kudos

Dear community,

I would like to retrieve detailed runtime status informations of communication channels running on our SAP Netweaver 7.31SP10 java single stack server!

What I have already considered:

  1. Directory API 7.31 ()
    • insufficiency: i can retrieve the adapterspecific attribute named "adapterstatus" but it only returns active or <empty>, but no informations as seen in the NWA->SOA->Monitoring->Communication Channel Monitor. Did I miss something?
  2. Communication channel monitor (SAP NetWeaver Process Integration - SAP Library)
    • source code:
      
      

      public class StatusCallback implements ChannelStatusCallback {

        things...

        try {

            CPAFactory cf = CPAFactory.getInstance();

            this.lookupManager = cf.getLookupManager();

        } catch (Exception e) {

            things...

        }

        AdapterRegistry adapterReg = null;

        AdapterRegistryFactory adapterRegFac = AdapterRegistryFactory.getInstance();

        adapterReg = adapterRegFac.getAdapterRegistry();

        adapterReg.registerAdapter(this.currentAdapterNameSpace,

                                                             this.currentAdapterName,

                                                            new AdapterCapability[] { AdapterCapability.PUSH_PROCESS_STATUS },

                                                            new AdapterCallback[] { this });

        synchronized (this) {

            this.inboundChannels = new LinkedList<Channel>();

            this.outboundChannels = new LinkedList<Channel>();

            try {

              List<Channel> allChannels = this.lookupManager.getAllCPAObjects(CPAObjectType.CHANNEL);

              //Here comes my question:

              //the following lines create a new ChannelStaus BUT how can i retrieve the status of a specific channel without callbacks or anything

              ChannelStatusFactory chStatFac = ChannelStatusFactory.getInstance();

              chStatFac.createChannelStatus(allChannels.get(i),ChannelState.OK, "State test!");

            }catch{

              things...

            }

        }

        <unregister adapter>

      }

      My question can be found in the source code. I want to retrieve the current runtime status without any callbacks just by calling a method! Is this possible, if yes can you provide me some pseudocode or a brief explanation!

I would appreciate any help! The developed tool is only missing out this part!

Thank you in advance!

Sincerely,

Dennis

Accepted Solutions (1)

Accepted Solutions (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Dennis,

Please use below web-service

http://server:50200/ChannelAdminService/ChannelAdmin?wsdl&mode=ws_policy

1. Create a project in SOAPUI and play around with this web-service.

2. To programmatically retrieve status, write a web-service consumer program in your favorite language (Java, Python, Go...). It is similar to .

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello!

Thank you very much for your help!

It lead me to the correct solution.

Sincerely,

Dennis