These steps help in sending Text as an attachment in RosettaNet.
1. Create an xml file, which follows the following dtd.
<!ENTITY % common-attributes "id CDATA #IMPLIED" >
<!ELEMENT B2BAttachment (Attachment*)>
<!ELEMENT Attachment (#PCDATA) >
<!ATTLIST Attachment Type CDATA #REQUIRED
ID CDATA #REQUIRED
Encoding CDATA #REQUIRED
Description CDATA #IMPLIED
FileName CDATA #IMPLIED>
2. Save the xml in UNIX FILE FORMAT. Here is the sample xml, which contains 2 attachments
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2005 sp1 U (http://www.xmlspy.com)-->
<B2BAttachment>
<Attachment ID="213123" Type="text/plain" Encoding="none" Description="Description">Sample Text message
</Attachment>
<Attachment ID="215123" Type="text/plain" Encoding="none" Description="Description">Sample Text message another
</Attachment>
<Attachment ID="215123" Type="application/pdf" Encoding="base64" Description="Description" FileName="Form.pdf">file:///C:/Form.pdf
</Attachment>
</B2BAttachment>
3. Edit the enq_3a4_req.properties to provide the file name for the "attachment" attribute
4. Provide directory name in tip.properties for the key "oracle.tip.adapter.b2b.AttachmentInboundDirectory" where the file will be stored in the inbound scenario.
5. Restart the server and enqueue the Message.
6. By Default oracle.tip.adapter.b2b.MimeType accepts only below types,
@ application/xml
@ application/octet-stream
@ application/EDIFACT
@ application/EDI-X12
@ application/jpg
@ image/jpeg
@ application/gzip
@ application/x-gzip
@ application/pkcs7-signature
If you want more options, Then you must modify tip.properties in
$ORACLE_HOME/ip/config directory to include your MimeTypes also, For example,
You want to include pdf attachments, Then your tip.properties would look like,
oracle.tip.adapter.b2b.MimeType=application/xml : application/octet-stream :
application/EDIFACT : application/EDI-X12 : application/jpg : image/jpeg :
application/gzip : application/x-gzip : application/pkcs7-signature :
application/pdf
Add a new content type such as application/pdf restart opmn and re-try testcase.
Wednesday, November 14, 2007
Attachment feature in RosettaNet using Oracle AS B2B 10g
Posted by Dheeraj Kumar M at 11:12 PM
Labels: Attachment, EBMS, RosettaNet
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment