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

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...

  • 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

  • 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

  • OSB or Oracle ESB????

    Hi all..
    We know that oracle has two service bus's OSB and Oracle ESB....i heard in future releases of SOA Suite OSB gonna replace Oracle ESB..and
    Oracle ESB will behave something as mediator...Can someone explan wats the oracle statergy regarding these two products in future...also
    wch is best OSB or Oracle ESB...can someone throw light on this.

    Oracle ESB’s primary mission was
    to provide service mediation and application integration capabilities to SOA
    composite application developers. This use-case can be described as “in-line
    mediation” since it is used for transformation, routing and event delivery inside of
    what is logically a composite application.
    Oracle Service Bus on the other
    hand focused on solving the operations and scalability problems in a standalone
    service bus. Here the use-cases that it focused on were those of service
    virtualization, on-ramping and aggregation of external services and gateway
    functionality.
    By combining the respective strengths of Oracle ESB and AquaLogic Service Bus(Now OSB)
    in the Oracle SOA Suite platform, Oracle will enable all the common ESB usecases
    and provide unmatched flexibility and functional capabilities.
    The Mediator(OESB/ESB) is an intra-composite mediation component that is
    deployed within an application. It is responsible for brokering
    communications between components that make up a composite, enabling
    transformation, routing, event delivery and payload validation inside the
    composite. The main users of the Mediator are application developers
    assembling multiple components into a composite application which can
    be deployed, versioned and managed as a single deployment unit (all based
    on the SCA, or Service Component Architecture, standard). This is the
    component that all the Oracle Fusion Applications are leveraging, as well
    as AIA – the Oracle Application Integration Architecture. Oracle ESB
    seamlessly evolves into the Mediator in the 11gR1 release.
    The Oracle Service Bus provides standalone service bus capabilities,
    enabling separation of concerns between application developers and target
    systems or services. The main users of the Oracle Service Bus are
    integration developers and operations personnel. Their mission is to shield
    application developers from changes in the endpoint services or systems
    and to prevent those systems from being overloaded with requests from
    upstream applications. In the 10g and 11g releases, the Oracle Service Bus
    will also be augmented with key features from the current Oracle ESB,
    such as domain-value-map, cross-references, JCA adapters and a
    JDeveloper-based design-time. The Oracle Service Bus is based on
    Aqualogic Service Bus, with the incorporation of some of the advanced
    features from the Oracle SOA platform.

  • Stripping CDATA in OSB

    Hi there,
    I have an incoming message which has CDATA tag in it...
    Is there an easy way to stip the CDATA and just return the raw xml?
    I tried some osb/xquery replace... but it does not seem to work...
    [OSB Tracing] Entering stage stage1 with message context:
    [MessageContextImpl  body="<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><![CDATA[<PURCHASE_ORDER_150 partner="XXX" transaction="PURCHASEORDER" version="1.50" timestamp="2011-04-19T10:36:55" ...................
    ......_QTY_ORDERED></CONTROL></PURCHASE_ORDER_150>]]></soapenv:Body>"
    Thanks
    Ganesh

    (:: pragma bea:global-element-parameter parameter="$pURCHASE_ORDER_1501" element="ns0:PURCHASE_ORDER_150" location="GG_ORDER.xsd" ::)
    (:: pragma bea:global-element-return element="ns1:GGGetOrderResponse" location="GGGetOrder.xsd" ::)
    declare namespace ns1 = "http://www.sample.com/GetHttpOrder/GGGetOrder";
    declare namespace ns0 = "http://sample";
    declare namespace xf = "http://tempuri.org/GG_Order/asdasd/";
    declare function xf:asdasd($pURCHASE_ORDER_1501 as element(ns0:PURCHASE_ORDER_150))
    as element(ns1:GGGetOrderResponse) {
    <ns1:GGGetOrderResponse>
    <ns0:PURCHASE_ORDER_150>{ $pURCHASE_ORDER_1501/@* , $pURCHASE_ORDER_1501/node() }</ns0:PURCHASE_ORDER_150>
    </ns1:GGGetOrderResponse>
    declare variable $pURCHASE_ORDER_1501 as element(ns0:PURCHASE_ORDER_150) external;
    xf:asdasd($pURCHASE_ORDER_1501)
    Edited by: Ganesh on Apr 27, 2011 9:41 PM

  • Modify the contents of xquery resource using customization file

    I have a xquery resource that stores constants that are environment specific.
    Is there a way to use the 'customization file' feature in OSB to replace the contents of the file instead of having separate xquery resources for each environment ?

    You cannot do this using the customization feature..

  • Facing challenges in CCSID

    My OSB proxy service is reading UTF-8 encoding XML messages from an IBM WebSphere MQ and the XML has the following elements with special chars:
    <value>10% ֠15%</value>
    <value>This corrected report is issued to correct the Interpretation from Ӳ5 Ԡto Ԡ250 Ԯ There are no other changes to the original report.</value>
    When I opened my XML with N++ edition with UTF-8 encoding format it’s showing the following special chars: x96, x93, x94.
    Now the problem is OSB is replacing all these special chars with question mark symbol (?) while reading from IBM WebSphere MQ queue. How to avoid this behavior? Please advise.
    Thanks in advance

    Thanks.
    I assigned CCSID value to 1208 in MQ Connection resource still I am getting the following exception:
    Caused By: com.bea.wli.sb.sources.TransformException: Failed to parse XML text
         at com.bea.wli.sb.sources.XmlObjectSource.getInstance(XmlObjectSource.java:206)
         at com.bea.wli.sb.sources.XmlObjectTransformer.getXmlObjectSource(XmlObjectTransformer.java:199)
         at com.bea.wli.sb.sources.XmlObjectTransformer.transform(XmlObjectTransformer.java:111)
         at com.bea.wli.sb.sources.MetaTransformer.doTransform(MetaTransformer.java:138)
         at com.bea.wli.sb.sources.MetaTransformer.transform(MetaTransformer.java:89)
         at com.bea.wli.sb.pipeline.PipelineContextImpl$LazyInitTransformer.transform(PipelineContextImpl.java:1640)
         at com.bea.wli.sb.context.SOAPMessageImpl.parseCheckPayload(SOAPMessageImpl.java:1212)
         at com.bea.wli.sb.context.SOAPMessageImpl.generateBody(SOAPMessageImpl.java:1040)
         at com.bea.wli.sb.context.SOAPMessageImpl.getBody(SOAPMessageImpl.java:260)
         at com.bea.wli.sb.context.BodyVariable.getTypedValue(BodyVariable.java:106)
         at com.bea.wli.sb.context.BodyVariable.getTypedValue(BodyVariable.java:25)
         at com.bea.wli.sb.context.SystemVariable.getValue(SystemVariable.java:49)
         at com.bea.wli.sb.context.MessageContextImpl.getVariableValue(MessageContextImpl.java:202)
         at com.bea.wli.sb.stages.expressions.xquery.XQueryExprExecutor.getVariables(XQueryExprExecutor.java:182)
         at com.bea.wli.sb.stages.expressions.xquery.XQueryExprExecutor.executeJavaObject(XQueryExprExecutor.java:129)
         at stages.logging.runtime.LogRuntimeStep.processMessage(LogRuntimeStep.java:109)
         at com.bea.wli.sb.pipeline.debug.DebuggerRuntimeStep.processMessage(DebuggerRuntimeStep.java:74)
         at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
         at com.bea.wli.sb.stages.impl.SequenceRuntimeStep.processMessage(SequenceRuntimeStep.java:33)
         at com.bea.wli.sb.pipeline.PipelineStage.processMessage(PipelineStage.java:84)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.Pipeline.processMessage(Pipeline.java:141)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.PipelineNode.doRequest(PipelineNode.java:55)
         at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
         at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
         at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
         at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
         at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
         at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:375)
         at com.bea.wli.sb.transports.mq.InboundRequestWorkerThread.run(InboundRequestWorkerThread.java:141)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: org.apache.xmlbeans.XmlException: error: Illegal XML character: 0x1a
    org.apache.xmlbeans.impl.piccolo.io.IllegalCharException: Illegal XML character: 0x1a
         at org.apache.xmlbeans.impl.piccolo.xml.XMLReaderReader.read(XMLReaderReader.java:169)
         at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLexer.java:3477)
         at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:3962)
         at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
         at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
         at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
         at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3456)
         at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1331)
         at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1305)
         at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:360)
         at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:765)
         at com.bea.wli.sb.sources.XmlObjectSource.getInstance(XmlObjectSource.java:197)
         at com.bea.wli.sb.sources.XmlObjectTransformer.getXmlObjectSource(XmlObjectTransformer.java:199)
         at com.bea.wli.sb.sources.XmlObjectTransformer.transform(XmlObjectTransformer.java:111)
         at com.bea.wli.sb.sources.MetaTransformer.doTransform(MetaTransformer.java:138)
         at com.bea.wli.sb.sources.MetaTransformer.transform(MetaTransformer.java:89)
         at com.bea.wli.sb.pipeline.PipelineContextImpl$LazyInitTransformer.transform(PipelineContextImpl.java:1640)
         at com.bea.wli.sb.context.SOAPMessageImpl.parseCheckPayload(SOAPMessageImpl.java:1212)
         at com.bea.wli.sb.context.SOAPMessageImpl.generateBody(SOAPMessageImpl.java:1040)
         at com.bea.wli.sb.context.SOAPMessageImpl.getBody(SOAPMessageImpl.java:260)
         at com.bea.wli.sb.context.BodyVariable.getTypedValue(BodyVariable.java:106)
         at com.bea.wli.sb.context.BodyVariable.getTypedValue(BodyVariable.java:25)
         at com.bea.wli.sb.context.SystemVariable.getValue(SystemVariable.java:49)
         at com.bea.wli.sb.context.MessageContextImpl.getVariableValue(MessageContextImpl.java:202)
         at com.bea.wli.sb.stages.expressions.xquery.XQueryExprExecutor.getVariables(XQueryExprExecutor.java:182)
         at com.bea.wli.sb.stages.expressions.xquery.XQueryExprExecutor.executeJavaObject(XQueryExprExecutor.java:129)
         at stages.logging.runtime.LogRuntimeStep.processMessage(LogRuntimeStep.java:109)
         at com.bea.wli.sb.pipeline.debug.DebuggerRuntimeStep.processMessage(DebuggerRuntimeStep.java:74)
         at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
         at com.bea.wli.sb.stages.impl.SequenceRuntimeStep.processMessage(SequenceRuntimeStep.java:33)
         at com.bea.wli.sb.pipeline.PipelineStage.processMessage(PipelineStage.java:84)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.Pipeline.processMessage(Pipeline.java:141)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.PipelineNode.doRequest(PipelineNode.java:55)
         at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
         at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
         at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
         at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
         at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
         at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:375)
         at com.bea.wli.sb.transports.mq.InboundRequestWorkerThread.run(InboundRequestWorkerThread.java:141)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
         at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3488)
         at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1331)
         at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1305)
         at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:360)
         at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:765)
         at com.bea.wli.sb.sources.XmlObjectSource.getInstance(XmlObjectSource.java:197)
         at com.bea.wli.sb.sources.XmlObjectTransformer.getXmlObjectSource(XmlObjectTransformer.java:199)
         at com.bea.wli.sb.sources.XmlObjectTransformer.transform(XmlObjectTransformer.java:111)
         at com.bea.wli.sb.sources.MetaTransformer.doTransform(MetaTransformer.java:138)
         at com.bea.wli.sb.sources.MetaTransformer.transform(MetaTransformer.java:89)
         at com.bea.wli.sb.pipeline.PipelineContextImpl$LazyInitTransformer.transform(PipelineContextImpl.java:1640)
         at com.bea.wli.sb.context.SOAPMessageImpl.parseCheckPayload(SOAPMessageImpl.java:1212)
         at com.bea.wli.sb.context.SOAPMessageImpl.generateBody(SOAPMessageImpl.java:1040)
         at com.bea.wli.sb.context.SOAPMessageImpl.getBody(SOAPMessageImpl.java:260)
         at com.bea.wli.sb.context.BodyVariable.getTypedValue(BodyVariable.java:106)
         at com.bea.wli.sb.context.BodyVariable.getTypedValue(BodyVariable.java:25)
         at com.bea.wli.sb.context.SystemVariable.getValue(SystemVariable.java:49)
         at com.bea.wli.sb.context.MessageContextImpl.getVariableValue(MessageContextImpl.java:202)
         at com.bea.wli.sb.stages.expressions.xquery.XQueryExprExecutor.getVariables(XQueryExprExecutor.java:182)
         at com.bea.wli.sb.stages.expressions.xquery.XQueryExprExecutor.executeJavaObject(XQueryExprExecutor.java:129)
         at stages.logging.runtime.LogRuntimeStep.processMessage(LogRuntimeStep.java:109)
         at com.bea.wli.sb.pipeline.debug.DebuggerRuntimeStep.processMessage(DebuggerRuntimeStep.java:74)
         at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
         at com.bea.wli.sb.stages.impl.SequenceRuntimeStep.processMessage(SequenceRuntimeStep.java:33)
         at com.bea.wli.sb.pipeline.PipelineStage.processMessage(PipelineStage.java:84)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.Pipeline.processMessage(Pipeline.java:141)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.PipelineNode.doRequest(PipelineNode.java:55)
         at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
         at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
         at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
         at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
         at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
         at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
         at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
         at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:375)
         at com.bea.wli.sb.transports.mq.InboundRequestWorkerThread.run(InboundRequestWorkerThread.java:141)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

  • Replacing default namespace in OSB message flow

    I'm in the process of setting up a simple OSB proxy and could use some help figuring out how to change a default namespace in the response from the business service.
    The proxy and business service use different namespaces which we'll call "http://foo.com/namespace/proxy" and "http://foo.com/namespace/business". In my routing request message flow, the contents of $body look like this and I'm able to use a Rename action with XQuery expression "./sof:*" to change "http://foo.com/namespace/proxy" to "http://foo.com/namespace/business":
    <sof:Execute xmlns:sof="http://foo.com/namespace/proxy">
    <sof:adminName>MyAdaptor</sof:adminName>
    <sof:request>
    [escaped payload omitted]
    </sof:request>
    </sof:Execute>
    This works fine, but in the response message flow, I need to revert the namespace and am having difficulty because the response uses a default namespace instead of using a prefix:
    <ExecuteResponse xmlns="http://foo.com/namespace/business">
    <ExecuteResult>
    [escaped payload omitted]
    </ExecuteResult>
    </ExecuteResponse>
    If I define a prefix P2L in the expression editor to correspond to "http://foo.com/namespace/business", I'm able to reference the ExecuteResponse element as "./P2L:ExecuteResponse", but then I get stuck.
    If I try use a Rename action to change the namespace for "./P2L:*", only the ExecuteResponse element is renamed to <sof:ExecutResponse xmlns:sof="http://foo.com/namespace/proxy">. Upstream in the calling application, there's an XML stream reader exception because (I assume) ExecuteResult is not found and parsed.
    I also tried using a Replace action against "./P2L:ExecuteResponse/@xmlns" to replace its contents with "http://foo.com/namespace/proxy". I also tried "./P2L:ExecuteResponse/@P2L:xmlns". Neither worked.
    Can anyone tell me what I'm doing wrong, or suggest a different approach? Assume that changing the calling application or business service is not an option.
    Thanks!

    >
    If I define a prefix P2L in the expression editor to correspond to "http://foo.com/namespace/business", I'm able to reference the ExecuteResponse element as "./P2L:ExecuteResponse", but then I get stuck.
    If I try use a Rename action to change the namespace for "./P2L:*", only the ExecuteResponse element is renamed to <sof:ExecutResponse xmlns:sof="http://foo.com/namespace/proxy">. Upstream in the calling application, there's an XML stream reader exception because (I assume) ExecuteResult is not found and parsed.
    >
    You pattern "./P2L:\*" matches just one element so it's ok that the payload's namespace wasn't touched. If you want to rename namespace for all elements try "//P2L:*". However, I'm not sure whether this is what you want. Try do describe what you do, what you want and what you get instead.
    >
    I also tried using a Replace action against "./P2L:ExecuteResponse/@xmlns" to replace its contents with "http://foo.com/namespace/proxy". I also tried "./P2L:ExecuteResponse/@P2L:xmlns". Neither worked.
    >
    I think it's not a good approach to replace content of xmlns as this attribute is not a common xml attribute.

  • How to carry out Dynamic Replace action in OSb

    Hi all
    I want to do a dynamic replace in OSB.
    like
    Lets my input be :-
    <cli:AccountInquiryRequest xmlns:cli="http://client.accountInquiry.dto.cards.nab.cz.fc.ofss.com">
    <cli:requestUID>string</cli:requestUID>
    <cli:cardType>string</cli:cardType>
    <cli:AcctId>5</cli:AcctId>
    <cli:scr>AcctId</cli:scr>
    <cli:dest>requestUID</cli:dest>
    </cli:AccountInquiryRequest>
    So what i want to do is check for element name in <scr>(in this case AcctId) and then replace the contains of the <AcctId> with the contains of the element name given in <dest>(in this case its requestUID)
    so in this case i want to replace the contain of requestUID with AcctId .
    Please help !!!
    Thanks

    I think you need to determine the xpath used for replace at runtime.. You can try looking at xslt xalan:evaluate function for this.
    The function syntax is as :
    <xsl:value-of select="xalan:evaluate($XPath)"/>
    You need to construct $XPath to point to right xpath . e.g concat("$body/*:",$body/*:dest)
    This will make $XPath to = $body/*:requestUID
    You can then pass this xpath string to xalan:evaluate.

  • OSB replace action failed..

    very urgent help needed.
    Scenario:
    1. My proxy service (new wsdl based) calls business (legacy wsdl based).
    2. I want to transform input format from new format schema to legacy format schema.
    3. I write a Xquery and Replace ./* in variable body with Xquery. Binding variable is accepted as $body.
    4. Individually tested, works like a charm; but when proxy is exected-throws following error:
    BEA-382513: OSB Replace action failed updating variable "body": line 29, column 1: {err}XP0006: "element {http://schemas.xmlsoap.org/soap/envelope/}Body { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type element {http://myURL}SwapnilRequest { {http://www.w3.org/2001/XMLSchema}anyType }
    here myURL is namespace defined for input format "SwapnilRequest".
    In short, the content of variable "body" are not changed even after transformation.
    Please help.
    Thanks and Regards,
    Swapnil Kharwadkar.

    Dear Eric,
    Following is Xquery:
    (:: pragma bea:global-element-parameter parameter="$aMA_UpdateRQ1" element="ns0:AMA_UpdateRQ" location="AMA_UpdateRQ.xsd" ::)
    (:: pragma bea:schema-type-return type="ns1:ListOfAyLoyMemberPortalProspectTopElmt" location="AY%20LOY%20Member%20Portal%20Prospect_blore.wsdl" ::)
    declare namespace ay = "http://www.siebel.com/xml/AYRES%20Member%20Information%20–%20Long%20Portal";
    declare namespace com = "http://com.finnair";
    declare namespace asi = "http://siebel.com/asi/";
    declare namespace xf = "http://tempuri.org/GetNewCard_WithSiebel_XQuery/A_getProfile_Xquery/newResponse/";
    declare namespace pros="http://com.finnair/prospectProcessing/";
    declare function xf:A_blore_QueryByExample_Request($AMA_UpdateRQ as element(com:AMA_UpdateRQ))
    as element(asi:ListOfAyLoyMemberPortalProspectTopElmt) {
    let $AMA_UpdateRQ := $AMA_UpdateRQ
    return
    <asi:ListOfAyLoyMemberPortalProspectTopElmt>
    <ay:ListOfAyLoyMemberPortalProspect>
    <ay:Contact>
    <ay:Id>{ data($AMA_UpdateRQ/com:UniqueID/@ID) }</ay:Id>
    <ay:ContactId>{ data($AMA_UpdateRQ/com:UniqueID/@ID) }</ay:ContactId>
    </ay:Contact>
    </ay:ListOfAyLoyMemberPortalProspect>
    </asi:ListOfAyLoyMemberPortalProspectTopElmt>
    declare variable $AMA_UpdateRQ as element() external;
    xf:A_blore_QueryByExample_Request($AMA_UpdateRQ)

  • OSB, XSLT, Assign and Replace

    Hi
    We are using OSB and using Assign and Replace over our codes....
    Noticed 2 things:
    Using ASSIGN, created a non-referential variable.... (ie When I am working with a XML (ie $body), if I grab certain parts of it's element, the new variable is a copy of the element and its not a reference therefore any change in the variable does not reflect on $body)... Is this TRUE? Will using an XQUERY function/proc give me a referential context?
    Using a REPLACE/INSERT, the XPATH setting cannot accept a variable ie //targetlist/targetitem[{$idx}]/targetdata.... IS this TRUE? How can variables be used within XPATH?
    Regards,
    Dax

    >
    Noticed 2 things:
    Using ASSIGN, created a non-referential variable.... (ie When I am working with a XML (ie $body), if I grab certain parts of it's element, the new variable is a copy of the element and its not a reference therefore any change in the variable does not reflect on $body)... Is this TRUE?
    >
    This is correct. New variable is a copy of the element and its not a reference.
    >
    Will using an XQUERY function/proc give me a referential context?
    >
    Xquery will return a new thing. So, it will not give you a referential context.
    >
    Using a REPLACE/INSERT, the XPATH setting cannot accept a variable ie //targetlist/targetitem[{$idx}]/targetdata.... IS this TRUE? How can variables be used within XPATH?
    >
    Never tried this. Will have to check.
    By the way what exactly is the problem statement. What you want to do?

  • OSB Replace

    Hi,
    cant we do a replace action on the "fault" variable.
    I was trying this and couldnt do.
    Thanks.

    You can replace the values of $fault variable (for example - Replace ./ctx:errorCode in variable fault with '500'). But you can not change the structure of fault variable.
    $fault variable has a fixed defined schema and you can not replace its content with an XML which does not follow that schema. You can check the schema of $fault variable here:
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1060634
    Details section of $fault is of type xs:anyType and you can put any custom content there, apart from that you can change the values of errorCode and reason if needed.
    That is one way to send fault back, you can of course define a SOAP Fault if you are using a WSDL based service. Remember that you will need to replace contents of $body and NOT $fault with the SOAP Fault XML that you want to send back.

  • BEA-382513: OSB Replace action failed: bad value for type element anyType

    Hello, in OSB I get this strange error message on my XQUERY TRANSFORMATION.
    *<faultstring>BEA-382513: OSB Replace action failed updating variable "response":*
    com.bea.wli.common.xquery.XQueryException:
    *Error parsing XML: {err}XP0006: "*
    *element {http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5}Cs2DebitorOpVieCollection*
    *{ {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }":*
    bad value for type element
    *{http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5}cs2RechungungenResponse*
    *{ {http://www.w3.org/2001/XMLSchema}anyType }*
    *</faultstring>*
    I'm a pl/sql developer and I have no idea what this error message is telling me.
    In this forum I'v read someting about a wrong namespace declaration. I can't see any wrong value on my xml (ok, I'm not the specialist here...)
    Maybe someone of you xquey cracks might have a look at my code?
    This is what I have:
    _1.) a XQuery variable called cs2RechnungenResponse with this content:_
    <cs2:Cs2DebitorOpVieCollection
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:cs2="http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5">
         <cs2:Cs2DebitorOpVie>
              <cs2:f40Konto>333</cs2:f40Konto>
              <cs2:AMT_BEZEICHNUNG>Amt für Gesundheit</cs2:AMT_BEZEICHNUNG>
              <cs2:f40Belnr>555</cs2:f40Belnr>
              <cs2:f40Sohab>S</cs2:f40Sohab>
              <cs2:f40Dmbet>100</cs2:f40Dmbet>
              <cs2:f40Fadat>2011-05-05T00:00:00.000+02:00</cs2:f40Fadat>
              <cs2:f40Valut>2011-05-05T00:00:00.000+02:00</cs2:f40Valut>
              <cs2:f40Mahns/>
              <cs2:f40F40Sj>0</cs2:f40F40Sj>
         </cs2:Cs2DebitorOpVie>
    </cs2:Cs2DebitorOpVieCollection>
    _2. a xquery with this code:_
    (:: pragma bea:global-element-parameter parameter="$cs2RechnungenResponse" element="ns2:cs2RechnungenResponse" location="../adapters/cs2_adapters/xsd/CS2AdapterSelectOffenePosten_v0_5_table.xsd" ::)
    (:: pragma bea:global-element-return element="ns0:getDebitorRechnungResponse" location="../../interfaces/RechnungServiceTypes_v0_6.xsd" ::)
    declare namespace ns3 = "http://www.llv.li/common/types/v1";
    declare namespace ns2 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5";
    declare namespace ns1 = "http://www.llv.li/fin/types/v1";
    declare namespace ns0 = "http://www.llv.li/fin/services/rechnungService/v1";
    declare namespace xf = "http://tempuri.org/fin_sb/RechnungsService/transformations/CARI_CS_2DBAdpter_to_RechnungsServiceGetOffenePosten_v0_5/";
    declare function xf:CARI_CS_2DBAdpter_to_RechnungsServiceGetOffenePosten_v1_0($cs2RechnungenResponse as element(ns2:cs2RechnungenResponse))
    as element(ns0:getDebitorRechnungenResponse) {
    <ns0:getDebitorRechnungenResponse schemaVersion="0.6">
              if ($cs2RechnungenResponse/ns2:Cs2DebitorOpVie) then
              <ns0:debitorRechnungList>
         for $Cs2DebitorOpVie in $cs2RechnungenResponse/ns2:Cs2DebitorOpVie
         return
         <ns0:debitorRechnung>
              <ns1:peid>0</ns1:peid>
              <ns1:rechnungsnummer>{ data($Cs2DebitorOpVie/ns2:f40Belnr) }</ns1:rechnungsnummer>
              <ns1:rechnungsdatum>{ xs:date(fn-bea:remove-timezone-from-dateTime(data($Cs2DebitorOpVie/ns2:f40Fadat))) }</ns1:rechnungsdatum>
              <ns1:faelligAm>{ xs:date(fn-bea:remove-timezone-from-dateTime(data($Cs2DebitorOpVie/ns2:f40Valut))) }</ns1:faelligAm>
         <ns1:behoerde>{ data($Cs2DebitorOpVie/ns2:AMT_BEZEICHNUNG) }</ns1:behoerde>
         <ns1:positionList>
              <ns1:position>
                   <ns1:positionsnummer>1</ns1:positionsnummer>
                                                 <ns1:betrag>{ data($Cs2DebitorOpVie/ns2:f40Dmbet) }</ns1:betrag>
                                                 <ns1:waehrung>
                                                      <ns1:isoCode>CHF</ns1:isoCode>
                                                      <ns1:bezeichnung>Schweizer Franken</ns1:bezeichnung>
                                                 </ns1:waehrung>
              </ns1:position>
              </ns1:positionList>
         <ns1:status>offen</ns1:status>
              if ($Cs2DebitorOpVie/ns2:f40Mahns/text() > "") then
                   <ns1:mahnstufe>{ xs:int(data($Cs2DebitorOpVie/ns2:f40Mahns)) }</ns1:mahnstufe>
              else ()
         </ns0:debitorRechnung>
         </ns0:debitorRechnungList>
         else ()
    <ns0:resultatStatus>
         <ns3:code>Erfolgreich</ns3:code>
         <ns3:beschreibung>Rechnungen aus MFK fehlen</ns3:beschreibung>
    </ns0:resultatStatus>     
    </ns0:getDebitorRechnungenResponse>
    declare variable $cs2RechnungenResponse as element(ns2:cs2RechnungenResponse) external;
    xf:CARI_CS_2DBAdpter_to_RechnungsServiceGetOffenePosten_v1_0($cs2RechnungenResponse)
    _3. this should result in this response, but it doesn't_
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <v1:getDebitorRechnungenResponse schemaVersion="0.6" xmlns:v1="http://www.llv.li/fin/services/rechnungService/v1">
    <v1:debitorRechnungList>
    <v1:debitorRechnung>
    <v11:peid xmlns:v11="http://www.llv.li/fin/types/v1">333</v11:peid>
    <v11:rechnungsnummer xmlns:v11="http://www.llv.li/fin/types/v1">555</v11:rechnungsnummer>
    <v11:rechnungsdatum xmlns:v11="http://www.llv.li/fin/types/v1">2011-05-05</v11:rechnungsdatum>
    <v11:faelligAm xmlns:v11="http://www.llv.li/fin/types/v1">2011-05-05</v11:faelligAm>
    <v11:behoerde xmlns:v11="http://www.llv.li/fin/types/v1">Amt für Gesundheit</v11:behoerde>
    <v11:positionList xmlns:v11="http://www.llv.li/fin/types/v1">
    <v11:position>
    <v11:positionsnummer>1</v11:positionsnummer>
    <v11:betrag>100</v11:betrag>
    <v11:waehrung>
    <v11:isoCode>CHF</v11:isoCode>
    <v11:bezeichnung>Schweizer Franken</v11:bezeichnung>
    </v11:waehrung>
    </v11:position>
    </v11:positionList>
    <v11:status xmlns:v11="http://www.llv.li/fin/types/v1">offen</v11:status>
    </v1:debitorRechnung>
    </v1:debitorRechnungList>
    <v1:resultatStatus>
    <v11:code xmlns:v11="http://www.llv.li/common/types/v1">Erfolgreich</v11:code>
    <v11:beschreibung xmlns:v11="http://www.llv.li/common/types/v1">Rechnungen aus MFK fehlen</v11:beschreibung>
    </v1:resultatStatus>
    </v1:getDebitorRechnungenResponse>
    </soap-env:Body>
    </soapenv:Envelope>
    But I do not get this expectet result, all I get is the BEA-382513: OSB Replace action failed: bad value for type element anyType?
    Any help would be appreciated.
    Thanks
    Best regards
    rk

    cs2RechungungenResponse or cs2RechnungenResponse ? the error message says cs2RechungungenResponse, but the actual element is cs2RechnungenResponse (one less "u")

  • How to iterate through each node in REPLACE stage/XSLT transform/OSB

    I need to iterate through a xml document in a 'REPLACE' stage in a OSB message flow and have each <courseTemplate> transformed into a new xml document. The XSLT transform works correctly using the XSLT Resource Tester so I know the stylesheet works.
    ex: input data:
    <enterprise>
    <courseTemplate><sourcedId>100001-01</sourcedId><label><language>en-US</language><text>100001-01</text></label><title><language>en-US</language><text>Lower Division General Credit</text></title><catalogDescription><shortDescription>Lower Division General Credit</shortDescription><longDescription>Lower Division General Credit</longDescription></catalogDescription><courseNumber><language>en-US</language><text>XFCR 2999SA</text></courseNumber><status>Active</status><dataSource>CS</dataSource><extension><extensionField><fieldName>Mode</fieldName><fieldType>String</fieldType><fieldValue>C</fieldValue></extensionField></extension></courseTemplate>
    <courseTemplate><sourcedId>100001-02</sourcedId><label><language>en-US</language><text>100001-02</text></label><title><language>en-US</language><text>Lower Division General Credit</text></title><catalogDescription><shortDescription>Lower Division General Credit</shortDescription><longDescription>Lower Division General Credit</longDescription></catalogDescription><courseNumber><language>en-US</language><text>XFCR 2999TC</text></courseNumber><status>Active</status><dataSource>CS</dataSource><extension><extensionField><fieldName>Mode</fieldName><fieldType>String</fieldType><fieldValue>C</fieldValue></extensionField></extension></courseTemplate>
    </enterprise>
    1) the output data should look like:
    <enterprise      xsi:noNamespaceSchemaLocation="import_xml4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
         <group      recstatus="2">
         <sourcedid>
         <id>100001-02</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-02</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
    </enterprise>
    2) what is happening is the first node is being repeated:
    <enterprise      xsi:noNamespaceSchemaLocation="import_xml4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
    </enterprise>
    3) here is what I am using in the replace stage:
    XPath Expression Editor      : Request Pipeline - replace
    //enterprise/courseTemplate
    //enterprise/courseTemplate
    in variable: body with Xslt: SAIP_OSB_Requester/CourseTemplateSAIP_XSLT
    Input Document: $body
    Variable Names And Bindings: saipCourseTemplatesParam - $body
    4) can you see what I need to change?
    Edited by: user11960867 on Jul 5, 2011 10:58 AM

    Here is the stylesheet I am using. I wonder if it is wrong if I am working with each current node:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" indent="yes" />
    <xsl:variable name="saipCourseTemplates" />
    <xsl:param name="saipCourseTemplatesParam" />
         <xsl:template match="/enterprise">
              <enterprise xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="import_xml4.xsd">
                   <xsl:apply-templates select="courseTemplate" />
              </enterprise>
         </xsl:template>
         <xsl:template match="courseTemplate">
              <group recstatus="2">
                   <sourcedid>
                        <id>
                             <xsl:value-of select="sourcedId" />
                        </id>
                   </sourcedid>
                   <grouptype>
                        <typevalue level="4">Course Template</typevalue>
                   </grouptype>
                   <description>
                        <short>
                             <xsl:value-of select="sourcedId" />
                        </short>
                        <long>
                        <xsl:value-of select="catalogDescription/longDescription" disable-output-escaping="no" />
                        </long>
                   </description>
                   <relationship relation="1">
                   <sourcedid>
                   <id>Testing</id>
                   </sourcedid>
                   <label></label>
                   </relationship>
                   <extension>
                   <path></path>
                   </extension>
              </group>
         </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • Two styles for a native look (Flex Mobile App)?

    Hello, is it possible to use two styles/looks for the same App, that this one will look native on iOS AND on Android? Or will I have to build the same App twice to get this? - BB

  • No system disk appears on the desktop. Help please.

    No system disk appears on the desktop. Here all external drives. I rebootedholding the shift key. I have checked the Finder / Preferences / General is selected to show the hard drives, also in Finder / Preferences / Sidebar is selected. I have opened

  • Idoc partner type LI to File Scenario.

    Hello Experts . I have the following scenario. IDOC partner type LI to xml (file). So we are not atlking about logical system here and we may have to use parties. But I am not sure as to how to go about this approach. For now we have Idoc coming into

  • BAPI_PO_CHANGE : Payment Terms

    Hi, I have problems with BAPI_PO_CHANGE, the  Payment Terms  aren't updated. Some body has a suggestion, please! regards. Marisol.

  • How to change window sizes dynamically in smartform

    Hi, Dear ABAP Experts,         I need to show different materials current sales by comparing previous year’s sales (month wise) as a table and their difference in the form of chart( diagram). Can anyone share how to draw chats(rectangular boxes) in s