cancel
Showing results for 
Search instead for 
Did you mean: 

Reading parameters from Query string : Sender SOAP adapter.

Former Member
0 Kudos

Hello Experts,

I have a SOAP to SOAP scenario. Here we will have multiple receivers and dynamic receiver determination is needed.

The sender will send a Value in Query string of URL to sender SOAP adapter. This value in Query string parameter will decide the receiver at runtime.

I need to know, how can we read values from Query string of incoming call? I did tried to search blogs & forum threads but unfortunately not able to hit the right links.

Any inputs will be of great help.

Should i use "Use Query String" on sender soap channel? I tried it, but i was not able to find any query string parameters in SOAP header or payload.

Please guide me, its bit urgent.

Regards,

Abhi.

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor

> The sender will send a Value in Query string of URL to sender SOAP adapter. This value in Query string parameter will decide the receiver at runtime.

>

> I need to know, how can we read values from Query string of incoming call?

This is not possible and I recommend to use the standard way to transport values with SOAP protocol: Inside the SOAP message.

I do not understand why people try to put values outside the SOAP message.

Tell me, where you find URL parameters in this document:

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/

Former Member
0 Kudos

Hi Stefan,

I am trying to convince the client to send this Value in one of the fields in SOAP body/payload.

But the argument provided from their side is: They are using standard XSD and this service is provided out of box with sender application. They cant control the value mapping of parameters in payload to the extent required to implement this change.

Since they have this custom requirement of multiple receivers & receiver to be determined at runtime, they need to go for Query string.

I need to find a way to read the query string in any case.

Can I use one of the header paramters to be mapped to this value (By selecting "Use Query string" & "Keep Headers" flag in sender CC) & then extract this value from header using Dynamic configuration ? will it be possible to satisfy the customers requirement using this approach?

Kind Regards,

Abhijeet.

stefan_grube
Active Contributor
0 Kudos

> But the argument provided from their side is: They are using standard XSD and this service is provided out of box with sender application.

If they can add a URL parameter, they can also add a field to the structure.

> They cant control the value mapping of parameters in payload to the extent required to implement this change.

Adding a new field to the structure would not affect any existing mapping.

> Since they have this custom requirement of multiple receivers & receiver to be determined at runtime, they need to go for Query string.

This can be done based on any field of the payload.

> I need to find a way to read the query string in any case.

This is not supported by SOAP adapter.

> Can I use one of the header parameters to be mapped to this value (By selecting "Use Query string" & "Keep Headers" flag in sender CC) & then extract this value from header using Dynamic configuration ?

This feature works only for XI header fields, like message ID or QoS.

Not for individual parameters.

Former Member
0 Kudos

Hi Stefan,

I managed to convince the client to use one of the fields from main payload for passing this value which will be used for receiver determination. Your reply has helped me to put my points strongly infront of client. Thanks!

They have managed to pass this value concatenated along with user ID field which was the only field they had control on. Later on in PI I did a split on this field and then used first part for receiver determination and later was forwarded to target system.

But it will be nice to know a solution for using Query strings. Does HTTP adapter support this feature?

Kind Regards,

Abhijeet.

stefan_grube
Active Contributor
0 Kudos

> But it will be nice to know a solution for using Query strings. Does HTTP adapter support this feature?

Yes, the HTTP adapter allows to use up to 3 query parameters, which are transported to ASMA fields.

But the HTTP adapter does not unwrap the SOAP body, so this is not useful for a web service scenario.

In SOAP adapter you can read the HTTP header (not SOAP header) parameters and you might use this for your request, but in my opinion this is too error-prone. and of course no SOAP standard.

HTTP header parameters are used for examples for cookies.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

One possible way is using java mapping to read query string and retrieve the value. Since SOAP uses Http as transport protocol, you might use java class httpservletrequest and see how that helps.

Former Member
0 Kudos

Hi Bhaskar,

Thanks for replying. i will explore this option. Do you have any links to blogs/documentation in this reference.

Regards,

Abhi.