cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.1 Adapter Module Development - Identify Service Provider Name

Former Member
0 Kudos

Hi Experts,

here's another PI 7.1 Adapter Module Development issue I hope you can help me to resolve. It's about identifying Request's receiver service.

Scenario at a glance:

Adapter Modules placed in the modules chain at request and response time in a synchronous Scenario:

- Request: SOAP Axis to RFC

- Response and Fault Response: RFC to SOAP Axis

The issue is to find out the Service Provider (that is: ToService from Request's point of view and FromService from Response's point of view) in the SOAP Axis Adapter Module at Response time.

The coding snippet ...

// Try to get "service provider" ID

String zv_vkFromService = zv_piMsg.getFromService().toString();

String zv_vkToService = zv_piMsg.getToService().toString();

... returns the following values:

START - Request SOAP Axis Adapter;

FromService = Axis Client

ToService = null

IN - Request RFC Adapter:

FromService = Axis Client

ToService = SAP Backend

OUT - Response RFC Adapter:

FromService = SAP Backend

ToService = Axis Client

END - Response SOAP Axis Adapter:

FromService = Axis Client

ToService = null

Thus RFC Adapter returns consistent and logical data to me, but SOAP Axis Adapter returns ... to be honest ... "****!".

By the way: Using DynamicConfigurationBean features (like e.g. message.receiverService) to access these information leads to the same problems/results.

That means that only in the RFC Adapter Module the Service Provider is well-known at both points in time: Request and Response.

In the SOAP Axis Adapter Module the Service Provider is never known, but there (and only there) I need it for logging purposes.

Because if we use Proxy technology instead of RFC we have no chance to use Java Adapter Modules to obtain the Service Provider information.

My question is now: Is there any (maybe undocumented) way to obtain the Name of the request's Receiver Service (=name of Service Provider) in the SOAP

Axis Adapter Module at response time.

That this is not possible at Request time is quite clear to me, because at this time receiver determination has not taken place yet.

Any ideas on how to solve this issue?

Thanx in advance!

Regards,

Volker

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Solved by implementing workaround: UDF in response mapping "saves" correct service names in DCH. Adapter Module in SOAP Axis Adapter then reads DCH.

stefan_grube
Active Contributor
0 Kudos

Even you have a workaround for this, you should report this behavior as bug via OSS

Former Member
0 Kudos

Hi Stefan!

I've done it. Currently it is an ongoing process ... but I'm afraid in the end the answer will be more or less exactly: Works as designed. Got this answer too often in the past, when addressing such special kinds of issues obviously only I have

Regards,

Volker

Answers (2)

Answers (2)

prasannakrishna_mynam
Contributor
0 Kudos

Hello Kolberg,

You are able to get the service provider name at RFC Adapter Module at reponse time, try to assign/append that to the payload's any element and from your SOAP Axis Adapter get the payload element and from there get the service provider name.

Regards,

Prasanna

Former Member
0 Kudos

Hi Prassana!

Thanx for your hint, but unfortunately it is not possible for us to manipulate the payload of the request/response cycle of the messages we have to handle, because message structure is fixed and defined outside of our scope and influence.

So this will unfortunately not help.

Any other ideas?

Regards,

Volker

prasannakrishna_mynam
Contributor
0 Kudos

Hello Kolberg,

Well then we have chance to make the module's bean type stateful, in order to get the provider information. By doing this we might have the option to get information of provider.

Regards,

Prasanna

Former Member
0 Kudos

Hi Prasanna!

Again thanx for your hint. But making the bean stateful is 1. performance-critical and ressource-consuming (it will be called thousands of times a day) and 2. against the SAP recomendations concering Adapter Module Design.

What I am looking for is some kind of hidden API feature I can (mis-) use to get this information.

For example currently I am thinking about using mapping API functions ...

Regards,

Volker

prasannakrishna_mynam
Contributor
0 Kudos

Hello Kolberg,

Stateful, effects the performance issue. We need another solution here :-O, how about create and storing in tempraryfile and when the reading from the file is finished we delete the file. Accessing file from adapter module is also feasible task, since we are deleting the file at adapter level, it will not take much resources and file life time will be, until the response reaches from RFC adapter to SOAP adapter.

- Regarding the mapping Header mapping can be done through adapter, go through the link below

http://help.sap.com/saphelp_nw04/helpdata/en/b2/1f17419b24f06fe10000000a1550b0/content.htm

-Accessing data from the sender direction check this

http://help.sap.com/saphelp_nw04/helpdata/en/dc/e7e040e136742ae10000000a155106/content.htm

Receiver Direction.

-http://help.sap.com/saphelp_nw04/helpdata/en/8c/e7e040e136742ae10000000a155106/content.htm

Regards,

Prasanna

stefan_grube
Active Contributor
0 Kudos

Hi Volker,

As workaround you can put the receiver service in any self-defined ASMA field. So you need not change the payload structure.

I have no experience with the Axis adapter and have no idea, why this does not work.

Stefan

Former Member
0 Kudos

Hi Stefan!

Thanx for the hint. Maybe I am stupid today (only today?), but please help me to get an idea of what an ASMA field is ...

Regards,

Volker

Former Member
0 Kudos

ASMA - Adapter Specific Message Attirbutes , you can find it in Advanced tab.

Former Member
0 Kudos

Hi Stefan! Hi Netweaver Expert!

That does not really help me. Like already mentioned in my original post the really important and only helpful action times are START and END, that is the request messages passes the SOAP Axis Adapter and the Response Messages again passes the SOAP Axis Adapter. The action times IN and OUT are applicable only in case of RFC. If we use XI Proxy we won't have the chance to implement any Adapter Module. Thus I need to gather ALL logging relevant information in the SOAP Axis Adapter.

The funny thing is that in the Integration Engine (ABAP) as well as in the Message Mapping Runtime the information about sender and receiver of the response are also still "correct":

START - Request SOAP Axis Adapter:

FromService = Axis Client

ToService = null (is quite logical, because Receiver Determination has not been done yet)

IN - Request RFC Adapter - OKAY:

FromService = Axis Client

ToService = SAP Backend

OUT - Response RFC Adapter - OKAY:

FromService = SAP Backend

ToService = Axis Client

Integration Engine (ABAP) and Message Mapping Runtime - OKAY:

FromService = SAP Backend

ToService = Axis Client

END - Response SOAP Axis Adapter - NOT OKAY:

FromService = Axis Client

ToService = null

Only that f... SOAP Axis Adapter at Response Time makes my life hard ...

The only workaround I see here is to "save" the relevant information in a "dummy" UDF in Message Mapping. But that's I think a very ugly solution. It would be better to find a way to gather the correct information about sender and reciever in the Adapter Module.

Any ideas?

Regards,

Volker

Former Member
0 Kudos

... any ideas in this forum?

Thanx!

Regards,

Volker

Former Member
0 Kudos

... really no ideas?

Thanx in advance for any hint!

Regards,

Volker