on 2019 Jul 08 8:43 PM
Hi,
I have a scenario where I am getting data from a SOAP HTTP Service and need to create a file from the data that is inside the Payload. The challenge I am running into is with the filename. The SOAP Service is putting the filename of the file to be created in the header content-disposition field (attachment; filename="XXXXXXX.xml").
I have turned on the "Adapter Specific Message Attribute" in the SOAP Sender channel and getting the value in XHeaderName1 = CONTENT DISPOSITION) . The filename value also show up the Dynamic Configuration of the SOAP header when i check in SXMB_MONI. But I am unable to get the value from the Dynamic Configuration in the UDF that i have put in the message Mapping such that i can use it to create the filename.
The Dynamic Configuration shows me a value of
<SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="SHeaderCONTENT-DISPOSITION">attachment; filename="attachment; filename="XXXXXXXXXX.xml"</SAP:Record>
Has anyone grabbed the name from content disposition in the UDF.
Regards,
Arunava
Hi,
I suggest you to put screenshots while posting questions. I have doubt on the following
Doubtful on the above. It should have been
<"http://sap.com/xi/XI/System/SOAP", name="SHeaderCONTENT-DISPOSITION">attachment;filename="XXXXXXX.xml"
So hope you can give screenshot of this or verify this.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(“http://sap.com/xi/XI/System/SOAP“,”SHeaderCONTENT-DISPOSITION”);
String attFileName= conf.get(key);
//attFileName = attachment;filename="XXXXXXX.xml"
int start = attFileName.indexOf("=");
int end= attFileName.length();
String fileName = attFileName.substring(start+1,end);
return fileName;
Regard,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
8 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.