on 2013 Dec 17 6:53 AM
Hi All,
I'm working on IDOC to SOAP Scenario, where actual payload after mapping need to be sent as Attachment, and construct a new XML as Payload.
I'm using ASMA to send Content-Disposition,Content-Description with SOAP Adapter namespace. When I check in the TCPMon trace seems like ASMA is not filling up anything to the message.
We are running Decentral Adapter Engine PI 7.3 SP09
In addition I tried MessageTransformBean and PayloadSwapBean (swap the payload to attachment) then provide the Header parameters, Still no use.
But when I tried with our old PI 7.0 system it gives both the header parameters even though they were not provided neither in mapping nor in adapter. Can anyone suggest any options to get these parameters.
Appreciate your help.
Regards
Praveen K
Hi Praveen
Can you please share the udf code that you have written to set the Content-Disposition,Content-Description
may be the problem is with the code??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Indrajit,
Thanks for your Reply,
UDF for Content-Disposition:
//Updates the Content Disposition for a Input AdapterNamespace.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(AdapterNamespace,"Content-Disposition");
String strContentDisp = Content_Disp;
conf.put(key,strContentDisp);
return "";
Parameters passed to UDF are:
AdapterNamespace : http://sap.com/xi/XI/System/SOAP
Content_Disp: attachment; filename=005056B301EE1ED399DC09B5D2764158@sap.com.xml
Regards
Praveen K
Hi Praveen
I think we can not set content disposition using DynamicConfigurationKey.create(AdapterNamespace,"Content-Disposition");
Content disposition is not variable which we can set using UDF. I have found one more way to do that
in another blog but that is for mail adapter
Try and let us know if it works or not.
Hi Praveen
Also you can try the below UDF
String ContentType = "text/xml";
String CharSet = "UTF-8";
String fname = "005056B301EE1ED399DC09B5D2764158@sap.com.xml";
String CompositeContentType = ContentType + ";charset=\"" + CharSet + "\";filename=\"" + fname + "\"";
container.getOutputHeader().setContentType(CompositeContentType);
return "";
Hi Indrajit,
Thanks for your time and reply.
I had a look at this OutputHeader API in JavaDocs it has the flexibility of setting only the Content-Type, but doesn't have other methods like setContentDisposition() or setContentDescription().
I found Payload API which has these methods, let me give a try and see if I will be successful.
https://help.sap.com/javadocs/NW73EHP1/SPS09/PI/com/sap/engine/interfaces/messaging/api/Payload.html
Regards
Praveen K
Hi Indrajit,
Thanks for your time,
Content-Disposition is one of the parameter in MIME Content Fields, hence I think it can be set.
Else Transform.ContentDisposition/Transform.ContentDescription wouldn't be available in MessageTransformBean I suppose.
http://help.sap.com/saphelp_nwpi71/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
Regards
Praveen K
Hi Praveen,
Can you look into another option:
first create scenario from IDOC to file(XML)
& then pick that file as attachment and construct your require SOAP request asn send it with attachment.
Regards
Gagn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gagandeep,
Thanks for your reply and approach.
I tried this option though, Remove the check box Keep Attachments and see if SOAP adapter will send the payload and add the ASMA. Still no luck, It did remove the attachment as expected, but didn't add the ASMA to the Payload as provided in the UDF's.
I guess this would be the same case with the approach you suggested.
Regards
Praveen K
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.