cancel
Showing results for 
Search instead for 
Did you mean: 

Service with 2 Operation and 2 SOAP Action ?

Former Member
0 Kudos

Hi,

I have 1 Service Interface with 2 Operation and each operation having different soap action. I couln't find any way to make it soap action configuration become flexible.

Because this Service interface pointing to 1 Business System so this BS only has 1 receiver agreement and of course 1 communication channel.

Please advise how to implement in the PI 7.1

Thank You and Best Regards

Fernand Lesmana

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi Fernand,

check my reply on this thread:

Regards

Suraj

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi Abhistek,

Thank you for your information.

Best Regards

Fernand

Former Member
0 Kudos

Hi Abhistek

I assume that your intention is to use different action for different Operations i.e. each Operation uses corresponding action

it's not my intention to use different action for different operation, but then the external services that i have to call using that approach so i have to follow rite.

Looking at the UDF, i can say for sure that the action wont change in any case.....for all your communication (for any operation) the action will be the same....it is as good as hard-coded....so i would suggest that you run the scenario for both the operations....and then check what action is actually populated at runtime....i assume that it will be the same.

I am using different Operation Mapping and UDF for each operation, so the value will be different.

Also you dont need to make use of the Keep Headers option (even i am not making use of it and my scenario is working perfectly fine )

Just want to know the reason, so i can answer if the customer asking me the detail.

Regards

Fernand

former_member200962
Active Contributor
0 Kudos
I am using different Operation Mapping and UDF for each operation, so the value will be different.

Ok...so it it a workaround!

Just want to know the reason, so i can answer if the customer asking me the detail.

Using Keep Headers option you can include header details (like user, QoS, sender) into the XI message....now this will cause the structure to change (normally we only see SOAP body only in SXMB_MONI....now when you include header details also you will see Header + Body in SXMB_MONI)....however the structure that you have defined/ used in IR does not contain these elements....so during runtime a mismatch happens and you get an error

If you feel that any information provided is incorrect please feel free to correct it!

Regards,

Abhishek.

Former Member
0 Kudos

Hi Suraj,

I am getting this error whenever check the option "Keep Header".

<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: System.Web.Services.Protocols.SoapHeaderException: SOAP header ReliableMessaging was not understood. at System.Web.Services.Protocols.SoapHeaderHandling.SetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client) at System.Web.Services.Protocols.SoapServerProtocol.CreateServerInstance() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</SAP:AdditionalText>

Generally, The interface working fine without checking the option "Keep Header", I can request and retrieve the response synchronously from the webservices. (With and without put in "THeaderSOAPACTION" in the XHeaderName1".

I just want to make sure my option is correct.

Cheers

Fernand

Former Member
0 Kudos

Hi Suraj,

Are you saying that you have selected the keep header parameter and is running into error?

Yes, If i have selected the "Keep Header" the interface running into error. The interface running well without have to select the option. I am not sure whether Effi Olivkovitch having same the same problem.

From help.sap

If you select Keep Headers then the header of the XI message is included in the Web service message.

Since by using DynamicConfiguration you were overwriting the header variable so i though we need to keep this thing checked.

I am not sure about this, but then i didn't put anything for all (Variable Header (XHeaderName1,XHeaderName2, XHeaderName3) i just left it blank.

3) Are you trying this scenario for learning purpose....or is it a project requirement?

If it is a project requirement then you dont need any Dynamic Configuration! The action that you are setting wont change at any point of time....it will be static and better to include it directly in the CC itself.

Hi Abhistek, The purpose of using Dynamic Configuration because of the limitation in the configuration that you cannot have separate Communication Channel for each Operation. So you still cannot hard code it if you have multi operation. because all using the same Communication Channel.

Best Regards

Fernand

Edited by: Fernand Lesmana on Nov 19, 2009 7:28 AM

former_member187339
Active Contributor
0 Kudos

Hi Fernand,

Refer the link

