on 11-02-2011 10:03 PM
Hi Gurus,
I used receiver mail adapter in my scenario.
I created the outbound Message Type as follows.
Mt_mail
From 0..1
To 0..1
Subject 0..1
Message 0...unbounded
and inbound Message Type is the mail XSD which I downloaded from SAP Service Marketplace.
Mail 1..1
encoding
Subject 0..1
From 0..1
To 0..1
Content 0..unbounded
The payload after mapping is follows.
<ns1:Mail xmlns:ns1=@http://sap/com/xi/XI/Mail/30>
<Subject>Status 64..error while posting idoc</Subject>
From>yyyyy.com</From>
<To>yyyyy.com</To>
<Content>you are receiving this mail as theer is a problem in the idoc</Content>
<Content />
<Content>Idoc number</Content>
<Content>PONumber12345</Content>
<Content>Date yyyymmdd</Content>
<Content>HHMMSS</Content>
</ns1:Mail>
The error occurred in the channel is below.
Delivery of mesage to the application using Mail_http://sap.com/xi/XI/System failed due to
com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException expecting end tag:
Mail,but found { } Content at state 1.
Can you please help resolving this error.
Thanks,
Jay.
> ns1:Mail xmlns:ns1=@http://sap/com/xi/XI/Mail/30
seems that you have done an incorrect XSLT mapping?
namespace has to be inside ""
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Grube,
I used Mail XSD as the external definition in the target side
If my Content tag contains text which should be displayed in multiple lines.
For excample.
<Content>First Line.Second Line.Third Line.Fourth Line</Content>
If I want to the text to be displayed in the email body as follows.
First Line.
Second Line.
Third Line.
Fourth Line.
Can you please tel me how I can achieve this.
Thanks,
Jay.
Hi Abhishek,
i used the same mapping in PI.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body bgcolor="blue">
</body>
<p>
<!strong>New message received</strong>
</p>
<p>
<ol>
<xsl:for-each select="/mt_file/recordset/data/line">
<!li value="0">
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ol>
</p>
</html>
</xsl:template>
</xsl:stylesheet>
When I tested this XSLT mapping,
I'm not the lines displayed in the HTML editor.
The test message I have given is below
<ns0:mt_file xmlns:ns0="http://access/prototypes/Mailwebservice">
<recordset>
<data>
<line>first line</line>
</data>
<data>
<line>second line</line>
</data>
<data>
<line>third line</line>
</data>
</recordset>
</ns0:mt_file>
I got ouput with heading new message and blue color and I am not getting teh value(first line second third line) in a list manner.
I also observed that there is no ABAP-XSL option in the interface mapping.I can only see XSL option in the message mapping.
For undersatnding purpose I have given exclamatory marks.
Please help.
Thanks,
Jay
Edited by: j r saithala on Nov 3, 2011 1:26 PM
Edited by: j r saithala on Nov 3, 2011 1:28 PM
this code works in my stylus studio:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body bgcolor="blue">
</body>
<p>
<strong>New message received</strong>
</p>
<p>
<!-- <ol> -->
<xsl:for-each select="//line">
<li value="0">
<xsl:value-of select="."/>
</li>
</xsl:for-each>
<!-- </ol> -->
</p>
</html>
</xsl:template>
</xsl:stylesheet>
if you want 1,2,3 instead of bullets then just uncomment <ol>
Hi,
Firstly, as you want to define the target From, To, Subject, etc... directly in your mapping (that's ok), you have to use the standard file "mail.XSD" providen by SAP inside an OSS note (see SDN post on Mail adapter to find which one.)
Secondly, If I'm not wrong, you can have only one target <content>, and not several, because the <content> correspond to your email body (sse outlook, or gmail or..., in an email there is only one body). So change the context, use concatenate or create a UdF in order to process your body (for instance by using HTML tag, to generate a nice email).
See SDN, as there are plenty of blogs, wiki on how the send an email with the xsd package
[SAP Help|http://www.google.fr/url?sa=t&rct=j&q=sap%20mail%20adapter%20package&source=web&cd=1&sqi=2&ved=0CCQQFjAA&url=http%3A%2F%2Fhelp.sap.com%2Fsaphelp_nw04%2Fhelpdata%2Fen%2F6b%2F4493404f673028e10000000a1550b0%2Fcontent.htm&ei=m8mxTqWZGcrasgaLr-1D&usg=AFQjCNFGX1MtyyfFfxZMYyge8mwNbb2xgQ]
[old pdf|http://www.google.fr/url?sa=t&rct=j&q=sap%20mail%20adapter%20package&source=web&cd=3&sqi=2&ved=0CDgQFjAC&url=http%3A%2F%2Fwww.sdn.sap.com%2Firj%2Fscn%2Findex%3Frid%3D%2Flibrary%2Fuuid%2F9e6c7911-0d01-0010-1aa3-8e1bb1551f05%26overridelayout%3Dtrue&ei=m8mxTqWZGcrasgaLr-1D&usg=AFQjCNENtNWQD3dWxhls22lW4fJ74Fpl9w]
[or in ...|http://sdn.sap.com]
regards
mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.