on 06-02-2008 10:38 AM
Hello XI SDN'ers,
Does any one tried of reading or writing parameters to Header fields from Dynamic Configuration? If so, please advise me How to read and write the parameters.
Note: I am interested in parameters like SOAPAction, Cookie
Thanks & Regards,
Satish.
Could you check in message monitoring of RWB about the process?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
See above u have written value.a as Set_Cookie.
I guess it should be Set-Cookie.. and not with an underscore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what error do you get?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you set the Adapter Specific Message Attributes in the Advanced tab of the Communication Channel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for writing selecct Adapter specific message attributes
DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","THeaderSOAPACTION
");
other parameters are
1. Server URL (you can set the complete URL here) TServerLocation
2. Authentication Key TAuthKey
3.Proxy URL TProxyLocation
4.Proxy Authentication Key TProxyAuthKey
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already wrote an UDF to transfer (write) the cookie and SOAP action parameter to Dynamic Configuration, but I am unable to transfer (write) further to HTTP Header.
I added the respective Module in the communication chennel:
AF_Adapters/axis/HandlerBean
and their respective parameters:
handle.type: java:com.sap.aii.axis.xi.XI30DynamicConfigurationHandler
key.a: read http://sap.com/XI/SystemHTTP SetCookie
location.a: header
value.a: Set_Cookie
these steps are described in the following document:
but still I am facing problem.
Thanks & Regards,
Satish.
Hello Stefan,
I tried the way you described, I am still getting "NULL" value.
I did as follows:
Processing Sequence:
1 AF_Adapters/axis/AFAdapterBean afreq
2 AF_Adapters/axis/HandlerBean xireq----------------------O/B Handler
3 AF_Adapters/axis/HandlerBean dcreq---------------------- This is for Dynamic Configuration (write)
4 AF_Adapters/axis/HandlerBean rem------------------------- Header Removal handler
5 AF_Adapters/axis/HandlerBean dcres----------------------This is for Dynamic Configuration (read)
6 AF_Adapters/axis/HandlerBean trp--------------------------- HTTPSender
7 AF_Adapters/axis/HandlerBean xires------------------------O/BHandler
8 AF_Adapters/axis/AFAdapterBean afres
Module Configuration looks as follows:
handler.type java:com.sap.aii.axis.xi.XI30DynamicConfigurationHandler
key.a write http://sap.com/XI/System/HTTP SetCookie (here, I want to read the Set-Cookie field from HTTP
Response header, so I used "read" previously and also I am not sure of the "NameSpace", because the
namespace in my repository looks "http://sap.com/xi/XI/System/HTTP" )
location.a header
value.a Set-Cookie
If you have any other suggestions, please let me know.
Thanks & Regards,
Satish.
The dcres should be after trp. What stand rem for?
Could you use the TCPGateway to see, if the set-cookie is part of the HTTP stream of the response?
The namespace is the same as you use in the dynamic header (ASMA). YOu can use any namespace you like, but it must be the same in the mapping and in the handler bean.
Regards
Stefan
Hallo Stefan,
Previously "dcres" was after "trp" only, since you told, I changed the sequence... so it doesn't work either before "trp" or after "trp".
rem -> is used as Heade Removal handler. I kept "Keep XI Headers" as true, but my webservice doesn't need that chunk, so I removed the SOAP Header using "rem"
handler.type - java:com.sap.aii.axis.soap.HeaderRemovalHandler
namespace - http://sap.com/xi/XI/Message/30
I use same namespace in both configuration und design as "http://sap.com/XI/System/HTTP"
Moreover I am using "TCPGateway" only, there I am able to see the webservice response has "Set-Cookie" value, for example my HTTP response header looks as follows:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
Set-Cookie: JSESSIONID=E51D3FA7D8E597749490BD51B9403229; Path=/
Content-Type: text/xml;charset=utf-8
Date: Tue, 03 Jun 2008 06:27:42 GMT
Connection: close
any other suggestion from your side?
Thanks & Regards,
Satish.
Hello Stefan,
"How to Guide" which I referred has some errors and I pointed that to "Kenny Scott" administrator of SDN. Kenny replied me today, saying soon author of the document will amend a new dokument correcting the errors.
so if you are planning to have some test scenarios based on this "How to Guide" please pay attention to "Section 3.4 "
Thanks & Regards,
Satish.
Hello Stefan,
These are the errors I found in H2G.
Section 3.4, Point No.5, Page No. 9
Contradictory value is listed in Tabular column compared to the screen shot below. For example,
(1). Module Key "dcres" should be replaced to "dcreq"
(2). Parameter Name "Location.c" contains "header" as value in Tabular column but in the screen shot "context"
(3). Parameter Name "Value.c" contains "Cookie" as value in Tabular column but in the screen shot
"javax.xml.rpc.soap.http.soapaction.uri" again which one is correct value
regards,
Satish.
The screen shots are correct.
The parameters of the XI30DynamicConfigurationHandler are:
key.nn: action nsuri name
action = insert, delete, read, write
nsuri name = refers to ASMA
location.nn: context, header, message (only if action = read/write)
context = message context
header = http header
message = XI message header
value.nn: value
action = insert: constant value
action = read/write:
-> location = message: messageId, refToMessageId, correlationId
-> location = header: any HTTP header field
-> location = context: any message context attribute
The module works like this:
read: a value from header/context/message is written to ASMA
write: a value from ASMA is written to header/context/message
insert: a constant is written to ASMA
delete: a ASMA value is deleted
So I cannot see anything wrong with your configuration.
Make sure, that there are no additional trailing spaces.
Regards
Stefan
if you want to set a parameter using dyn conf see below code.Use it in the message mapping:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName"); //
//String filename= conf.get(key);
conf.put(key, fileName);
return fileName;
here i wanted to set the fileName from the source message.
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
Probably you will have to change this parameter to something with the cookie or SOAPAction one.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes i have tried for file adapter, which parameters do you want to write?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.