http://help.sap.com/saphelp_nwpi711/helpdata/en/48/327519a3af58d8e10000000a421937/content.htm

Point 6.

The soap action THeaderSOAPACTION is a part of XI message header .

But what error are you getting when you have selected the option? And without selecting it is your requirement fulfilled? ie is the scenario working as you desired (making soap action on runtime?

>>PS: Hope you have set THeaderSOAPACTION in soap receiver channel like XHeaderName1 = THeaderSOAPACTION. IF not please set this and try once..

Regards

Suraj

former_member200962
Active Contributor
0 Kudos

I assume that your intention is to use different action for different Operations i.e. each Operation uses corresponding action

Looking at the UDF, i can say for sure that the action wont change in any case.....for all your communication (for any operation) the action will be the same....it is as good as hard-coded....so i would suggest that you run the scenario for both the operations....and then check what action is actually populated at runtime....i assume that it will be the same.

Also you dont need to make use of the Keep Headers option (even i am not making use of it and my scenario is working perfectly fine )

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

I have successufully implement the Suraj solution from

1. Create UDF for the mapping with this code below :

DynamicConfigurationKey keyURL = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","THeaderSOAPACTION");

// access dynamic configuration

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

conf.put(keyURL,"http://www.webserviceX.NET/GetWeather");

2. Remove SOAP Action entry in the SOAP Receiver Communication Channel.

3. "Tick" Use Adapter-Specific Message Attribute option and Variable Transport Binding option.

But i am still wondering why i can't select "Keep Header" Option like Suraj mention in his reply ? If i selected the "Keep Header" option the interface failure ?

Please Enligteen me on the this solution

Best Regards

Fernand

former_member200962
Active Contributor
0 Kudos

1) I hope you have a return statement in your UDF...return"";

2) There is no need to check the Keep Headers option (or any other Conversion Parameters option)

3) Are you trying this scenario for learning purpose....or is it a project requirement?

If it is a project requirement then you dont need any Dynamic Configuration! The action that you are setting wont change at any point of time....it will be static and better to include it directly in the CC itself.

Regards,

Abhishek.

former_member187339
Active Contributor
0 Kudos

Hi Fernand,

>>But i am still wondering why i can't select "Keep Header" Option like Suraj mention in his reply ? If i selected the "Keep Header" option the interface failure ?

Are you saying that you have selected the keep header parameter and is running into error?

From help.sap

If you select Keep Headers then the header of the XI message is included in the Web service message.

Since by using DynamicConfiguration you were overwriting the header variable so i though we need to keep this thing checked.

Regards

Suraj

Former Member
0 Kudos

Hi Abhishek

Thank you for update. I just starting to explore PI 7.1.

Best Regards

Fernand

Former Member
0 Kudos

Hi Abhishek,

Thank you for your information.

Actually, The Business System is a external system that i have registered in the SLD become Business System. Since i couldn't found anymore "Business Service" in PI 7.1 EHP 1.

Cheers

Fernand

former_member200962
Active Contributor
0 Kudos
Since i couldn't found anymore "Business Service" in PI 7.1 EHP 1.

You even wont find it in PI7.1......it is replaced by Business Component

Regards,

Abhishek.

Former Member
0 Kudos

Hi Suraj,

could you help me to explain more detail the solution ? I am still confusing how to use the Variable Transport Binding and where i should put the java code ? is it in the java mapping ?

Best Regards

Fernand

former_member200962
Active Contributor
0 Kudos

If you are referring to the code provided in the link given by Suraj then it needs to be included in a UDF in your respective message mappings.

The technique is called Dynamic Configuration....and in your case you are dynamically configuring the SOAP Action....lots of blogs are available on SDN for this concept.

Just a doubt:

Because this Service interface pointing to 1 Business System 

Is it really a Business System (like RFC exposed as a Webservice) or is it a typo?

Regards,

Abhishek.

Edited by: abhishek salvi on Nov 18, 2009 1:29 PM