OSB, action Replace

Hello!
I need for add '1' to value of "Value" in xml (800 -> 8001). Part of xml which i want edit is:
<multiRef id="id388">
    <key>NM_SCHEMA</key>
    <value>SCHEMA_NAME</value>
</multiRef>
<multiRef id="id389">
    <key>KD_REG</key>
    <value>800</value>
</multiRef>
When i try to replace then first i set XPath:
.//multiRef[key='KD_REG']/value
The question is: how i can use XQuery to replace node content with right value?

For Each [ multiRef ] in [ .//multiRef[key='KD_REG']] of [ body ]
Indexed by [ undefined Variable ] with total count in [ undefined Variable ]
Do (
Replace [ node contents ] of [ ./value ]
in [ multiRef ] with [fn:concat($multiRef/value/text(),'1')]
Work fine in my case.
fn:concat documentation - http://www.xqueryfunctions.com/xq/fn_concat.html

Similar Messages

  • OSB namespace replace

    Hi all...
    I have a webservice defined at OSB that has the following body:
    <get:Source xmlns:get="http://www.x1.com/esb/GetManufacturersRequest">string</get:Source>
    The namespace is not the actual namespace of the service I am calling, so, I want to use OSB to change it to:
    <get:Source xmlns:get="http://soa.x1.com/esb/GetManufacturersRequest">string</get:Source>
    I can't seem to figure out the right combination of actions to get this to occurr.
    Is there anyway to do this before the web service is actually called? Or, am I just stuck with the namespace the provider has selected?
    Thanks for any help!!!

    Thanks for the reply!
    If I could just beg one more moment of your time....
    The proxy is hosted at http://soa.x1.com/esb/GetManufacturersRequest
    The actual service called (via the business service) is at http://www.x1.com/esb/GetManufacturersRequest
    I want to change the data in the request (using soa.x1.com namespace) to www.x1.com (the actual service namespace) on the fly. This way I can make all namespaces, regardless of where the service may be hosted, relative to the soa.
    So, the problem is, I don't really know what to put in the rename function...
    The params are:
    XPath:
    In variable:
    Localname:
    Namespace:
    Maybe I have been a C programmer for too long, but, I don't know whether the XPath should be to the $body or to the actual element/attribute I want to modify. Furthermore I am not sure which of the two parameters LocalName/Namespace is used for the replacement value...
    I've looked (not endlessly, but, a lot) through the documentation and google for help/tutorials/api refs, but, I can't find much help on how to use some of the actions or the "bea" extensions to XQuery/XPath expressions...
    Thanks again...

  • Photoshop action replacing previous photo not saving new file

    I have multiple photos that I am running an action on but each photo is replacing the one before using the same file name. instead of using the original file name. So I end up with 1 edited photo!!! from the action!
    This is happening using cs5 I have not encounted this before.
    Any ideas?
    Rob

    Thanks R-Kelly
    I sorted as images imported via drop box were file named !!
    2012-10-15 00.13.26.jpg ,
    2012-10-15 00.14.15.jpg etc
    I think photoshop action could not work with the odd file naming???
    So re-imported using image browser with file names image_01.jpg, image_02.jpg etc and worked
    On cs5.1 on mac os x
    Thanks Rob

  • Action replace in message flow

    i try to change dynamically an email URI in message flow of a proxy service.
    so i use : <b>replace</b> ./ctx:transport/ctx:uri <b>in variable</b> outbound <b>with</b> "mailto:...."
    but it doesn't work, no change is made.
    is it normal ?

    Hi,
    I got it to work by using the insert action instead of reaplce: (if you print the value of outbound context variable, the uri element doesn't exist in that), so you have to insert, it can't do replace on a non-existent element)
    Insert
    <uri xmlns="http://www.bea.com/wli/sb/context">jms://localhost:7001/weblogic.jws.jms.QueueConnectionFactory/EchoServiceResponseQueue</uri>
    as first child of ./ctx:transport in outbound
    Letme know if it doesn't work.

  • OSB installation - replacing log4j with more newer version

    Hi,
    Is it safe to replace in production a log4j_1.2.8.jar file that is a part of OSB installation with a newer version - log4j-1.2.16.jar?
    We try using JBoss JMS client in the domain where OSB is installed, however it requieres at least 1.2.12 version of log4j.
    Thanks,
    Yuriy

    I wouldn't replace any library bundled with WebLogic. I would rather put new jar into the application and set prefer-web-inf-classes to true.
    http://download.oracle.com/docs/cd/E13222_01/wls/docs90/programming/classloading.html#1082452

  • Can mouse action replace the function of pressing ENTER?

    hi there,
    I would like to use the mouse click on the textfield to substitute the pressing <ENTER> action on the textfield, since i want the user to use mouse only but i don't have place to put button already. Is it possible to do so?
    thanks

    You can do it, but it wouldn't make for a very conventional user interface. Just add a mouse listener to the text field and respond to click events the same way you'd respond to the enter key being pressed.
    myTextField.addMouseListener(new MouseAdapter()
      public void mouseClicked(MouseEvent e)
        // Now do whatever you'd do if enter was pressed
    });However, this is poor GUI design.

  • OSB & fn:replace

    Hi all,
    I've a proxy of type Any XML Service that publishes the contents to another system.
    The xml contents is:
    <msg_asset>
    <name_list>
    <name lang="automatic">
    <normal>My Holding &#10;&#13;AG CHF (1111111)</normal>
    <short>My Hldg N</short>
    <long>My Holding AG CHF</long>
    </name>
    </name_list>
    </msg_asset>
    and I need to remove &#13; or to replace &#13; with a space because the target system is not able to process a multiline 'name'.
    I tried with
    fn:replace($message, '&#13;', '')
    but it is not working ...
    Do you have any suggestion ?
    kind regards
    ferp

    Hi Patrick,
    you're right :-) my sequence of characters to be removed/replaced has been interpreted by the forum !!!!
    The xml contents received as input is:
    <msg_asset>
    <name_list>
    <name lang="automatic">
    <normal>My Holding & #10;& #13;AG CHF (111111)</normal>
    <short>My Hldg N</short>
    <long>My Holding AG CHF</long>
    </name>
    </name_list>
    </msg_asset>
    The sequence of characters to be removed or replaced with a blank is:
    & #13
    without any space between & and #
    I add the space so you can see what is sequence of characters to be removed/replaced and so it is not interpreted by the forum.
    As I said I tried with
    fn:replace($message, '& #13', '')
    but it is not working.
    (Again the extra space between & and # has been added only to make sure you can see in the correct way my post).
    Thanks
    ferp

  • Service Callout Action in OSB

    Hi ,
    Good morning to all
    I have issue on osb service callout.
    1. i developed a synchronous service using bpel after that i invoke that service in osb as business service. my aim by using service callout action to call that service and get response.
    but the problem is how pass the osb input request to bpel input request and also how to transform the bpel response data to osb response data...
    Thanks and regards
    venky

    Venky,
    the problem is how pass the osb input request to bpel input request and also how to transform the bpel response data to osb response data...You can transform the OSB request structure to bpel service request structure using Xquery/Xslt transformations either by using replace action or assign action ( replacing the $body as per Bpel request format ) before sending the request to Bpel in service call out.
    And in similar manner after getting the response from Bpel service use Xquery/Xslt transformation & using replace action to transform bpel response back to OSB response format.
    Regards,
    Abhinav Gupta
    Edited by: Abhinav on Dec 5, 2012 11:49 AM

  • OSB Email Can't find wsdl for Proxy?

    Hi,
    OSB 11G
    Req: System A will invoke OSB Service and OSB should send an email.
    I have created a Business Service and Proxy Service for Email in OSB like:-
    Business Service:
    1.Selected Service Type as Message Service.
    2. Req Message Type as Text
    3.Select Protocol=Email ad gave End Point URI
    4. Selected SMTP Server .
    Proxy Service
    1. I created XML(for incoming request content in Proxy) and imported in my Proxy and selected http Protocol in Proxy.
    2. In Proxy, I created Route Node. In Route Node, I used Communication->Transport. and set the Transport Headers Subject as $body/ema:Email/ema:subject/text() =expression
    To as $body/ema:Email/ema:to/text() =expression.
    3. I added an action -replace with variable body and expression=$body/ema:Email/ema:content/text().
    Both Business and Proxy are working fine. But I cannot see WSDL for OSB Service? As I want this OSB Service to be called from System A.
    Thanks

    You will not find a WSDL for http type service.
    You have to create your own WSDL and create a WSDL based proxy service.

  • OSB Setting SOAP Body Id value in proxy service when calling out to another service

    I have a proxy service deployed in OSB.  I need to set the Id attribute value on the SOAP Body element to a specific value prior to invoking the business service.
    In the service callout I currently has  "Configure Payload Document" selected.
    Do I need to do an XPath / XQuery transformation in an Insert or Update message processing action in a prior step of the message flow before the callout to the business service?

    Suppose below is your request you are passing to Business Service :
    <math:input
    xmlns:math="http://www.math.org">
        <math:inp1>100</math:inp1>
        <math:inp2>1</math:inp2>
        </math:input>
    Now before passing it to BS you need to change the value of inp2 to let say 200.
    So just before service callout , add a replace action
    Replace [ node contents ] of [ ./math:input/math:inp2 ] in [ body ] with [ 200 ]
    Your new request will become:
    <math:input
    xmlns:math="http://www.math.org">
    <math:inp1>100</math:inp1>
    <math:inp2>200</math:inp2>
    </math:input>
    Hope this helps.
    Regards,
    Karan
    Oracle Fusion Middleware Blog

  • OSB and WSDL response message

    Hi all,
    from the WSDL, that I put at bottom of this post, I've created a new OSB project importing the WSDL itself and creating a proxy service based on it.
    I've implemented it using the fn-bea:execute-sql function:
    <ctx:route><ctx:service>{   
    fn-bea:execute-sql (
    $myDataSource,
    'resultset',
    'SELECT id, name, type_id, domi_country_id, open_date, close_date FROM myTable WHERE id=?',
    xs:string($body/urn:clientDataLookup/portfolioNumber/text())
    }</ctx:service></ctx:route>
    For getting the response, in the pipeline reponse I added a REPLACE action:
    Replace [ node contents ] of [ . ]
    in [ body ] with
    [ <urn:clientDataLookupResponse>
    <xmlCntent>{ $result/con:service/resultset }</xmlCntent>
    </urn:clientDataLookupResponse>
    I deduced the above xml response message using the OSB xquery wizard navigating through variable structure section and selecting $body - clientDataLookup (response) variable:
    $body/urn:clientDataLookupResponse/xmlCntent
    from that xpath expression I deduced the above xml response message.
    My question: is that approach correct ? Why should I rewrite the xml response message ?
    I'm wondering how to allow OSB to generate the correct xml response message in automatic way and then use it as template and fill only the xmlCntent param.
    Thanks in advance
    ferp
    <definitions name="ClientDataLookup"
    targetNamespace="http://wsdl/ClientDataLookup.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://wsdl/ClientDataLookup.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="ClientDataRequest">
    <part name="buId" type="xsd:string"/>
    <part name="portfolioNumber" type="xsd:string"/>
    </message>
    <message name="ClientDataResponse">
    <part name="xmlCntent" type="xsd:string"/>
    </message>
    <portType name="ClientData_PortType">
    <operation name="clientDataLookup">
    <input message="tns:ClientDataRequest"/>
    <output message="tns:ClientDataResponse"/>
    </operation>
    </portType>
    <binding name="ClientData_Binding" type="tns:ClientData_PortType">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="clientDataLookup">
    <soap:operation soapAction="clientDataLookup"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:bsource:dataservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:bsource:clientdataservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="ClientDataService">
    <documentation>WSDL File for Client Data Lookup</documentation>
    <port binding="tns:ClientData_Binding" name="ClientData_Port">
    <soap:address
    location="http://localhost:8080/soap/servlet/rpcrouter"/>
    </port>
    </service>
    </definitions>

    In most common use cases a service bus transforms the messages from one format to other. In your case you are actually doing the same. You are transforming the message from database structure to the structure which is defined by the WSDL. The snippet you are using is not XML, its an XQuery snippet. There is nothing unusual about it. The tree structure in the left side is given for that purpose only, to facilitate writing XPaths and XQuery snippets. If you do not want to type anything and want to get it graphically (or example when its a big XML), use Eclipse IDE of OSB and create a XQuery transformation which you can call from OSB message flow.
    Edited by: AbhishekJ on Nov 11, 2011 12:57 AM

  • To replace standard smartform by a custom form, to be used in PRINT PREVIEW

    Hi,
    I have a requirement in CRM 2007 webUI. If we try to create a sales order, then we have a toolbar option button with title "PRINT PREVIEW". It uses the custom smart form "CRM_ORDER_CONFIRMATION_01.
    I have to replace this standard form by a Z custom form. This form has soem additional data required for business needs.
    Field technical details of the button is :
    1. Component Name-  BT115H_SLSO
    2. View   - SOHOverview
    3. Context Node - THTMLB
    4. Attribute- BUTTON_8
    5. Role key - BP_POW_USR
    6. Comp. Usage - CUBT Sales Order
    7. Object Type - BT115_SLSO
    Please reply as soon as possible.

    To figure this out you need to do the following:
    First determine the action profile for the transaction in question in the IMG.
    CRM->Transactions->Basic Settings->Define Transaction Types
    Display the detials of the transaction and you will see the action profile.  Next copy that action profile by using transaction SPPFCADM.  Then in the action defintion for the print action, replace the standard smartform definition with your z-form. 
    Finally go back into the transaction definition and assign the z-profile to your transaction type.  Please note you should only do this with "z-transactions".
    I'm not going to go into further detail as this is basic CRM configuration and is valid for all releases.  Please look at the best practices guides, or do a search in the CRM General and Framework forum for further information on how to do the configuration steps.
    Take care,
    Stephen

  • Can OSB proxy and business service act as a stub ?

    Hi all,
    would like to enquire whether I can achieve the following. I have a web service consumer. Can the consumer call a OSB proxy service and within the proxy service, I use XQuery and extract the body and perform some transformation. And the proxy service return variables to the consumer? Without calling any business proxy in the process
    Can the proxy service act as a stub? Would I need a dummy business service for it?
    Or my objective cannot be achieved in OSB?
    Appreciate any thoughts.

    Hi,
    Assuming the incoming body contains "name: Peter, age: 13". Can the return information contain "name:Peter, age:13, Status: N"Yes, it's possible too, in your Response XQuery Transformation u can add n number of additional fields, and send back to requester.
    You can do both Translations and Transformations.
    Can I also configure the proxy service not to call any business service?Have you made/generated your proxy service from existing Business Service?
    If yes,: then your message flow would have only Route Node ( routing to Business Service).
    1. To do transformations on request add a Pipeline Pair in message flow and inside it add stage for doing XQuery transformations.
    2. Use Reply Action in stage as last Actions and do reply with Success.( The message flow won't go to Route actions after this ).
    IF No : Then either remove the OSB Action which is being used to call Business Service.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Regards,
    Abhinav Gupta
    Edited by: Abhinav on Mar 8, 2013 3:27 PM

  • Osb proxy service calling other proxy services

    hi
    I'm new to the oracle service bus and i need some help
    i created 3 proxy services and i need to create one proxy service that call the other proxy services and return the output of these proxy services in one response message
    please help me in that problem. it'll be helpful to show me example
    thanks in advanced

    bear in mind that all exchanges amongst services are done by writing /reading the $body variable.
    The easiest way to produce a valid $body is to start from the preexisting $body and use the action
    replace <yourPayloadHere/> in variable $body
    using the option "replace node content"
    If you want to store a response from a service for later reuse:
    assign $body/* to myvariable

  • Can you export actions?

    I have recorded some actions in Photoshop and placed them in my own Actions group. I know they are there because I can use them when I open Photoshop but I am unable to find them anyplace on my system (I work on a Mac but I am not sure that is important). I was wondering if there was any way to either find those Actions or to export them to a file so they could be used someplace else (I had in mind importing them into Elements. I know that they might not work there but I wanted to try). So, is there any way to either find the actions I have created or to export them to an atn file?
    Thanks.

    > The flyout menu in the top-right corner of the palette is your friend...
    I checked that before I posted and there is nothing there that seems to help me. When I open the flyout menu I get stuff like New Action, New Set, Duplicate, Delete, Play, Start Recording, Clear All Actions, Reset Actions, Delete Actions, Replace Actions and a bunch of others, but nothing like export or save to file. Is there something I am missing here?

Maybe you are looking for

  • The number of details is not matching with the total count.

    Hi all, again stuck with the code. There is a form where i have to populate all the details of few tables in excel & there is a report where i have to make count of all these details. The problem here is the number of details that is populated in exc

  • Role Issue?

    Hi, I have created one role say SELECT_ROLE and now i want to add grant select on all the segments of XYZ schema to SELECT_ROLE. XYZ schema has 20,000 segments. How can i do this in one shot? DB version is 10.2.0.3 Thanks

  • IPhoto time and date problem

    I cannot change the time and date on pictures just imported.  So far I am back to 1795.  Is anyone else having this problem?

  • Can't catch the exception when transaction rollback ,BPEL/SOA 11G,updated!

    Hi Guys , I have two insert/update invoke actions through dbadpter in my BPEL process . When I set the GetActiveUnitOfWork property of those two db adapters to true ,it successfully makes the global transaction work . any of them failed will cause th

  • Mega 865 PRO graphics?

    Does anyone know if it is possible to disable the onboard graphics on a Mega 865 Pro?