on 05-19-2011 9:05 PM
Hi experts,
hope i have an easy question 4 you.
PI 7.1, i'm trying to bring a simple scenario to run: XML file -> (File Adapter) -> PI -> (File Adapter) -> csv file.
My Problem is that the xml file has no namespace and this produces an error in PI:
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_BlaBla_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_BlaBla_TGT. Values missing in queue context. Target
If I put namespace manually in the xml file, the scenario works fine.
After search for help, i had removed the namespace from the message type in the IR/ESB but this had no postive effect. I'll get an error without namespace in the file and it work's with the namespace.
Thanks for advice!
HI ,
in File Sender communication channel.. on Content Conversion tab have you provided namespace to field "Document namespace"..
Thanks,
Bhupesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Although the problem is already solved, here comes the clean solution:
In message type definition right below the data type specification there is a field called target namespace. this is filled by default. If your xml comes w/o namespace empty the field and it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andreas,
After search for help, i had removed the namespace from the message type in the IR/ESB but this had no postive effect. I'll get an error without namespace in the file and it work's with the namespace.
deleting standard xml namespace in message type was my first try but it doesn't worked. So i must took the "dirty" way because running out of time...
Not a really clean solution, working without Data and Message Types but it was a quick solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Write a small xsl mapping for adding the xml namespace tag, before the graphical mapping being executed.
please follow below for the code..assuming the namespace as "MT_Source"
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/">
<ns0:MT_Source xmlns:ns0="um:sap.com">
<xsl:copy-of select="." />
</ns0:MT_Source>
</xsl:template>
</xsl:stylesheet>
Thanks,
Ramana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for your suggestions. I'll got an tip from another PI Developer that works.
In Message Mapping where you can choose your Source Message Type you can also import XSD or XML-Files. So i select one of my example-xml-files without any namespace, complete the mapping and it works.
Not a really clean solution, working without Data and Message Types but it was a quick solution.
Regards,
Kay
Hi,
Please check if you have "No validation" option selected in your sender agreement.
If it still dosen't work, either you need to convince the sender to include the namespace in the xml or go for a custom adapter module in the sender adapter where you can include the namespace in the payload.
In the custom module, search for the start tag of your xml and include the namespace definition after the start tag.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.