on 12-03-2008 8:03 PM
Hello Experts,
Need ur help.
Right now i am working on the scenario Http -> to -> Proxy.
Whatever request i am getting is not having XML tag in it, and because of that my mapping is failing.
Can you tell me that how can i add XML tag in my request so it will not fail in Mapping?
Need to add : <?xml version="1.0" encoding="UTF-8"?> in request.
Thanks,
Hetal
Added the module in Receiver adapter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Hetal
Instead of adding this to the source message. Remove this tag from mapping.
Use a XSLT mapping without this initial tag. it will work.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://namespace">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<xsl:for-each select="//tag">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Use this mapping without
<?xml version="1.0" encoding="UTF-8"?>
If you still see XML tag then use
<xsl:output method="html"
instead of
<xsl:output method="xml"
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write an java map, put this map at the top of the in Interface Mapping.
use the code below.
public void execute(InputStream in, OutputStream out) throws com.sap.aii.mapping.api.StreamTransformationException
{
String inString = null;
String xmlRoot = "<?xml version="1.0" encoding="UTF-8"?>";
StringBuffer outString = new StringBuffer();
inString = (convert the InputStream in to String and assign to inString)
outString.append(xmlRoot);
outString.append(inString );
//Convert the StringBuffer to String.
out.write(outString.toString().getBytes("UTF8")); //Convert this String to OutputStream and send it out)
}
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.