How can I to use XML Catalog for OSM 7.0.3?

I have a xquery that execute a business rules in view.When I put it inside Data Instance Behavior, tab Data, inline, and
XQUERY the deploy in OSM doesn't work because it is a large xquery, more than 4000 characters.
So, I saw in OSM 7.0.3 doc (Developer’s Guide,Release 7.0.3 - Using XML Catalogs in OSM) that there is a possibility
of import resources files (xquery file in my case) in OSM Data Instance Behavior through XML Catalog.
I executed the follow steps
1) Add entry
*<rewriteURI uriStartString="http://br.com.ctbc" rewritePrefix="osmmodel:///XQuery/1.0.0/resources"/>*
to my catalog.xml, which is in path <My_Cartridge>/xmlCatalogs/core/catalog.xml
2) Set XML_CATALOG_SUPPORT variable in Design Studio with "enable"
3)Add *<oms-parameter>*
*<oms-parameter-name>oracle.communications.ordermanagement.util.net.CatalogUriResolver.DefaultXmlCatalogsUris</oms-parameter-name>*
*<oms-parameter-value>file://<My_domin>/XQuery/catalog.xqy</oms-parameter-value>*
*</oms-parameter>* to oms-config.xml, after unpack osm.ear
4) Created a Data Instance Behavior, inline and type XQuery whith source
declare namespace ctbcoms = "http://br.com.ctbc";
let $result := ctbcoms:retorna()
*return <DadosOrdem><Fim>{$result}</Fim></DadosOrdem>*
The XQuery that has the method retorna() has name: catalog.xqy. Code:
module namespace ctbcoms = "http://br.com.ctbc.xquery";
declare function ctbcoms:retorna()
let $retorno := 'teste'
return $retorno
So, when I deployed my cartridge I get the mensage:
Error on line 2
XPST0017: Cannot find a matching 0-argument function named {http://br.com.ctbc}retorna()
<11-Jan-2012 6:40:47,906 VET PM> <WARN> <impl.e> <ExecuteThread: '14' for queue:
'oms.xml'> <failed to compile xquery expression for xqueryInstanceType: xquery[
declare namespace ctbcoms = "http://br.com.ctbc";
let $result := ctbcoms:retorna()
return <DadosOrdem><Fim>{$result}</Fim></DadosOrdem>
]>
; Line#: 2; Column#: -1
net.sf.saxon.trans.XPathException: Cannot find a matching 0-argument function named {http://br.com.ctbc}retorna()
I am using Design Studio 3.1.3 with OSM 7.0.3.
Could have I a example these procedure? thank you !!!

Two observations:
1) Your inline xquery expression need to use the "import" xquery module expression. see point a) in my example below.
2) the change in oms-config.xml is to support the case for overriding the cartridge xml catalog ( for example developer, qa tester, etc) so this step is not mandatory to get your cartridge working.
=============================
For example, In OSM Order To Activate Cartridges 703, the OrderLifeCycle, Amending State/Submit Amendment Transition has the following inline xquery which delegates xquery implementation details to a PoinOfNoReturn.xqy xquery module
a) Inline Expression in Design Studio Entity
CommunicationsSalesOrderFulfillmentPIP\Orders\POLICY\CommunicationsSalesOrderLifeCyclePolicy
import module namespace pipponrfn = "http://xmlns.oracle.com/communications/ordermanagement/pip/ponr" at "http://xmlns.oracle.com/communications/ordermanagement/pip/ponr/PointOfNoReturn.xqy";
let $taskData := fn:root(.)/GetOrder.Response
let $checkPointOfNoReturn := pipponrfn:checkPointOfNoReturn($taskData)
if ($checkPointOfNoReturn ..........
b) xquery module
module namespace pipponrfn = "http://xmlns.oracle.com/communications/ordermanagement/pip/ponr";
declare function pipponrfn:checkPointOfNoReturn($taskData as element()) as xs:boolean { ....};
c) cartridge xml catalog
CommunicationsSalesOrderFulfillmentPIP\xmlCatalogs\core\catalog.xml
<rewriteURI uriStartString="http://xmlns.oracle.com/communications/ordermanagement/pip/ponr" rewritePrefix="osmmodel:///CommunicationsSalesOrderFulfillmentPIP/1.0.0/resources"/>
=======================
Optinally if you have OSM 703.3 path you can use <oms-parameter><oms-parameter-name> in oms-config.xml if you need to OVERRIDE the cartridge xml catalog.
d) osm-config.xml
<oms-parameter>
<oms-parameter-name>oracle.communications.ordermanagement.util.net.CatalogUriResolver.DefaultXmlCatalogsUris</oms-parameter-name>
<oms-parameter-value>file:///<My_test_folder>/XQuery/catalog.xqy</oms-parameter-value>
</oms-parameter>
e) your developer xml catalog overrideing the cartridge catalog:
your_full_path_to_xml_catalog.xml
<rewriteURI uriStartString="http://xmlns.oracle.com/communications/ordermanagement/pip/ponr" rewritePrefix="file:///d:/your_full_path_to_test_folder"/>

