Oracle SOA Suite : import in xsl from mds location

In one of my xsl transformations i needed to import a generic xsl from the mds store.
For this i created a new jdeveloper application with a soa sar deployment descriptor and jar descriptor in it.

Contents of the jar :
[sourcecode language=”xml”]
SharedMDSResources/generic.xsl
[/sourcecode]

When i browse the mds repository i see the SharedMDSResources folder in the root of the tree (instead of in the apps folder).

For testing i deployed the jar manually in the EM.


In my xsl i use the next import :
[sourcecode language=”xml”]

[/sourcecode]

Resulting in the next stacktrace :

[sourcecode language=”xml”]
The following exception occurred while attempting to execute operation copy at line 389

This page contains the following errors:

error on line 7 at column 1: Extra content at the end of the document

Below is a rendering of the page up to the first error.

XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc(‘xsl/format_dates.xsl’, $csvXml).
The XPath expression failed to execute; the reason was: XML-22000: (Fatal Error) Error while parsing XSL file (oramds:/deployed-composites/default/mycomposite_rev1.0/xsl/my_process.xsl: XML-22002: (Fatal Error) Error while processing include XSL file (oramds:/SharedMDSResources/generic.xsl).)..
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.

com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate#262
com.collaxa.cube.engine.ext.bpel.common.BPELWMPHelper.evalFromValue#339
com.collaxa.cube.engine.ext.bpel.v1.wmp.BPEL1AssignWMP.__executeStatements#137
com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform#158
com.collaxa.cube.engine.CubeEngine._performActivity#2463
com.collaxa.cube.engine.CubeEngine.performActivity#2334
com.collaxa.cube.engine.CubeEngine.handleWorkItem#1115
com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal#73
com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage#220
com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory#328
com.collaxa.cube.engine.CubeEngine.endRequest#4350
com.collaxa.cube.engine.CubeEngine.endRequest#4281
com.collaxa.cube.engine.CubeEngine.createAndInvoke#679
com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke#654
com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke#293
sun.reflect.GeneratedMethodAccessor944.invoke



[/sourcecode]

Problem

Since i deployed the jar manually from within the EM the SharedMDSResources folder will not be created in the apps-dir but in the root of the tree.
The oramds imports can only import from within the apps folder structure.

Solution

When manually creating the jar archive make sure the contributor has the apps-directory already in the path

Path : d:\SharedMDS\apps\SharedMDSResources\

After the import the mds repository will contain the path ‘oramds:/apps/SharedMDSResources/generic.xsl’

Or keep the jar as it was (folder/file structure = SharedMDSResources/generic.xsl) and use the scripts from for example Edwin and setup the ‘mds.reposistory’ correctly (ending with the apps-directory in it).

example topfragment of a xslt we currently use (this is not the xslt mentioned in the blog, but just a working example with oramds import)
[sourcecode language=”xml”]







[/sourcecode]

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

5 Responses to “Oracle SOA Suite : import in xsl from mds location”

commenter

Hi Eric,

Did you manage to deploy xsl which includes xsl from oramds? Can you send me an example?

Many thanks,
Yuke

commenter

Hi Yuke,

Yes we do that in some of our composites and they deploy just fine.

I added this part “topfragment of the xslt” in the blog.

commenter

Hi Eric,

Thanks for your prompt response.

I also manage to get it working now, following your instructions. However, I wonder if you encountered the following issue with included XSL template being copied into the project when switched to design view.

https://community.oracle.com/thread/3520665

If that’s a Jdeveloper feature, wonder if there is a way to turn it off.

Many thanks,
Yuke

commenter

Hi Yuke,

What’s the filelocation of the xsl in which you do the oramds import ? Is this xsl in the soa content folder ?
I mostly use xmlspy to do my xslt testing and when it’s all done i change it to oramds imports

commenter

Hi Eric,

No, it isn’t. The XSL’s are in a different project. If you do your XSLT development in XMLSpy, then it would not be a problem. It will only become an issue when you view your XSL in design view in Jdeveloper, as described in the Oracle thread. It’s just bizzare.

Anyway, thanks for your help.

Cheers,
Yuke

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>