on 05-07-2008 11:20 AM
Hey!
I've been looking all over the forum for this issue. What I have seen is many good suggestions, but no one seems to have made this work.
I have tried with message mapping and TServerLocation, but when the scenario is executed, Target URL in the communication channel always overrides the suggested URL from the mapping.
Is is possible to do this dynamic configuration? Do I have to use HTTP adapter and create envelope with mapping instead? Anyone in here actually got this dynamic URL working?
Thanks a bunch!
regards Ole
Hi,
if you use dynamic url with https, the target url in cc has to be set to "https://".
Dear SAP:
Why is this not documented? Had to waste a whole day to find out about this issue/bug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Yugapreetha,
How did you do the mapping?
And did you put in CC Target Url: "http://"? (without the quote's) See my reply couple messages above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Issue solved!!!
It worked for me by filling "http://" for Target URL in CC.
Tested on:
PI 7.1 SOAP 7.1
XI 3.0 SOAP 6.40
XI 3.0 SOAP 7.00
Here is the code I've used and the CC settings:
//code #############################################
//Get the dynamic configuration from the container
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TServerLocation");
//Put the url value from the input in the configuration under the specified key
conf.put(key,varURL);
//return the data for mapping to the output
return varURL;
//code #############################################
Connection parameters:
Target URL: http://
[\/] Use Adapter-Specific Mesage Attributes
[\/] Variable Transport Binding
For SOAP adapter above 6.40
Variable Header (XHeaderX): Leave this empty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
Thanks for checking in so late..:) I have resolved the issue you are talking about here, but the problem goes further. I need there to be >10 possible dynamic receivers, but the adapter does initially only give me 10 possible Authorization Keys. I have tried to duplicate the adapter metadata and create my own adapter with >10 Authorization Keys, but that only create problems when activating - probably some cache stuff but don't know (works now and then but not everytime ). Have you had any problems with that as well? I thing it is strange when they give you the opportunity to have only 10 dynamic user-password with no simple way to extend this functionality...
I'll give you the points anyway, nice of you to drop an answer after 3 weeks and I should of course have set the message to answered...
Ole
Hi Ole,
My Requirement is like this: Target URL in the communication channel should be overriden by the suggested URL from the mapping.
1. Here is the dynamic URL configuration code:
"
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey parmValue=DynamicConfigurationKey.create("http:""/""/sap.com/xi/XI/System/SOAP", "TServerLocation");
conf.put(parmValue, SessionUrl);
return "";"
2. In CC -> Adapter Specific message attributes and Variable transport binding fields are checked.
Still I was not able to see the dyanamic cofiguration prameters in moni.
Please help me in that.I think this issue has been solved for you...
Regards,
Yuga
Hey
First thing I notice is this:
You have written : ("http:""/""/sap.com/xi/XI/System/SOAP", "TServerLocation")
Instead of: ("http:/"+"/sap.com/xi/XI/System/SOAP","TServerLocation"). -> Don't think this matters but you can check it out.
In my case I have also used: conf.put(parmValue, targetUrl);
You are using conf.put(parmValue, SessionUrl);
Check these out first. If not, maybe it could be something in the configuration. Tell me if that does not work.
Regards Ole
Hello Cengiz Aytemir,
I am stuck with a similar issue that you faced earlier. I've configured the scenario as you have suggested (Both the UDF and the CC settings). I've hard coded the Target URL as http://
I can see the dynamic URL set correctly in the MONI but the request that I am sending is not reaching the web service.
Below is the error that I am getting:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>RecoverableException</code>
<text>com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:453)
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:131)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:834)
at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
When I hard code the Target URL as Test, the error that I get is different. (Detailed error shown below)
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>RecoverableException</code>
<text>com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: no scheme
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:453)
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:131)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:834)
at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
I am on PI 7.0.
Any help in this regard is highly appreciated.
Best Regards,
Vijay
Hello Ole,
Have you got this working? I've the same problem aswel, also tried it on PI 7.1 without success.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure that you check both attributes in the channel:
- Use Adapter-Specific Mesage Attributes
- Variable Transport Binding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
Jepp that is done. Have you managed to get this working? I've tried with different static URL's just to have something in the mandatory field and the response is always related to the static URL.
I can see in the monitoring that the TServerLocation is set with the correct dynamic URL, but it still does not work..
Ole
Have you checked in SXMB_MONI if there is a dynamit configuration header in the message after the mapping?
It shoul look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- Response -->
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="TServerLocation">URL</SAP:Record>
</SAP:DynamicConfiguration>
Check for correct spelling.
Regards
Stefan
Hi Ole,
Why not leaving this field empty if you set it dynamically (I know, this could be a stupid question) ? Do you want to use this adapter in a static and dynamic way ?
Rgds
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey!
Thanks for answering. It is not possible to leave this field empty -> cannot save CC. I found a post where it was suggested to have only "http://" in the TargetURL field, but this does not work either...
I want to use this adapter in a dynamic way as there can be up to 400 different endpoints and avoiding all these scenarios would be nice..
Is it maybe possible to set the URL dynamically by writing an adapter module enhancement?
Ole
User | Count |
---|---|
83 | |
11 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.