on 08-31-2006 1:30 PM
Hi,
I have a scenario where I wish to build a dynamic URL for the HTTP Receiver Adapter. The URL will contain a customer number which is present in the mapping.
The help seems to suggest that this is possible :
<i>If you want to use an HTTP destination or URL set by the mapping, set the URL or HTTP Destination indicator. (The indicator displayed depends on the Addressing Type you selected above). If you set the indicator, the URL or HTTP destination set dynamically is called by HTTP.
If the message header does not contain the URL or the HTTP destination, and you have set the Fail If Adapter-Specific Message Attributes Missing indicator, the XI message is set to status System Error. If you do not set the indicator, the URL or HTTP destination defined statically in the communication channel is used.</i>
However, it is not very clear where the URL needs to be set dynamically.
Does anyone know how to achieve this ?
Cheers
Colin.
Colin,
This can be done using Message Mapping.
Eg coding in this link,
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
Let us know if you need any inputs.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check out this link
http://help.sap.com/saphelp_nw04/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/content.htm
See the adapter specific message attributes section.
Thanks,
Prakash
Hi,
This is useful as it tells me what needs to be set on the communication channel.
However where is the field TargetURL in the message mapping ? I would not expect it on the payload of the message as this would screw up the HTTP request wouldn't it ?
Help as I am now 99% there thanks to your excellent advice.
Cheers
Colin.
Colin,
you will have to use this code in your message mapping in any UDF,
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
http://sap.com/xi/XI/System/Http,
TargetURL);
conf.put(key, <b>"VALUEOFURL"</b>);
Regards,
Bhavesh
Message was edited by: Bhavesh Kantilal
hello to all,
We have a unique issue with one of our customers that is limited to 100 character URL. The current url is http://mycompany.com/sap/xi/adapter_plain?namespace=urn%3Agoodyear%2Ecom%3AAIT%3AInventoryCheck&inte...
Is there a way to have a URL like
http://mycompany.com/sap/xi/adapter_plain?namespace=urn%3Agoodyear%2Ecom%3AAIT%3AInventoryCheck
and then somewhere in the process add... &interface=AITInventoryCheck_Abs&service=HTTP_AIT_InvChk&QOS=BE&sap-client=010&sap-language=EN
So the data comes to an F5 through the DMZ to the SAP webdispatcher then to the SAP XI system.
Any ideas if this is possible or how you could start with a shorter URL?
Thanks,
Dede
Dede
Did you ever find a way to setup your dynamic URL?
We had the same issue where we did'nt want our trading partners need tochange the URL to include the service, namespace, and interface in their URL. Plus if the trading partner sends several messages, they need to change the URL for each interface thatthey want to send you via HTTP. We went and copied the HTTP handler , and made a change to read the content of the incoming XML message, and used a custom table to poplulate the service, interface , and namespace. I am interested in any other soulutions around this. We also used the SAP webdispatcher to forward the HTTP request to XI.
So now our trading partners can use a URL like:
http://mycompany/sap/xi/zcontent
our handler does the rest...
We have 2 XI teams one in the US and one in Europe. We have two different solutions. The one solution was to copy the class that is attached to the service in transaction SICF /sap/xi/adapter_plain... that looks up the namespace, interface name and the other parameters that are needed...
The other solution was they wrote a java servlet that process the URL and some information in the header of the XML message that tells if the transaction is an order inquiry, inventory lookup or create order.
I am not sure of more specifics.
Dede
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.