on 08-16-2007 3:47 PM
Hi all,
Does someone know how to see the actual content of an attachment in sxmb_moni?
If I look under Inbound Message (CENTRAL)/Payloads, I would see one node for MainDocument and another node with the name of the attachment.
When I click on the attachment name, a word document shows with one line in it. That line is just the name of the attachment and nothing else.
How can I see the actual content of that attachment?
Thank you. Points will be awarded to helpful answers.
Regards,
-Michelle
Thank you for your help, all of you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, forgot to award points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The coding is correct. The content sent is actually the file name in hex. So, what we see in the content is correct.
Thanks to Manfred Reinart who recognized the hex string as 'Shots_swcv.doc'.
-Michelle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michelle,
Probably the mime type of the attachment is application/xml, and then when you click on it the browser try to open it.
To see the content of the attachement you need to download it (Right click on the attachment name -> Download).
Hope this help
Francesco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francesco,
I checked the mime type, it is application/msword.
So, if the document's name is 'abc.doc'. When I click on the attachment node in sxmb_moni, Word opens a word document, which I don't think it's the original doc. The document that is opened has one line in it says 'abc.doc'.
Best regards,
-Michelle
We are using XI adapter.
This is how the attachment is attached to the message in the backend before execute_synchronous is called:
* create an attachment protocol object from the proxy object
DATA lo_attachment_protocol TYPE REF TO if_wsprotocol_attachments.
lo_attachment_protocol ?= io_proxy->get_protocol(
if_wsprotocol=>attachments ).
* create an attachment object from the importing content, type and name
DATA lo_attachment TYPE REF TO if_ai_attachment.
lo_attachment = lo_attachment_protocol->get_attachment_from_binary(
data = iv_attachment_content
type = iv_attachment_mime_type
name = iv_attachment_name
).
* set the attachment
DATA lt_attachments TYPE prx_attach.
APPEND lo_attachment TO lt_attachments.
lo_attachment_protocol->set_attachments( lt_attachments ).
Hi Michelle,
yes, you have to use sxmb_moni to see the message generated by the abap proxy in the sender system.
You don't see any message because probably the integration engine in the sender system is not configured to show synchronous messages.
If you have the rights add the following parameter in SXMB_ADM -> Integration Engine Configuration -> Specific Configuration:
Category: RUNTIME
Parameter: LOGGING_SYNC
Value: 1
In this way you will be able to see next synchronous messages in the sender system
Best Regards,
Francesco
Francesco,
I configured the IE as you mentioned and ran the scenario again.
ThenI looked at sxmb_moni and found my entry this time.
In the manifest, there are two payloads:
- <SAP:Payload xlink:href="cid:payload-46C2749A8A334C3CE10000000A4248DE@sap.com">
<SAP:Name>Shots_swcv.doc</SAP:Name>
<SAP:Description />
<SAP:Type>ApplicationAttachment</SAP:Type>
</SAP:Payload>
- <SAP:Payload xlink:href="cid:payload-46C2749B8A334C3CE10000000A4248DE@sap.com">
<SAP:Name>MainDocument</SAP:Name>
<SAP:Description />
<SAP:Type>Application</SAP:Type>
</SAP:Payload>
The top one is my attachment. When I click on the item "Shots_swcv.doc" on the Payload tree, the same thing happened as when I did this in XI system. Word opens a document with a sentence "Shots_swcv.doc". And, that is it.
Best regards,
-Michelle
Francesco,
It seems that way to me too.
I will check my coding again, as you said and will get back to you if I still cannot find anything wrong with it.
Just one question: usually when one clicks the attachment node on the Payload tree, one should already see the content. Is this correct?
Best regards,
-Michelle
I checked my coding again in debug mode. I cannot find anything wrong.
I duplicate here my coding again.
*
DATA lo_attachment TYPE REF TO if_ai_attachment.
lo_attachment = lo_attachment_protocol->get_attachment_from_binary(
data = iv_attachment_content
type = iv_attachment_mime_type
name = iv_attachment_name
).
* set the attachment
DATA lt_attachments TYPE prx_attach.
APPEND lo_attachment TO lt_attachments.
lo_attachment_protocol->set_attachments( lt_attachments ).
The local variable LT_ATTACHMENTS has field payload-resource with the following expected values --
KIND : B
TYPE : application/msword
BINDATA : 00530068006F00740073005F0073007700630076002E0064006F00630020002000
The BINDATA correctly contains the dummy data I assigned.
I must have missed something. Can someone help?
Best regards,
-Michelle
Yes, I can download or I can just display the file. No problem there.
The problem is with the content. Either I download or display, the file content is just the name of the file itself.
It seems the name of the file get put into the content. But, it is not obvious to me how it happened, as you can see from my coding.
Thank you,
-Michelle
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.