Transformation in osb

Hi,
I have a senario where i need to transform element in request packet.
EG. In the request packet I have a element <FullName>sam.sung</FullName>
In the response i need to change it to
<FirstName>sam</FirstName>
<LastName>sung</LastName>
How to go about it...any idea. we are using a wsdl to hit the required webservice.

You can do it in various ways using XQuery.
For ex. one way to do the same would be using tokenize function like suggested above.
<MyResponse>
          for $token at $index in fn:tokenize($body//FullName, '\.')
                return
          if ($index = 1)
          then
               <FirstName>{$token}</FirstName>
          else
               <LastName>{$token}</LastName>
</MyResponse>Or you can also implement it using substring functions:
<MyResponse>
     <FirstName>{fn:substring-before($body//FullName, '.')}</FirstName>
     <lastName>{fn:substring-after($body//FullName, '.')}</LastName>
</MyResponse>

Similar Messages

  • Error in transformation in OSB

    Hi all,
    I am getting following error in transformation in OSB console:
    <con:reason>
        OSB Assign action failed updating variable "PaymentRequestsPCMToEBS": 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://xmlns.oracle.com/pcbpel/adapter/db/top/PollPaymentStatusDB}StgPcmInPaymentReqCollection { {http://www.w3.org/2001/XMLSchema}anyType }
        </con:reason>
    If I test the same in OEPE then there are no errors.
    Here is the payload:
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <pay:InputParameters xmlns:pay="http://xmlns.oracle.com/pcbpel/adapter/db/sp/PaymentStatus">
        <!--Optional:-->
        <pay:P_INT_NAME>string</pay:P_INT_NAME>
        <!--Optional:-->
        <pay:P_SOURCE_MESSAGE_REF>string</pay:P_SOURCE_MESSAGE_REF>
        <!--Optional:-->
        <pay:P_SOURCE_ENTITY_REF>string</pay:P_SOURCE_ENTITY_REF>
        <!--Optional:-->
        <pay:P_HEADER_REC>
            <!--Optional:-->
            <pay:INTERFACE_SOURCE_CODE>string</pay:INTERFACE_SOURCE_CODE>
            <!--Optional:-->
            <pay:BATCH_ID>string</pay:BATCH_ID>
            <!--Optional:-->
            <pay:GROUP_CODE>string</pay:GROUP_CODE>
            <!--Optional:-->
            <pay:HEADER_DESCRIPTION>string</pay:HEADER_DESCRIPTION>
            <!--Optional:-->
            <pay:PR_NUMBER>string</pay:PR_NUMBER>
            <!--Optional:-->
            <pay:HEADER_ATTRIBUTE3>string</pay:HEADER_ATTRIBUTE3>
            <!--Optional:-->
            <pay:HEADER_ATTRIBUTE4>string</pay:HEADER_ATTRIBUTE4>
            <!--Optional:-->
            <pay:NOTE_TO_BUYER>string</pay:NOTE_TO_BUYER>
            <!--Optional:-->
            <pay:DELIVER_TO_REQUESTOR_NAME>string</pay:DELIVER_TO_REQUESTOR_NAME>
            <!--Optional:-->
            <pay:CURRENCY_CODE>string</pay:CURRENCY_CODE>
            <!--Optional:-->
            <pay:EXPENDITURE_ORGANIZATION_CODE>string</pay:EXPENDITURE_ORGANIZATION_CODE>
            <!--Optional:-->
            <pay:ORGANIZATION_CODE>string</pay:ORGANIZATION_CODE>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_NAME>string</pay:SUGGESTED_VENDOR_NAME>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_ID>1000.00</pay:SUGGESTED_VENDOR_ID>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_SITE>string</pay:SUGGESTED_VENDOR_SITE>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_SITE_ID>1000.00</pay:SUGGESTED_VENDOR_SITE_ID>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_CONTACT>string</pay:SUGGESTED_VENDOR_CONTACT>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_CONTACT_ID>1000.00</pay:SUGGESTED_VENDOR_CONTACT_ID>
            <!--Optional:-->
            <pay:SUGGESTED_VENDOR_PHONE>string</pay:SUGGESTED_VENDOR_PHONE>
            <!--Optional:-->
            <pay:ACCRUAL_ACCOUNT_ID>1000.00</pay:ACCRUAL_ACCOUNT_ID>
            <!--Optional:-->
            <pay:VARIANCE_ACCOUNT_ID>1000.00</pay:VARIANCE_ACCOUNT_ID>
            <!--Optional:-->
            <pay:BUDGET_ACCOUNT_ID>1000.00</pay:BUDGET_ACCOUNT_ID>
            <!--Optional:-->
            <pay:AMOUNT>1000.00</pay:AMOUNT>
            <!--Optional:-->
            <pay:CERTIFIED_DATE>2008-09-29T02:49:45</pay:CERTIFIED_DATE>
        </pay:P_HEADER_REC>
        <!--Optional:-->
        <pay:P_LINES_TAB>
            <!--Zero or more repetitions:-->
            <pay:P_LINES_TAB_ITEM>
                <!--Optional:-->
                <pay:QUANTITY>1000.00</pay:QUANTITY>
                <!--Optional:-->
                <pay:UNIT_OF_MEASURE>string</pay:UNIT_OF_MEASURE>
                <!--Optional:-->
                <pay:UNIT_PRICE>1000.00</pay:UNIT_PRICE>
                <!--Optional:-->
                <pay:ITEM_SEGMENT1>string</pay:ITEM_SEGMENT1>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT1>string</pay:CHARGE_ACCOUNT_SEGMENT1>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT2>string</pay:CHARGE_ACCOUNT_SEGMENT2>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT3>string</pay:CHARGE_ACCOUNT_SEGMENT3>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT4>string</pay:CHARGE_ACCOUNT_SEGMENT4>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT5>string</pay:CHARGE_ACCOUNT_SEGMENT5>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT6>string</pay:CHARGE_ACCOUNT_SEGMENT6>
                <!--Optional:-->
                <pay:CHARGE_ACCOUNT_SEGMENT7>string</pay:CHARGE_ACCOUNT_SEGMENT7>
                <!--Optional:-->
                <pay:PROJECT_NUM>string</pay:PROJECT_NUM>
                <!--Optional:-->
                <pay:TASK_NUM>string</pay:TASK_NUM>
                <!--Optional:-->
                <pay:EXPENDITURE_TYPE>string</pay:EXPENDITURE_TYPE>
                <!--Optional:-->
                <pay:DESTINATION_ORGANIZATION_CODE>str</pay:DESTINATION_ORGANIZATION_CODE>
                <!--Optional:-->
                <pay:LINE_ATTRIBUTE2>string</pay:LINE_ATTRIBUTE2>
                <!--Optional:-->
                <pay:NEED_BY_DATE>2014-09-19T00:18:33</pay:NEED_BY_DATE>
                <!--Optional:-->
                <pay:DISTRIBUTION_ATTRIBUTE5>string</pay:DISTRIBUTION_ATTRIBUTE5>
                <!--Optional:-->
                <pay:CURRENCY_UNIT_PRICE>1000.00</pay:CURRENCY_UNIT_PRICE>
                <!--Optional:-->
                <pay:CURRENCY_AMOUNT>1000.00</pay:CURRENCY_AMOUNT>
                <!--Optional:-->
                <pay:ITEM_DESCRIPTION>string</pay:ITEM_DESCRIPTION>
                <!--Optional:-->
                <pay:CATEGORY_SEGMENT1>string</pay:CATEGORY_SEGMENT1>
                <!--Optional:-->
                <pay:TAX_CODE>string</pay:TAX_CODE>
                <!--Optional:-->
                <pay:DISTRIBUTION_ATTRIBUTE9>string</pay:DISTRIBUTION_ATTRIBUTE9>
                <!--Optional:-->
                <pay:REMARKS>string</pay:REMARKS>
                <!--Optional:-->
                <pay:LIABLE_FOR_WHT>string</pay:LIABLE_FOR_WHT>
            </pay:P_LINES_TAB_ITEM>
        </pay:P_LINES_TAB>
    </pay:InputParameters>
    In transformation I am using following code for converting String to Decimal
                        for $vendorSiteId in $stgPcmInPaymentReqCollection1/ns1:StgPcmInPaymentReq[1]/ns1:vendorSiteId
                        return
                            <ns0:SUGGESTED_VENDOR_SITE_ID>{ xs:decimal(data($vendorSiteId)) }</ns0:SUGGESTED_VENDOR_SITE_ID>
    Please let me know if I am missing anything.

    your payload doesn't seem to be correct.
    if you're trying to parse a soap envelop i would expect a soap:Body tag
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <soap:Body>
    <pay:InputParameters xmlns:pay="http://xmlns.oracle.com/pcbpel/adapter/db/sp/PaymentStatus">
    </soap:Body>

  • 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

  • XSL transformation in OSB

    Hi all,
    I am new to OSB. I am having trouble to understand how to do XSL transformation in OSB.
    I have created a business service which targets wsdl with a particular schema for the input message. I have created a separate wsdl for the proxy service with another schema the input message.
    I have to invoke the business service from proxy service. For this, I have added a route node and then a routing activity. In the request line of the routing activity i have used an assign where i will use XSLT to map input message of the proxy wsdl to the input message of the business service.
    How do we access other variables when creating an XSLT?
    Is my approach to the problem correct?
    John

    Hi,
    I am doing that in an replace action.
    In my flow I have the proxy service, then a pipeline, then I have the route.
    In the pipeline I have replaced the input request using a XQuery transformation. When I test it, I see the input is coming till the route.
    But the same pay load is valid and workin if I pass it when I invoke the route service independently. when i use it in the flow its not working.
    Simply it says the system error
    Below is the complete trace data
    (receiving request)
    Initial Message Context
    added $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <proj:alertReportDataRequestMessage xmlns:proj="http://www.projgis.org/PROJGISMessageSchema">
    <proj:header>
    <proj:RequestId>3333</proj:RequestId>
    <proj:ReqTransactionId>333</proj:ReqTransactionId>
    <proj:ConsumerId>string</proj:ConsumerId>
    <proj:ReqTimestamp>2008-09-29T07:19:45</proj:ReqTimestamp>
    </proj:header>
    <proj:NameOfTenant>string</proj:NameOfTenant>
    <proj:AddressOfTenant>string</proj:AddressOfTenant>
    <proj:RentalAmount>string</proj:RentalAmount>
    <proj:StartDateOfRent>2014-09-19T04:48:33</proj:StartDateOfRent>
    <proj:EndDateOfRent>2006-08-19T22:57:14+05:30</proj:EndDateOfRent>
    <proj:SalesOfOrder>string</proj:SalesOfOrder>
    </proj:alertReportDataRequestMessage>
    </soapenv:Body>
    added $header
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    added $inbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsData" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insertClientReport</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsData
    </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://xmlns.bodhtree.com/GetRentalExpiryAlertsData/insertClientReport"
    </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><anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    added $messageID
    2570677769696620240-29ef401f.12cef26de6e.-7ef1
    PipelinePairNode1
    stage2
    Message Context Changes
    changed $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ins:ClientReportCollection xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertClientReportTable">
    <ins:ClientReport>
    <ins:alertNo>1</ins:alertNo>
    <ins:tenentName>string</ins:tenentName>
    <ins:address>string</ins:address>
    <ins:rentalAmt>string</ins:rentalAmt>
    <ins:startDate>2014-09-19T04:48:33</ins:startDate>
    <ins:endDate>2006-08-19T22:57:14+05:30</ins:endDate>
    <ins:salesDocument>string</ins:salesDocument>
    <ins:transId>333</ins:transId>
    </ins:ClientReport>
    </ins:ClientReportCollection>
    </soapenv:Body>
    changed $inbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsData" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insert</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsDataPush
    </con:uri>
    <con:mode>request</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://xmlns.bodhtree.com/GetRentalExpiryAlertsData/insertClientReport"
    </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><anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    changed $header
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    RouteNode1
    Routed Service
    Route to: "GetRentalExpiryAlertsDataPush"
    $outbound:
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsDataPush" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insertClientReport</con:operation>
    </con:service>
    <con:transport>
    <con:mode>request</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>
    </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/">
    <ins:ClientReportCollection xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertClientReportTable">
    <ins:ClientReport>
    <ins:alertNo>1</ins:alertNo>
    <ins:tenentName>string</ins:tenentName>
    <ins:address>string</ins:address>
    <ins:rentalAmt>string</ins:rentalAmt>
    <ins:startDate>2014-09-19T04:48:33</ins:startDate>
    <ins:endDate>2006-08-19T22:57:14+05:30</ins:endDate>
    <ins:salesDocument>string</ins:salesDocument>
    <ins:transId>333</ins:transId>
    </ins:ClientReport>
    </ins:ClientReportCollection>
    </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="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsDataPush" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insertClientReport</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsDataPush
    </con:uri>
    <con:mode>request</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>
    </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">1</tran:response-code>
    </con:response>
    </con:transport>
    <con:security>
    <con:doOutboundWss>false</con:doOutboundWss>
    </con:security>
    </con:endpoint>
    changed $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ins:ClientReportCollection xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertClientReportTable">
    <ins:ClientReport>
    <ins:alertNo>1</ins:alertNo>
    <ins:tenentName>string</ins:tenentName>
    <ins:address>string</ins:address>
    <ins:rentalAmt>string</ins:rentalAmt>
    <ins:startDate>2014-09-19T04:48:33</ins:startDate>
    <ins:endDate>2006-08-19T22:57:14+05:30</ins:endDate>
    <ins:salesDocument>string</ins:salesDocument>
    <ins:transId>333</ins:transId>
    </ins:ClientReport>
    </ins:ClientReportCollection>
    </soapenv:Body>
    changed $inbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsData" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insert</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsDataPush
    </con:uri>
    <con:mode>request</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://xmlns.bodhtree.com/GetRentalExpiryAlertsData/insertClientReport"
    </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><anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    changed $header
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    Service Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    System Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    Is there any place where I can refer how to work with passing data from current flow to the next flow.
    Do i need to do the transformation before invoking the route, or inside the route service request pipeline?
    Do I need to change the method, URI etc as wells? before invoking the routing?
    --Khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to apply an XSLT transformation in OSB

    Hello all ,
    I tried to made a simple example - that apply a simple XSLT transformation in OSB .
    I followed the http://blog.jayway.com/2010/05/07/xslt-transformations-in-oracle-service-bus/ example but still is not working in my project .
    If I apply the imported xslt over the xml in testing window is working fine .
    But the action to replace the content of the xml with the new one is not working.
    Here is the xslt
    <xsl:template match="/">
    <ns0:donateToFund>
    <arg0>
    <xsl:value-of select="/Report/CustomerName"/>
    </arg0>
    <arg1>
    <xsl:value-of select="/Report/CustomerNumber"/>
    </arg1>
    <arg2>
    <xsl:value-of select="/Report/ReportName"/>
    </arg2>
    </ns0:donateToFund>
    </xsl:template>
    and here is a xml sample
    - <Report>
    <ReportName>Customer Report</ReportName>
    <CustomerName>XXX</CustomerName>
    <CustomerNumber>3423</CustomerNumber>
    <GeneratedDate>2010-11-25 08:15:24.695</GeneratedDate>
    - <Rowset>
    - <Row>
    <Quantity>100154</Quantity>
    <CustomerPartNo>ee</CustomerPartNo>
    <eSiliconPartNo>ee</eSiliconPartNo>
    <Sector>ee</Sector>
    <Location>eee</Location>
    </Row>
    - <Row>
    In my action I put /Report as XPath ; body as variable and XSL fro transformation .
    Can anyone help to fix this ?
    Many thanks in advance,
    Stefan

    Following works for me:
    XSLT
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:template match="/" xmlns:ns0="http://tempuri.org">
    <ns0:donateToFund>
    <arg0>
    <xsl:value-of select="/Report/CustomerName"/>
    </arg0>
    <arg1>
    <xsl:value-of select="/Report/CustomerNumber"/>
    </arg1>
    <arg2>
    <xsl:value-of select="/Report/ReportName"/>
    </arg2>
    </ns0:donateToFund>
    </xsl:template>
    </xsl:stylesheet>Input to Proxy
         <Report>
         <ReportName>Customer Report</ReportName>
         <CustomerName>XXX</CustomerName>
         <CustomerNumber>3423</CustomerNumber>
         <GeneratedDate>2010-11-25 08:15:24.695</GeneratedDate>
         <Rowset>
         <Row>
         <Quantity>100154</Quantity>
         <CustomerPartNo>ee</CustomerPartNo>
         <eSiliconPartNo>ee</eSiliconPartNo>
         <Sector>ee</Sector>
         <Location>eee</Location>
         </Row>
         <Row>
         <Quantity>100154</Quantity>
         <CustomerPartNo>aa</CustomerPartNo>
         <eSiliconPartNo>aa</eSiliconPartNo>
         <Sector>aa</Sector>
         <Location>aaa</Location>
         </Row>
         </Rowset>
         </Report>Output of Proxy:
         <ns0:donateToFund       xmlns:ns0="http://tempuri.org">
         <arg0>XXX</arg0>
         <arg1>3423</arg1>
         <arg2>Customer Report</arg2>
         </ns0:donateToFund>I am using a single Replace action in the request pipeline.
    It works for both configs below:
    Replace [ entire node ] of [ ./* ] in [ body ] with [Xslt Resource: default/OTN/temp
    Input Document: $body/Report
    Variable Names And Bindings ]
    Or
    Replace [ Node Contents ] of [ . ] in [ body ] with [Xslt Resource: default/OTN/temp
    Input Document: $body/Report
    Variable Names And Bindings ]
    You need to ensure that if you are doing replace entire node of . in body or / in body then you should replace it with an XML whose root node is soap:Body. To achieve that you will need to change the XSL and add soap:Body as root of the output. Easier solution is to use replace contents of . body or replace entire node of ./* in body.

  • 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

  • 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?

  • Transformations in OSB

    hi,
    i am new to OSB. i want to do transformation in OSB like we do in Jdeveloper. can anyone provide me the links for that?
    thanks

    OSB supports XSLT transformations, so if you are familiar with them just stick to JDeveloper.
    Otherwise you should use XQuery Mapper with OEPE (Eclipse), but that would be quite a learning curve, XQuery is not self evident...
    http://download.oracle.com/docs/cd/E14981-01/wli/docs1031/dtguide/dtguideMapper.html

  • 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

  • XSLT transformation in OSB Proxy Service

    Hello, I am trying to modify the answer from a WebService using an XSLT transformation in an OSB Proxy Service, but I am unable to do so. Here it is the content of the answer's body it receives:
    <ns0:getRecountUnitMovementsResponse xmlns:ns0="http://www.grifols.com/gds/interfaces/types/">
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>4</ns4:GrpId>
    <ns4:MovementType>960</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>11-0001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>10</ns4:Quantity>
    </ns1:result>
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>1</ns4:GrpId>
    <ns4:MovementType>913</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>11-0001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>15</ns4:Quantity>
    </ns1:result>
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>2</ns4:GrpId>
    <ns4:MovementType>913</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>21-00001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>25</ns4:Quantity>
    </ns1:result>
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>3</ns4:GrpId>
    <ns4:MovementType>959</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>11-0001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>50</ns4:Quantity>
    </ns1:result>
    </ns0:getRecountUnitMovementsResponse>
    And what I am trying to do is replace all the "/com/grifols/gds/webapp/inventoryCount/units/queries/common/" for "http://www.something.else". I have succeeded replacing it if the attribute name is "xmlns" instead of "xmlns:ns4". However, that ":ns4" changes everything and I can't get it to work. Does anyone know how to do so?
    Thank you in advance. Don't hesitate to ask me for more information you may need.
    Jordi

    By the way, this is the XSLT transformation that works fine if we remove that ":ns4" from the attribute name:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:source="/com/grifols/gds/webapp/inventoryCount/units/queries/common/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="2.0">
    <xsl:output method="xml" encoding="iso-8859-1" indent="yes"/>
    <xsl:template match="source:*">
    <xsl:element name="{local-name()}" namespace="http://www.something.else">
    <xsl:apply-templates select="@*|node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

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

  • DB data transformation in OSB 11g?

    Hi ,
    I have worked with XQuery transformation to transform input data to the required format we need to insert to DB.Can we perform XQuery transformation with data returned from DB.DBAdapter is configured for select operation,will us be able to transform the data to any format we require by capturing it n Response pipe-line of pirpeline pair n our osb message flow.
    a.My XQuery returns empty data,can any1 confirm where this can be achieved ?if so do provide some inputs on the same,which will be very helpful .
    b.Is it possible to use wsdl from a java client as input for OSB proxy service,will it work?Where shud be import the implementation details if so?
    Kindly provide yoru suggestion on abve points and some alternative ways if possible.

    Lots of questions in one post. ok... let's go one by one :) -
    Can we perform XQuery transformation with data returned from DBYes, you can. Similarly as you do for other transformations.
    DBAdapter is configured for select operation,will us be able to transform the data to any format we require by capturing it n Response pipe-line of pirpeline pair n our osb message flow.Yes, you can.
    a.My XQuery returns empty data,can any1 confirm where this can be achieved ?if so do provide some inputs on the same,which will be very helpful .I hope this is in the case where "select" operation does not return a data. In this case you may first check in OSB message flow itself whether select returned any data -
    how to check for missing element before assigning,
    If select does not return any data, don't even call XQuery from message flow.
    b.Is it possible to use wsdl from a java client as input for OSB proxy service,will it work?Where shud be import the implementation details if so?I did not understand, sorry! Do you want to create a WSDL based web-service as OSB or do you want to call such a service hosted on OSB, from a Java client. Please elaborate.
    Regards,
    Anuj

  • OSB Transformation Mapping values missing

    Hi,
    I'm new to OSB.We have a requirement where it structured in 3 layered architecture consists of BPEL(1),OSB(2),OSB(3).
    So i have created a Business service of my client WSDL from OSB(3) then proxy of type created bussiness service which is having local transport which inturn called by proxy service of http protocol in OSB(2) of type OSB(3) Proxy service.
    My Question is when i call transformations (xsl) in last OSB(3) Mapping is done properly(GETING VALUES MAPPED TO TARGET ONE) .But as per requirement we have to call mapping and transformations in OSB(2) ,wen i called in this way only set text valued paramters is displayed in target.... rest mapped values(like source to target mapping) are coming NULL....
    Please help us to resolve the issue soon since its very urgent requiremnt for our project developement..
    Adavance thanks......

    System hardly proposes rules after migration, you have to manually map them and migrate routines if any basing on ABAP OO.
    As it is a newer version it may not be consistent for all objects.
    What SP are you running ?

  • OSB Dynamically XSLT transformation

    Hello!
    XSLT is stored in the database.
    I getting xslt from db via EJB.
    How can use this xslt for transformation in osb? Can use standard snippet for transformation?
    Thanks,
    lam

    Already discussed here.
    OSB: Dynamic XSLT
    Thanks,
    Vijay

Maybe you are looking for