Similar Messages

  • How can I define an XML schema for this kind of XML

    Hi, There:
    I want to generate an XML file like:
    <customer>
    </customer>
    <transaction>
    </transaction>
    <customer>
    </customer>
    which have multiple customer elements and multiple transactions as well, and they can happen in mixed sequence. Can any one give me some idea about how can I create an XML schema for this kind of xml? (<xsd:complextype> <xsd:sequence> ) seems not work)
    Thanks in advance
    David

    Use a group then make it a choice, like this;
    <xs:element name="Parent">
    <xs:complexType>
    <xs:group ref="Group" minOccurs="1" maxOccurs="unbounded" />
    </xs:complexType>
    </xs:element>
    <xs:group name="Group">
    <xs:choice>
    <xs:element ref="OptionOne" type="xs:string" />
    <xs:element ref="OptionTwo" />
    </xs:choice>
    </xs:group>
    <xs:element name="OptionOne">
    <xs:complexType>
    <xs:attribute name="name" type="xs:string" />
    <xs:attribute name="Type" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element name="OptionTwo">
    <xs:complexType>
    <xs:attribute name="name" type="xs:string" />
    <xs:attribute name="Type" type="xs:string" />
    </xs:complexType>
    </xs:element>
    This allows XML like this
    <Parent>
    <OptionTwo ........ />
    <OptionOne ........ />
    <OptionTwo ........ />
    <OptionOne ........ />
    <OptionOne ........ />
    </Parent>
    HH

  • How can i activate use cellular data for facebook

    how can i activate use cellular data for facebook

    pepaycustodio wrote:
    how can i activate use cellular data for facebook
    Settings > Cellular > Cellular Data: ON

  • My sprint service is off. How can I still use that number for iMessage with wifi instead of my apple id

    My sprint service is off. How can I still use that number for iMessage with wifi instead of my apple id?

    You can't. You can only use that number if you have active service.

  • How can (parse) i use XML file with missing EndTag

    hi,
    i have an application which writes an "XML file".
    another application should read that XML file, build an DOM and
    access the nodes with xpath.
    my problem. if the first application is not finished there are tags
    missing. e.g. </xml>. but the seconds application cannot wait until the first application finishes it task.
    if i now read the XML file the parser cannot load it because the end tags are missing.
    my question:
    how can i deactivate the check or how can i read the XML file and access it via XPath (my application is using at the moment XPath to access the nodes and i dont want to change that)
    as parser i am using XERCES
    alex

    As far as I know, you can't do this - xml must be well formed (this is sort of a bedrock of xml). There may be some work around's, but I'm not aware of any - and they would most likely be hacks.

  • How can a school use bulk purchasing for an inapp purchase product?

    If an app is free to start with an inapp purchase, how can a school purchase that app with bulk discounts?

    Obviuosly, I must have been wrong about having to use the ID for the app to show up as installed.
    But the way I see this situation - iTunes is telling you that the app is installed on the iPad - which it is - it detects the app on your device. But when you try to make an in app purchase with the new ID - iTunes will not let you do that because the app was not purchased with the new ID.
    Try the new ID again and see if t will accept it. I still think that even though iTunes knows the app is installed - it also knows that it was not purchased with the new ID.

  • How can I avoid using rollback segment for batch updates.

    I am currently trying to avoid associating a large amount of space for rollback segment as this gets filled up only during the nightly batch updates. All that space will never be used during the day. Hence want to know if there is any way of avoiding the use of rollback segment at the session level.
    Rajesh

    No, but what you can do is create a large rollback segment to use with your batch job, at the start of your batch job bring the segment online, then use set transaction to use that rollback segment, when the batch job is finished and committed, you can then bring the rollback segment offline.
    If you are really pressed for space, as an alternate plan, you could actually create the large segment before the batch job and drop it after.

  • HT4623 How can I update using the wifi for my iPad

    When I go to setting-general -then I don't see update software ,why

    You need to be on iOS5 or greater to update directly from the iPad.  If you're on iOS4, you need to update from iTunes on your computer.

  • I have ad Apple ID on my iPad , when I use the apple on my iPhone for the first time, I put in my Apple ID for the iPad, didn't work. Need to create a new one. Why? How can I just use my iPad ID on my iPhone?

    I have ad Apple ID on my iPad , when I use the apple on my iPhone for the first time, I put in my Apple ID for the iPad, didn't work. Need to create a new one. Why? How can I just use my iPad ID on my iPhone?

    Hi kamfong,
    Went to Settings where?
    If you want to use your exisiting Apple ID on your iPad, you need to:
    1.     Go to Settings>iTunes & App Store and sign out the new ID, and then sign on the old one
    2.     Go to Settings>iCloud, scroll to the bottom and delete the iCloud account, and the sign back onto iCloud using the old ID
    You still have not indindated why you are saying that using your old ID originally "didn't work". What do you mean by that? Did you get some sort of error when you tried to sign on with your exisiting Apple ID?
    Cheers,
    GB

  • How can I find my serial number for Adobe Acrobat 11. I got a new iMac and I don't want to use the new version at £18.00 per month. I don't need it. Thank you

    I used to use CS5 and I want to use the Acrobat version on my new iMac.
    How can I find my serial number for Adobe Acrobat 11.  I don't want to use the new version at £18.00 per month. I don't need it. Thank you

    Hi Anthony Aduhene
    Please refer : Find your serial number quickly

  • I have used Airport Time Capsule with my iMac for several years. I recently purchased a MacBook Air and when it tried to backup to Time Capsule it couldn't because Time Capsule is full. How can I now use the 3TB Airport Time Capsule to back up both?

    I have used Airport Time Capsule with my iMac for a couple years. I recently purchased a MacBook Air and when it tried to backup to Time Capsule it couldn't because Time Capsule is full. How can I now use the 3TB Airport Time Capsule to back up both the iMac and MacBook Air? I don't mind losing earlier backups. I have excluded some items from backing up, but since the Airport Time Capsule is full, I can't even begin to back up the MacBook Air.

    On your Mac.......
    Open Finder > Applications > Utilities > AirPort Utility
    Click on the Time Capsule icon, then click Edit in the smaller window that appears
    Click on the Disks tab at the top of the window
    Click Erase Disk
    On the next window that appears, select the Quick Erase option, then click Erase
    The operation will only take a few minutes.
    Now you are ready to start new backups of both Macs.  Back up one Mac first, then back up the other.  Do not try to back up both Macs as the same time.

  • I would like to send pics from my windows computer to my iPhone using bluetooth. I had it paired but somehow it cannot the download the software and is asking to usa a disk instead. Where or how can I download the software available for that, please reply

    I would like to send pics from my windows computer to my iPhone using bluetooth. I had it paired but somehow it cannot the download the software and is asking me to usa a disk instead. Where or how can I download the software available for that, please reply... thaks. (",)

    Bluetooth file transfer has never been supported with iOS devices.

  • HT4528 I have the 4s and i downloaded ios 8 but nowmy battery will drop from 100 to 0 in 30 mins without me using it. it has also happened to my sisters phone and our upgrade isnt until december. how can i get rid of ios8 for anyting else?

    I have the 4s and i downloaded ios 8 but nowmy battery will drop from 100 to 0 in 30 mins without me using it. it has also happened to my sisters phone and our upgrade isnt until december. how can i get rid of ios8 for anyting else?

    Downgrading the iOS is not supported.  Basic troubleshooting steps are restart, reset, restore from backup, restore as new device

  • HT201269 I have lost my iPhone 3GS. It was backed up to my computer using iTunes. I now have a new iPhone 4 series from a friend. How can I restore the backup information for my previous phone to the new phone?

    I have lost my iphone 3GS. It was backed up to my macbook pro using itunes. I now have a new iphone series 4 (china model). How can I access the backup information for my old phone and put it on my new one?

    Thank you again for all of your help!! I really appreciate it!
    I think I am following -- I was able to upload to my iPhoto and all photos and videos are there that is a plus! I tried to create an Event in my iPhoto and put all of my photos in that event but for some reason, now my iTunes it not recognizing that Event in my iPhoto. It is not allowing me to import just that event at the moment but I may be doing something wrong. At least all of my pics and vids are in iPhoto so that is a plus and I know they are at least saved somewhere. Just for some reason, my iTunes it not locating the event that I created with only those photos.
    Thank you for letting me know about my contacts! How do I know if I have the contacts app?
    Also, I had no clue that my iCloud could be backed up via cellular data! However, is this a new feature with the most updated iOS?? Unforutnatly I am like 2 iOS updates behind because I don't have enough storage on my phone. I still get the notification that my phone needs to be plugged in and connected to wifi in order to back up to the cloud :-(
    How can I sync using USB? Right now when i click on the info tab for my iPhone in my iTunes this is the answer that I get -- I am a little unclear as to what it means.
    Sync Contacts:
    Your contacts are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone
    Sync Calendars:
    Your calendars are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone

  • HT204053 How do you change apple id for icloud if phone is already set up. Need to give each phone in my account their own apple id for icloud so that we dont receive each others messages but can still all use same id for purchases.

    How do you change apple id for icloud if phone is already set up. Need to give each phone in my account their own apple id for icloud so that we dont receive each others messages but can still all use same id for purchases.

    Settings-icloud-scroll to the bottom, select delete, if you want to keep the content select keep, otherwise it'll remove it. Then once it is done add the account information for the account you want on that phone.  Your apple ID in settings-store will remain the same and each device can still purchase/use content from that account.

Maybe you are looking for

  • Domain Controllers not replicating

    Hi All Domain name: abc.com DC1 - Windows Server 2003 R2 (Physical Server) - 192.168.1.1 DC2 - Windows Server 2012 (Virtual Machine) - 192.168.1.2 Somehow DC1 doesn't replicated to DC2. netdom query fsmo's result: Schema master                DC1.abc

  • Problem upgrading from 10.6.4 please help

    Hi My daughter has a 2009 iMac intel. She recently got an iPhone5 and surprise surprise it's not compatible with her OS. She was on 10.6.4. I ordered Snow Leopard 10.6.8 update v1.1 and she tried installing it. It worked for about 2 hours then said c

  • First GarageBand import: resounding silence

    Torally wet-behind-the-ears Logic Pro 9 nooobie here. Wanted to move to Logic because GB keeps unpredictably and silently wiping real instrument files in the .band package. I'm sick of it and nobody on GB forums can explain why it happens or how to p

  • Overheating MacBook Pro 17" typically when high graphics requirements run

    I have a refurb MBP 17" with 2GB RAM, (1GB from Crucial), 120GB drive, glossy display. Everything on this machine runs fine, but if I watch a TV show from iTunes, or play Halo, the graphics load makes the temperature of the machine go through the roo

  • BLS Read Timeout

    I am creating a transactions that joins results from three separate xMII documents (two SQL queries and one xMII document built from an external xml file).  The three documents each have five columns and approximately 4000 rows.  When I execute the t