cancel
Showing results for 
Search instead for 
Did you mean: 

Read (and process) custom attributes from the SOAP header

Former Member
0 Kudos

Hi SOA experts,

I have generated a web service from a customer function module.

Regarding that I have two questions:

1.) Is it possible that the client calling this service adds custom attributes to the SOAP header of the web service call, or would that "break" the service within the application server?

2.) If it's possible, how can I read and "consume" this additonal custom attribute from the SOAP header in the underlying function module?

Thanks in advance for your help.

Kind regards, Matthias

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks!

Former Member
0 Kudos

Matthias,

A web service once published has a contract with all its consumers. A consumer can send information through the published input parameters only.

If the underlying implementation of service (in your case customer function module) can or need to access any information other than already published interface, then it will have to rebuild its interface and re-publish it. But this is not prefered as by virtue of publishing the service, you allow any consumer to consume the service without you being actively aware of it. Hence the other consumers using original service interface will break due to rebuilding of new interface. All these consumers will also need to be re-built.

Regards,

Vandana.

Former Member
0 Kudos

Hi Vandana,

I know what you mean, but that is not my question. The point is: can I read custom SOAP headers sent by the client with the request within the underlying FM (regardless of any import parameter)?

Kind regards, Matthias

Former Member
0 Kudos

no, you can't. Once your function module is executed the SOAP message has long been deserialized and only the relevant data being passed to it.

anton

Former Member
0 Kudos

Hello Anton,

thanks for your answer. That's not what I was hoping, but at least it answers my question. One more thing though: Is it possible to read custom SOAP header attributes with the help of XI (or other), or is there no such solution in the SAP standard world?

Kind regards, Matthias

Former Member
0 Kudos

Hi Matthias

Yes in XI it should be possible though I haven't tried it yet.

Please refer following URL

http://help.sap.com/saphelp_nwpi71/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm

Define Conversion Parameters

8. If the adapter is to expect a message without a SOAP envelope, select Do Not Use SOAP Envelope.

Also specify nosoap=true in the URL.

The adapter puts the whole message in the XI payload.

9. To include the header of the Web service message in the XI message, select Keep Headers.

10. To include attachments of the Web service message in the XI message, select Keep Attachments.

11. If the XI header information is to be included in the encoded string, select Use Coded Header.

12. If the XI header information is to be included in a query string, select Use Query String.

See point 9 above.

Regards,

Vandana.

Former Member
0 Kudos

Matthias,

Its very much possible in PI.

I see no reason why it should not be possible in esoa...

Former Member
0 Kudos

... you mean with normal function modules (as described above)?

What is "esoa", and how to read them?

Kind regards, Matthias

0 Kudos

Hi Matthias,

You can do it by using proxy protocol, But i am not sure if you can do it for FM also. Please refer below link for more information:

http://help.sap.com/saphelp_nw04/helpdata/en/3d/a41540904c8f5ce10000000a155106/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/frameset.htm

Regards,

Adish