OSB/ALSB: xquery transformation

Hi
I have xml of the form:
namespaceA="www.school.com/school"
namespaceB="www.teacher.com/teacher"
<namespaceA:School>
<namespaceA:Class>10th</namespaceA:Class>
<namespaceB:Teacher>John</namespaceB:Teacher>
</namespaceA:School>
I want to extract <Class> element, so in xquery i simply write expression and assign it to variable:
$body/namespaceA:School/namespaceA:Class so expected outcome is this : *<namespaceA:Class xmlns:namespaceA="www.school.com/school">10th</namespaceA:Class>*
However I get the following:
<namespaceA:Class xmlns:namespaceA="www.school.com/school" xmlns:namespaceB="www.teacher.com/teacher">10th</namespaceA:Class>
Now clearly I do not need namespace B declaration in the obtained sub-element <Class>.
How to stop inheriting these namespaces? I used expression : $body/namespaceA:School/@* , $body/namespaceA:School/node() But in vain.
Any ideas?

if you can ignore it, just ignore it. If it really irritates you, here in OSB How to remove a namespace that is located into the <soapenv:Body> you have a few solutions - I haven't tried them so it's up to you to experiment.

Similar Messages

  • Convertion of String to XML node using Xquery transformation in OSB

    How to convert string to XML node elementusing a built in function using Xquery transformation in OSB?

    check this out - http://www.javamonamour.org/2011/06/fn-beainlinedxml.html
    if in SOA (BPEL & Mediator) you can use oraext:parseXML.
    you should thoroughly analyse where to implement your requirement as some good practices advise to implement more complex logic in SOA and leave OSB to only connect to the services' endpoints.
    Hope this helps,
    A.

  • How to call business service from xquery transformation in OSB ??

    Hi All,
    How to call business service from xquery transformation in OSB ??
    I need to assign the response variable of Business Service to a target element in XQuery Transformation Mapper file.
    It's urgent.
    Regards,
    Jyoti Nayak

    Transformation is to mapping the source and target of 2 different schemas.
    In your case you should have a XQuery transformation between, your Business Service output schema and the target schema.
    Thanks,
    Vijay

  • Problem with Xquery transformation in OSB

    hi,
    My scenario is that I have to break the data in a single tag of xml A, to populate multiple tags of xml B.I am using Xquery transformation and substring function to achieve this. The problem comes when i import the xquery resource in OSB and try to do the transformation in a proxy service it gives the following error
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382510</con:errorCode>
    <con:reason>
    *OSB Assign action failed updating variable "message": com.bea.wli.common.xquery.XQueryException: Error parsing XML: {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://www.example.org/data}data { {http://www.w3.org/2001/XMLSchema}anyType }*
    </con:reason>
    <con:location>
    <con:node>PipelinePairNode1</con:node>
    <con:pipeline>PipelinePairNode1_request</con:pipeline>
    <con:stage>stage1</con:stage>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    the configuration i have done in the proxy service is this::_
    Assign: [XQuery resource..] to [message]
    Delete: [.] in [body]
    Insert [$message] [as first child of][.] in [body]
    The Xquery resource is the .xq file that i have generated for Xquery transformation.
    and i m routing this proxy service to a business service that wud take the XML and dump it to my D drive using file protocol.
    Edited by: rahulc on Oct 12, 2010 12:40 AM
    Edited by: rahulc on Oct 12, 2010 12:41 AM

    My Xquery is this::
    (:: pragma bea:global-element-parameter parameter="$data1" element="ns0:data" location="data.xsd" ::)
    (:: pragma bea:global-element-return element="note" location="note.xsd" ::)
    declare namespace ns0 = "http://www.example.org/data";
    declare namespace xf = "http://tempuri.org/OSB_Try/tag_break/";
    declare function xf:tag_break($data1 as element(ns0:data))
    as element(note) {
    <note>
    <to>
    fn:substring(data($data1),
    1 ,
    6)
    </to>
    <from>
    fn:substring(data($data1),
    7 ,
    6)
    </from>
    <heading>
    fn:substring(data($data1),
    13 ,
    6)
    </heading>
    <body>
    fn:substring(data($data1),
    19 ,
    11)
    </body>
    </note>
    declare variable $data1 as element(ns0:data) external;
    xf:tag_break($data1)
    and my data is this::
    <?xml version="1.0"?>
    <ns0:data xmlns:ns0="http://www.example.org/data">DON'T FORGET ME THIS WEEKEND!</ns0:data>
    and i have tested this zquery for the above data and this is the transformation its doing::
    <note>
    <to>DON'T </to>
    <from>FORGET</from>
    <heading> ME TH</heading>
    <body>IS WEEKEND!</body>
    </note>
    Edited by: rahulc on Oct 12, 2010 1:57 AM

  • Is there a way to use a OSB variable into an XQuery Transformation?

    Hi,
    I´m trying to access to a variable that I declared in the OSB with an Assign, but I´m gettin and Error that the variabe is used but not declared, I also tried to use a OSB variable like $messageID and still have the same Error, has somebody used a previous declared variable into an XQuery Transformation?
    Thanx in Advanced!
    Kind Regards!

    Hi,
    In order to use a varible into a XQuery transformation you need to declare it as an input.
    When you are defining the source types (in the 'new XQuery Transformation' wizard) you should add the variable that you want to use.
    So if you assigned a variable called messageId and you want to use it in your message transformation using a XQuery resource you should add the following in the source types screen:
    - On the Available source targets click 'XML' and then select the xml message that you want to transform and click 'Add'
    - On the Available source targets click 'Simple' and then select 'string' and click 'Add'
    This should declare the xml that you want to transform and the variable that you want to use during the transformation.
    Hope it helps.
    Regards,
    Rodrigo

  • [ALSB 3.0] help help about xquery transformation

    Hi all,
    I should transform a xml doc from
    <val_date>20081004</val_date>
    <par>
    <key>rpp</key>
    <value>10</value>
    </par>
    <par>
    <key>curry</key>
    <value>CHF</value>
    </par>
    to
    <val_date>20081004</val_date>
    <par>
    <key>rpp</key>
    <value>10</value>
    </par>
    <par>
    <key>curry</key>
    <value transcoder="CURRENCY">CHF</value>
    </par>
    I'm using WorkspaceStudio but I've some troubles in my xquery transformation.
    I tried as below:
    <ns1:val_date>{ data($dummyProviderEvent/ns0:val_date) }</ns1:val_date>
    for $par in $dummyProviderEvent/ns0:par
    return
    <ns1:par>
    <ns1:key>{ data($par/ns0:key) }</ns1:key>
    if ($par/ns0:key="curry") then <ns1:value transcoder="CURR">{ data($par/ns0:value) }</ns1:value>
    else <ns1:value>{ data($par/ns0:value) }</ns1:value>
    </ns1:par>
    </ns1:dummyEvent>
    but is not working:
    i) WorkspaceStudio raises a warning at 'else' line with message "XML element does not match the target schema"
    ii) testing the transformation it seems that if condition is always true
    Could you help me to find out the correct solution ?
    Regards
    ferp

    I know there were some changes to the packaging of the public API in 3.0. You may want to be sure you include all the necessary jar in your classpath. I think there is another post in the forum covering this.
    Gregory Haardt
    ALSB Prg. Manager
    [email protected]

  • XQuery transformation in OSB

    Hi
    can any body tell how to make xquery transformation for the requirement like source as xml and target as schema,please provide related links if any
    Thanks
    Mani

    http://docs.oracle.com/cd/E13160_01/wli/docs10gr3/dtguide/
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/xquery.html
    Already a thread is available.
    sample examples for doing XQuery transformation within OSB
    Hope this helps.
    Thanks,
    Vijay

  • XQuery Transformation in OSB for array of values

    Hi,
    I have followed the below tuts on the OSB tutorial.
    http://www.oracle.com/technetwork/articles/jumpstart-for-osb-development-page--097357.html
    Everything works fine. Except for the "GetAllCustomer" branch node.
    Step1 : Configured the BusinessService invoking the exposed WebService at localhost:7001 --> it works & returns proper values, testing through both SOAP Ui & OSB business service.
    Step 2 : Similarly configured the Proxy services with XQuery Transformation in place. --> it works with no error but not returning any values.
    Step 3 : after configuring XQuery Transformation tested it through OEPE --> returns result as expected.
    Please suggest where am going ??

    use a for loop or position for this..
    please check the below threads, for the same..
    Re: Assign activity erros with XPath query string returns multiple nodes.
    Re: OSB:for-each action working procedure with a sample.

  • Convertion of XML node to string using Xquery transformation in OSB

    How to convert XML node to string using a built in function using Xquery transformation in OSB? In BPEL we have the Xpath extension function ora:getContentAsString() to do the same.

    fn:bea-serialize() function converts xml node to string. but it assigns namespace prefix in every xml node during the conversion. So is there any function to remove the namespace prefix from XML node using Xquery built in function?

  • OSB XQuery transformation help in Proxy Service

    Hi,
    Need help in transformation of the below input to a proxy service
    <soapenv:Body  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <InputParams>
         <queryParams>
           <quer:query-params  xmlns:quer="http://www.example.org/QueryParams">
            <param name="test51" value="val3353" />
            <param name="test1" value="val2" />
            <param name="test3" value="val3" />
            <param name="test4" value="val4" />
            <param name="test1" value="val1" />
            <param name="test1" value="val11" />
            <param name="test8" value="val33" />
            <param name="test1" value="val34" />
            <param name="test8" value="val33" />
            <param name="test81" value="val33" />
            <param name="test1" value="val333" />
            <param name="test38" value="val33" />
           </quer:query-params>
         </queryParams>
       </InputParams>
    </soapenv:Body> and want to have the below output after running the below XQuery transformation
    <ns0:mparams>
      <ns0:param name="test1" value="val2" />
      <ns0:param name="test1" value="val1" />
      <ns0:param name="test1" value="val11" />
      <ns0:param name="test1" value="val34" />
      <ns0:param name="test1" value="val333" />
    </ns0:mparams>this is the xquery transformation file
    (:: pragma  parameter="$InputQuery" type="anyType" ::)
    (:: pragma bea:global-element-return element="ns0:mparams" location="../xsd/TargetParams.xsd" ::)
    declare namespace ns0 = "http://www.example.org/QueryParams";
    declare namespace xf = "http://tempuri.org/Simple/transformation/listparams/";
    declare function xf:listparams($InputQuery as element(*))
        as element(ns0:mparams) {
            <ns0:mparams>
                { $InputQuery/ns0:params/param[@name="test1"] }
            </ns0:mparams>
    declare variable $InputQuery as element(*) external;
    xf:listparams($InputQuery)and here is the input to the above .qs
    $body/InputParams/queryParams/qp:query-paramsbut it's the output is always empty and here is what it comes out no matter what the input I give even tried the below inputs but no use
    $body/InputParams/queryParams/qp:query-params
    $body/InputParams/queryParamshere is the output it always prints when logging in the log file
    <quer:mparams xmlns:quer="http://www.example.org/QueryParams"/>Any help is appreciated.
    Thanks

    $InputQuery/ns0:params/param[@name="test1"]Input doesn't have a ns0:params node ..so the xpath here should be $InputQuery/param[@name="test1"]

  • Using XQuery Transformations

    Hi,
    I am new to OSB and have been trying my hand creating XQuery transformations.
    I have been getting the following error while testing the proxy service:
              (receiving request)
    Initial Message Context
    *          added $body*
    *     <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">*
    *     <ord:shipOrder      xmlns:ord="http://com/mycompany/order">*
    *     <ord:ord      xmlns:java="java:com.mycompany.order">*
    *     <java:City>string</java:City>*
    *     <java:FirstName>string</java:FirstName>*
    *     <java:LastName>string</java:LastName>*
    *     <java:OrderNumber>123</java:OrderNumber>*
    *     <java:PhoneNumber>string</java:PhoneNumber>*
    *     <java:PostalCode>string</java:PostalCode>*
    *     <java:ShippingType>ups</java:ShippingType>*
    *     <java:StateProvince>string</java:StateProvince>*
    *     <java:StreetAddress>string</java:StreetAddress>*
    *     <java:StreetAddress2>string</java:StreetAddress2>*
    *     </ord:ord>*
    *     </ord:shipOrder>*
    *     </soapenv:Body>*
    *          added $header*
    *     <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">*
    *     </soap:Header>*
    *          added $inbound*
    *     <con:endpoint      name="ProxyService$Shipping$proxy services$ShippingService_proxy" xmlns:con="http://www.bea.com/wli/sb/context">*
    *     <con:service>*
    *     <con:operation>shipOrder</con:operation>*
    *     </con:service>*
    *     <con:transport>*
    *     <con:uri>*
    *     /Shipping/proxy_services/ShippingService_proxy*
    *     </con:uri>*
    *     <con:mode>request-response</con:mode>*
    *     <con:qualityOfService>best-effort</con:qualityOfService>*
    *     <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>*
    *     <http:SOAPAction>""</http:SOAPAction>*
    *     </tran:headers>*
    *     <tran:encoding      xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>*
    *     </con:request>*
    *     <con:response      xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <http:Content-Type>text/xml</http:Content-Type>*
    *     </tran:headers>*
    *     <tran:response-code      xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>*
    *     </con:response>*
    *     </con:transport>*
    *     <con:security>*
    *     <con:transportClient>*
    *     <con:username>weblogic</con:username>*
    *     <con:principals>*
    *     <con:group>AdminChannelUsers</con:group>*
    *     <con:group>Administrators</con:group>*
    *     <con:group>IntegrationAdministrators</con:group>*
    *     </con:principals>*
    *     </con:transportClient>*
    *     </con:security>*
    *     </con:endpoint>*
    *          added $messageID*
    *2984534489141211043-6ec55042.129f907b433.-7fb0*
    *          RouteTo_ShippingTestService*
    Routed Service
    *          Route to: "ShippingTestService"*
    *     $outbound:*
    *     <con:endpoint      name="BusinessService$Shipping$business services$ShippingTestService" xmlns:con="http://www.bea.com/wli/sb/context">*
    *     <con:service>*
    *     <con:operation>shipOrder</con:operation>*
    *     </con:service>*
    *     <con:transport>*
    *     <con:mode>request-response</con:mode>*
    *     <con:qualityOfService>best-effort</con:qualityOfService>*
    *     <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <http:Content-Type>text/xml</http:Content-Type>*
    *     <http:SOAPAction>""</http:SOAPAction>*
    *     </tran:headers>*
    *     </con:request>*
    *     </con:transport>*
    *     <con:security>*
    *     <con:doOutboundWss>false</con:doOutboundWss>*
    *     </con:security>*
    *     </con:endpoint>*
    *     $body (request):*
    *     <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">*
    *     <ser:shipOrder      xmlns:ser="http://com/mycompany/shipping/services">*
    *     <ser:upsOrder>*
    *     <java:Adr      xmlns:java="java:com.ups.model">*
    *     <java:AddressLine1>string</java:AddressLine1>*
    *     <java:AddressLine2>string</java:AddressLine2>*
    *     <java:City>string</java:City>*
    *     <java:PostalCode>string</java:PostalCode>*
    *     <java:StateProvince>string</java:StateProvince>*
    *     </java:Adr>*
    *     <java:FName      xmlns:java="java:com.ups.model">string</java:FName>*
    *     <java:LName      xmlns:java="java:com.ups.model">string</java:LName>*
    *     <java:OrderID      xmlns:java="java:com.ups.model">123</java:OrderID>*
    *     <java:PhoneNumber      xmlns:java="java:com.ups.model">string</java:PhoneNumber>*
    *     </ser:upsOrder>*
    *     </ser:shipOrder>*
    *     </soapenv:Body>*
    *     $header (request):*
    *     <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">*
    *     </soap:Header>*
    *     $attachments (request):*
    *     <con:attachments      xmlns:con="http://www.bea.com/wli/sb/context"/>*
    Message Context Changes
    *          added $outbound*
    *     <con:endpoint      name="BusinessService$Shipping$business services$ShippingTestService" xmlns:con="http://www.bea.com/wli/sb/context">*
    *     <con:service>*
    *     <con:operation>shipOrder</con:operation>*
    *     </con:service>*
    *     <con:transport>*
    *     <con:uri>*
    *     http://localhost:7051/ShippingServices/Order*
    *     </con:uri>*
    *     <con:mode>request-response</con:mode>*
    *     <con:qualityOfService>best-effort</con:qualityOfService>*
    *     <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>*
    *     <http:SOAPAction>""</http:SOAPAction>*
    *     </tran:headers>*
    *     <tran:encoding      xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>*
    *     </con:request>*
    *     <con:response      xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <tran:user-header      name="X-Powered-By" value="Servlet/2.5 JSP/2.1"/>*
    *     <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>*
    *     <http:Date>Fri, 23 Jul 2010 09:05:25 GMT</http:Date>*
    *     <http:Transfer-Encoding>chunked</http:Transfer-Encoding>*
    *     </tran:headers>*
    *     <tran:response-code      xmlns:tran="http://www.bea.com/wli/sb/transports">2</tran:response-code>*
    *     <tran:response-message      xmlns:tran="http://www.bea.com/wli/sb/transports">Internal Server Error</tran:response-message>*
    *     <tran:encoding      xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>*
    *     <http:http-response-code>500</http:http-response-code>*
    *     </con:response>*
    *     </con:transport>*
    *     <con:security>*
    *     <con:doOutboundWss>false</con:doOutboundWss>*
    *     </con:security>*
    *     </con:endpoint>*
    *          added $transformMsg*
    *     <ser:shipOrder      xmlns:ser="http://com/mycompany/shipping/services">*
    *     <ser:upsOrder>*
    *     <java:Adr      xmlns:java="java:com.ups.model">*
    *     <java:AddressLine1>string</java:AddressLine1>*
    *     <java:AddressLine2>string</java:AddressLine2>*
    *     <java:City>string</java:City>*
    *     <java:PostalCode>string</java:PostalCode>*
    *     <java:StateProvince>string</java:StateProvince>*
    *     </java:Adr>*
    *     <java:FName      xmlns:java="java:com.ups.model">string</java:FName>*
    *     <java:LName      xmlns:java="java:com.ups.model">string</java:LName>*
    *     <java:OrderID      xmlns:java="java:com.ups.model">123</java:OrderID>*
    *     <java:PhoneNumber      xmlns:java="java:com.ups.model">string</java:PhoneNumber>*
    *     </ser:upsOrder>*
    *     </ser:shipOrder>*
    *          changed $body*
    *     <env:Body      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">*
    *     <SOAP-ENV:Fault      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">*
    *     <faultcode>SOAP-ENV:Client</faultcode>*
    *     <faultstring>*
    *     Failed to get operation name from incoming request*
    *     </faultstring>*
    *     </SOAP-ENV:Fault>*
    *     </env:Body>*
    *          changed $attachments*
    *     <con:attachments      xmlns:con="http://www.bea.com/wli/sb/context"/>*
    *          changed $inbound*
    *     <con:endpoint      name="ProxyService$Shipping$proxy services$ShippingService_proxy" xmlns:con="http://www.bea.com/wli/sb/context">*
    *     <con:service>*
    *     <con:operation>shipOrder</con:operation>*
    *     </con:service>*
    *     <con:transport>*
    *     <con:uri>*
    *     /Shipping/proxy_services/ShippingService_proxy*
    *     </con:uri>*
    *     <con:mode>request-response</con:mode>*
    *     <con:qualityOfService>best-effort</con:qualityOfService>*
    *     <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>*
    *     <http:SOAPAction>""</http:SOAPAction>*
    *     </tran:headers>*
    *     <tran:encoding      xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>*
    *     </con:request>*
    *     <con:response      xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *     <tran:headers      xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">*
    *     <http:Content-Type>text/xml</http:Content-Type>*
    *     </tran:headers>*
    *     <tran:response-code      xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>*
    *     </con:response>*
    *     </con:transport>*
    *     <con:security>*
    *     <con:transportClient>*
    *     <con:username>weblogic</con:username>*
    *     <con:principals>*
    *     <con:group>AdminChannelUsers</con:group>*
    *     <con:group>Administrators</con:group>*
    *     <con:group>IntegrationAdministrators</con:group>*
    *     </con:principals>*
    *     </con:transportClient>*
    *     </con:security>*
    *     </con:endpoint>*
    *          changed $header*
    *     <env:Header      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"/>*
    *          System Error Handler*
    *$fault:      *
    *     <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">*
    *     <con:errorCode>BEA-380001</con:errorCode>*
    *     <con:reason>Internal Server Error</con:reason>*
    *     <con:location>*
    *     <con:node>RouteTo_ShippingTestService</con:node>*
    *     <con:path>response-pipeline</con:path>*
    *     </con:location>*
    *     </con:fault>*
    Any pointers on why this error is occuring and what needs to be done to resolve it.
    Thanks
    Priya.

    Hi Eric,
    Sorry for the delay in responding.
    I tested just the XQuery with the payload I used in the example. It works perfectly fine. No errors or warnings were raised.
    Regards
    Priya.

  • How to execute a xquery transformation loaded dynamically

    Hi all,
    I wrote a simple java class that exposes a method for returning a xml string containing a XQuery transformation, let's say myXQ.
    Then I used a java callout action in order to execute this java class and store the result (that is myXQ) into a variable called myTransf.
    Now I would like to ask ALSB to execute this myTransf and I'm looking a way, through an assign action (or in another way), to specify to use myTransf as a XQuery resource.
    Is this possible ? Do you know a way to do what I'm looking for ?
    Regards
    Patrizio

    Hi,
    this should work :SQL> declare
      2  l_sql varchar2(100);
      3  l_result varchar2(30);
      4  begin
      5  dbms_output.put_line('before exec : '||l_result);
      6  l_sql := 'select to_char(sysdate,''yyyymmdd'') from dual' ;
      7  execute immediate l_sql into l_result ;
      8  dbms_output.put_line('after exec : '||l_result);
      9  end;
    10  /
    before exec :
    after exec : 20100917

  • Support of exslt in OSB/ALSB

    Hi,
    Does OSB/ALSb support extended xslt functions i.e exslt(http://exslt.org/functions)?
    When I tried to import/save an xslt having exslt functions, it gives an error
    An error occurred compiling the XSLT template: javax.xml.transform.TransformerException: weblogic.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of val.
    and the function is defined in xsl as :
    <func:function name="ctvf:convertToNumber">
    <xsl:param name="val"/>
    <xsl:variable name="strVal" select="string($val)"/>
    <xsl:choose>
    <xsl:when test="$strVal = 'NaN'">
    <func:result select="''"/>
    </xsl:when>
    <xsl:otherwise>
    <func:result select="$strVal"/>
    </xsl:otherwise>
    </xsl:choose>
    </func:function>
    where namespaces in the header are as:
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:func="http://exslt.org/functions"
    Thanks,
    Rajesh

    Hi all!
    Thanx for the answers! I have tried in the past the /text() I tried it again and didn´t worked, some body knows how can I post some screen shots so you can see that I´m using the /text() and maybe with the screen shot you can detect something, also I´m loging the $body in the default branch(cause it is not detecting the value between the tags it goes directly to the Defaul Branch) you will se some differences in the XML since I simplified the XML to make the example and tested this simplified XML it in the TEST Tool in the console and had the same results that with the original evendough I put the /text() at the end
    Here is the Body I loged in the default Branch:
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <imp:iniciarCambio xmlns:imp="http://bea.com/albpm/MMME/ImpactarCambiosClienteBILLING">
    <cambios xmlns:bea="http://bea.com/">
    <bea:ListaDeCambios>
    <!--1 or more repetitions:-->
    <bea:Cambio>
    <bea:campoNombre>Cambio1</bea:campoNombre>
    <bea:valorAnterior>antes</bea:valorAnterior>
    <bea:valorNuevo>despues</bea:valorNuevo>
    </bea:Cambio>
    </bea:ListaDeCambios>
    <bea:companiaId>32</bea:companiaId>
    <bea:companiaNombre>MMRedes</bea:companiaNombre>
    <bea:companiaTipo>Servicio</bea:companiaTipo>
    </cambios>
    </imp:iniciarCambio>
    </soapenv:Body>>
    as you can see it is Servicio and it should have gone to one of the branches instead of the default but it didn´t
    Can´t see what I´m doing wrong, but maybe some of you can.
    Thanx in advanced!
    Gerardo J

  • How to add all namespaces in root node of xquery transformation result?

    Hi,
    I'm using xquery Transformation in oracle service bus to transfrom output. The schema used for output transfromation has elements being imported from several schemas. so that output xml has these long tags with namespaces of repective schemas e.g.
    <rr:Get360ViewOfProductResponse      xmlns:rr="http://canaldigital.com/schema/product/CPMProductInformation/v2.0/">
    <ResponseHeader>
    <com:ResponseCode xmlns:com="http://broadcast.telenor.com/tsi/common/commonparameters_v1" >0</com:ResponseCode>
    <com:ResponseText xmlns:com="http://broadcast.telenor.com/tsi/common/commonparameters_v1" >0</com:ResponseText>
    </ResponseHeader>
    </rr:Get360ViewOfProductResponse>
    what I want to achieve is that all namespaces come once in the rootNode and all childnodes just use the repective prefixes, so that the xml size doesnt grow too large.Like below.
    <rr:Get360ViewOfProductResponse      xmlns:com="http://broadcast.telenor.com/tsi/common/commonparameters_v1" xmlns:rr="http://canaldigital.com/schema/product/CPMProductInformation/v2.0/" xmlns:pr="http://broadcast.telenor.com/tsi/common/program_v1">
    <ResponseHeader>
    <com:ResponseCode>0</com:ResponseCode>
    <com:ResponseText>0</com:ResponseText>
    </ResponseHeader>
    </rr:Get360ViewOfProductResponse>
    the difference is that ResponseCode and responseText should only use their prefix, and not complete namespace. How can i acheive this.
    Thanks in advance.
    Edited by: 856401 on Feb 9, 2012 1:53 AM

    I get error 'Invalid expression- Unexpected token copy-namespaces'. Is it supported by xquery version 1.0 ? Following is the updated xquery transformation which gives static error:
    xquery version "1.0" encoding "Cp1252";
    (:: pragma bea:global-element-parameter parameter="$get360ViewOfProductResponse1" element="ns5:Get360ViewOfProductResponse" location="../XSD/CPMSchema_v20.xsd" ::)
    (:: pragma bea:global-element-return element="ns6:Get360ViewOfProductResponse" location="../XSD/CPMSchema_v3.xsd" ::)
    declare namespace ns2 = "http://broadcast.telenor.com/tsi/common/displayinformation_v1";
    declare namespace ns1 = "http://broadcast.telenor.com/tsi/common/commonparameters_v1";
    declare namespace ns4 = "http://broadcast.telenor.com/tsi/common/Property_v2";
    declare namespace ns3 = "http://broadcast.telenor.com/tsi/common/ProductMain_v2";
    declare namespace ns0 = "http://broadcast.telenor.com/tsi/common/condition_v1";
    declare namespace ns9 = "http://broadcast.telenor.com/tsi/common/extension_v1";
    declare namespace ns5 = "http://broadcast.telenor.com/tsi/psd/cpm/CPMSchema_v20";
    declare namespace ns6 = "http://canaldigital.com/schema/product/CPMProductInformation/v3.0/";
    declare namespace xf = "http://tempuri.org/CPM_OSB_v3/XQuery/Get360ViewOfProductResponse/";
    declare namespace ns7 = "http://broadcast.telenor.com/tsi/common/productofferingpricewithrules_v2";
    declare namespace ns8 = "http://broadcast.telenor.com/tsi/common/pricecomponent_v2";
    declare copy-namespaces preserve, inherit;
    declare function xf:Get360ViewOfProductResponse($get360ViewOfProductResponse1 as element(ns5:Get360ViewOfProductResponse))
    as element(ns6:Get360ViewOfProductResponse) {
    <ns6:Get360ViewOfProductResponse>
    <ResponseHeader>
    <ns1:ResponseCode>0</ns1:ResponseCode>
    <ns1:ResponseText>{ data($get360ViewOfProductResponse1/responseDescription) }</ns1:ResponseText>
    </ResponseHeader>
    </ns6:Get360ViewOfProductResponse>
    declare variable $get360ViewOfProductResponse1 as element(ns5:Get360ViewOfProductResponse) external;
    xf:Get360ViewOfProductResponse($get360ViewOfProductResponse1)

  • OSB (ALSB) Logging Redirect

    Hi all,
    how to redirect all the OSB(ALSB) related message logs ( Errors and transport exceptions included ) to a log4j custom file.
    Now, given this discussion:
    alsb logging
    The way to go is, apparently, to
    1. create filters at domain level by subsystem (or context_id or whatever else)
    2. create a startup class to catch all log messages and to filter in only those ones you are interested in using, in your filter class, filters like " startsWith("ALSB)) " (equivalent of domain filter "Subsystem LIKE ALSB% " )
    Now given all the following list of OSB (ALSB) related subsystems
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/messages/indexa.html
    *Is there a better approach then creating a filter class per each subsystem ?*
    Regards,
    Tony P.

    There doesn't seem to be 64bit version of OSB at all for Windows. [http://download.oracle.com/docs/cd/E13196_01/platform/suppconfigs/configs_al10gr3/osb10gr3/overview.html]

Maybe you are looking for