on 11-28-2008 4:23 PM
The XSLT-Mapping throwns the exception javax.xml.transform.TransformerException: Exception while loading External XMLSource in 'document': javax.xml.transform.TransformerException: com.sap.aii.ib.core.mapping.ResourceNotFoundException
The XSLT-function <xsl:value-of select="document('test.xml')//test"/> tries to use the XML document test.xml. But the system don't find this document and thrown an error.
The file test.xml is in the filesystem on the XI server. How can I correctly use this file? How must the path and the filename must be defined?
Thx
manuku
I am sure if that makes sense to use a local xml file in mapping.
Could you explain, what you want to do with this scenario?
When you want to access ressources on XI server, you should store this in a path, that is independed from SID, as this changes on transport to Q/A and Prod system. Create a folder something like /usr/sap/localfiles
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan
Thanks for your reply. I want to migrate an existing scenario from another middleware tool. And therefore I want to use the existing xslt mapping logic.
I copied the file test.xml in the directory /usr/sap. The file test.xml has all rights. But the xslt-command
<xsl:value-of select="document('/usr/sap/test.xml')//Import/Row[Field1=$KUNNR]/Field2"/>
thrown the error com.sap.aii.ib.core.mapping.ResourceNotFoundException.
Do you know the runtime directory during a xslt mapping. Perhaps I should store the file in this directory.
Do you have an idea? Works this scenario in general on XI?
Regards
manuku
The work directory of J2EE server is j2ee/cluster/server0
If you have more server nodes, you have to store your file in all of them.
I am not sure if you can access the file system in mapping, as mapping runs inside an EJB container.
Could you try using the XSLT mapping in the adapter? If you use an adapter in your scenario:
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]
I think Stefan is right, I'm not sure you can access "external" files within XSLT mappings ... If you just want to use the test.xml file as a mapping source for your test, why don't you load it in the interface mapping design tool, there is a test feature where you can load a file to test your transformation ?
Chris
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.