on 03-23-2007 1:57 PM
Hello friends,
Is it possible to decide at runtime to which web application server the request should send to depending on one of field in sender file?
e.g in file adapter we could specify the file name at runtime. I am not sure whether would it be possible , becoz WSDL contains location tag specifying where webservice resides....
i would appreciate for any kind of help
thanks,
Pranav
Hi
Yes we can generate the dynamic URL. please see the below link
Dynamic configuration payload - https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Chandra for yor valuable response.
I have one doubt, How we would do this in case if i am planning to implement SOAP to RFC interface and i am using WSDL for webservice which contains the location tag specifying the target webservice.
DO you think the approach given for http would be uselful in this case as well???
thanks
Pranav
thanks Chandra,
but I am actually looking for dynamic target webservice determination.
correction : i wanted to implement RFC to SOAP ......and target URL i wanted to generate based on one field from sender data.
How could we achieve this..... does anyone has any idea for this?
Is it possible to call any webservice using http adapter ?
thanks
Pranav
Message was edited by:
pranav pandey
HI,
Yes it is possible to maitain the UDF to create the URL based on sender Data. see my links and also below link
RFC and SOAP scenarios-/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
Dynamic configuration payload - https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html
Dynamic Configuration of Some Communication Channel Parameters using Message Mapping - /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
Dynamic configuration in adapter modules - /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
Also see the below links for ref
RFC to SOAP
/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
/people/piers.harding/blog/2004/07/18/you-dont-need-to-use-soap-to-keep-your-rpc-clean
/people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
/people/david.halitsky/blog/2006/08/25/soa-vs-rfc-it-doesnt-have-to-be-charles-bronson-vs-henry-fonda
/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=rfc%20to%20soap%20scenario&cat=sdn_weblog
Regards
Chilla
><i>and target URL i wanted to generate based on one field from sender data.</i>
Have never tried this, but it should be possible using Adapter Specific Identifiers.
Check this link, and read the the Adapter Specific messge Attributes. The Target Url will be available under Server URL and like wise for SOAP action you can set dynamically.
http://help.sap.com/saphelp_nw2004s/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm
Regards
Bhavesh
Just tried setting the SOAPaction dynamically gfrom message mapping and this is how it is done,
1. In the Receiver SOAP adapter,Select options ,
a) Use Adapter Specific Message Attributes
b) variable Transport Binding.
c) Keep the SOAP action field empty.
2. In the message mapping use the following code to set the SOAP action dynamically,
String SOAPurl="http:/"+"/sap.com/xi/XI/System/SOAP";
DynamicConfigurationKey keyURL = DynamicConfigurationKey.create(SOAPurl,"THeaderSOAPACTION");
// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// set value
String SOAPaction="valueof soapaction";
conf.put(keyURL,SOAPaction);
Regards
Bhavesh
Hi Bhavesh,
I was working on a similiar sought of scenario, you have given hint to add the code for getting the dynamic URL for the Web service by posting dynamic SOAP action during message mapping. But where should these code be written, i mean we need to define a simple function and implement the same with this code ????, or use TRANSFORMATION function ??. Please advice. And for specifying the SOAP action do we need to import the WSDL from the reciever web service ?..
Thanks in advance.
Regards,
Rajesh
Rajesh,
Where you use this code depdends on how you will get the Soap Action.
1. If the SOAP action is going to be part of some field in the paylaod, then you will need to write a user Defined Function where the SOAP action is the input parameter and then use this code in the UDF.
2. If you know what the SOAP action is , ie , if it to be hradoced in the mapping program you can also use this code in the Java Section of your mapping ( initlialization or clean up section ).
Regards
Bhavesh
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.