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?

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.

  • Convert XML Node to String using XSLT

    Hi,
    Perhaps this has been discussed before. But i am looking at creating a XSLT mapping to take the entire inbound message and put it into a single node of the target.
    Is there a way?
    Thanks in advance
    Regards
    Venkat

    Hi Shankar,
    I have a input XML <root><a></a></root>
    I have a target <tgt><b></b></tgt>
    I need to have the target xml as
    <tgt><b>&lessthansign;root&greaterthansign;&lessthansign;a&greaterthansign;&lessthansign;/a&greaterthansign;&lessthansign;/root&greaterthansign;</b></tgt>
    Using the XSLT that you mentioned
    I am getting the format
    <tgt><b><root><a></a></root></b></tgt>
    Now the consumer of this message expects the data in the first type of format
    That is where i am getting stuck
    Thanks and Regards
    Venkat

  • 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

  • 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

  • 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

  • Select data as table from xml string using xquery.

    Hi ,
    I have this xml 
    declare @xml xml
    set @xml =' <StudentsData>
    <StudentData>
    <id>1</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    <StudentData>
    <id>2</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    </StudentsData>'
    select @xml
    I wan the output to be shown as
    id subid marks
    1 1 30
    1 2 40
    2 1 30
    2 2 40
    how can i do this using XQUERY in sqlserver ?.
    Thanks in advance for any help.

    how can i do this using XQUERY in sqlserver ?
    Sure you can and it's easy:
    declare @xml xml
    set @xml =' <StudentsData>
    <StudentData>
    <id>1</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    <StudentData>
    <id>2</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    </StudentsData>'
    select students.Rows.value('subid[1]', 'int') AS id
    ,students.Rows.value('marks[1]', 'int') AS marks
    FROM @xml.nodes('/StudentsData/StudentData/subjects/subject') AS students(Rows)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to convert from xml file to html using java code

    How to convert from xml file to html file using java code

    Get yourself Apache Xalan or Saxon or some XSLT processor
    String styleSheet = "/YourXSLTStylesheet.xsl";
    String dataSource = "/YourXMLDocument.xml";
    InputStream stylesheetSource = TransformMe.class.getResourceAsStream(styleSheet);
    InputStream dataSourceStream = TransformMe.class.getResourceAsStream(dataSource);
    OutputStream transformedOut = new FileOutputStream("filename.html");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheetSource));
    transformer.transform(new StreamSource(dataSourceStream), new StreamResult(transformedOut));You'll also need to learn XSLT if you don't already know that. Here's a good place to start
    http://www.w3schools.com/xsl/

  • How to convert hierarchy XML to CSV format using PI/XI

    Hi All,
         I am working with SAP PI/XI for the first time and need some help file conversion of complex hierarchy XML to CSV file using PI. I have done plenty of research on SDN and could find much related to what I want to do.
    Here is the example of how my input XML would look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <PartyMaster type="OrgHierarchy" name="Compass Group Owned">
        <PartyMasterHierarchy>
             <Hierarchy level="3" nodeName="Bon Appetit Sector" type="Sector" ID="A00000" refID="A00000">     
                   <Hierarchy level="4" nodeName="BA Division" type="Division" ID="AB0000" refID="AB0000" >               <Hierarchy level="5" nodeName="BA East Coast Region" type="Region" ID="ABE000" refID="ABE000">
                             <Hierarchy level="6" nodeName="Engstrom, John RVP" type="District" ID="ABE01" refID="ABE01" >
                             </Hierarchy>
                           </Hierarchy>
         </Hierarchy>
                    </Hierarchy>
                    <Hierarchy level="3" nodeName="Levy Sector" type="Sector" ID="K00000" refID="K00000".               <Hierarchy level="4" nodeName="Levy Sector Division" type="Division" ID="K90000" refID="K90000">              <Hierarchy level="5" nodeName="Levy Sector Region" type="Region" ID="K99000" refID="K99000">                   <Hierarchy level="6" nodeName="TBA Total" type="District" ID="K9901" refID="K9901">                        </Hierarchy>
              </Hierarchy>
         </Hierarchy>
                     </Hierarchy>
            </PartyMasterHierarchy>
    </PartyMaster>
    I would like to get CSV output in the format below
    *DISPLAY_NAME     DOCUMENT_DESCRIPTION      PARENT           EXTERNAL_ID     ORG_UNIT_TYPE*     
    Bon Appetit Sector     Bon Appetit Sector      constant value    A00000                       constant value
    Levy Sector          Levy Sector           constant value    K00000                 constant value
    BA Division          BA Division            A00000                 AB0000                       constant value
    Levy Sector Division         Levy Sector Division       K00000              K90000                       constant value
    BA East Coast Region     BA East Coast Region          AB0000             ABE000                        constant value
    Levy Sector Region     Levy Sector Region       K90000              K99000                        constant value
    Engstrom, John RVP     Engstrom, John RVP        ABE000               ABE01              constant value
    TBA Total                    TBA Total             K99000               K9901             constant value
    1) How do I go about this? I think I have to configure an adapter but which adapter would give me the desired result?
    2) How do I tell PI when to pick the file from and where to place it after conversion? Could this be done in adapter configuration?
    Any help will be greatly appreciated.
    Thanks.
    --Mithun

    Mithun,
    you would get lot of answers if you looking in the PI (process integration forum)... There is something calles File content coversion in XI file adapter (which can convert the xml to csv and viceversa)

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

  • XML to Nested Itab using Simple Transformation

    Hi there is there any experts there who can show me an example of Transforming a XML to a Nested Internal Table using Simple Transformation?
    I have tried this the program from the blog by
    Tobias Trapp
    <a href="/people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1:///people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
    but I have encountered this error
    Runtime Errors         ST_REF_ACCESS   
    Exception              CX_ST_REF_ACCESS
       1 <?sap.transform simple?>                                    
       2 <tt:transform template="temp1"                              
       3     xmlns:tt="http://www.sap.com/transformation-templates"> 
       4     <tt:root name="ROOT"/>                                  
       5     <tt:template name="temp1">                              
    >>>>       <tt:loop ref=".ROOT" name="a">                        
       7         <A>                                                 
       8            <name>                                           
       9              <tt:value ref="$a.name" />                     
      10            </name>                                          
      11            <ZLS>                                            
      12              <tt:loop ref="$a.zls" name="z">                
      13                <Z>                                          
      14                  <tt:value ref="$z.nummer" />               
      15                </Z>                                         
      16             </tt:loop>                                      
      17           </ZLS>                                            
      18         </A>                                                
      19       </tt:loop>                                            
      20     </tt:template>                                          
      21 </tt:transform>                                             
    Anyone knows whats wrong?

    I had to pass an XSLT program in the transformation statement.

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

  • Fetching xml node nth value using Xpath

    HI Experts ,
    with reference to below question, i have one more doubt.
    https://social.msdn.microsoft.com/Forums/en-US/f894e5e2-8926-4604-9171-616da3f00cd7/xpath-to-fetch-value-in-flatfile-schema?forum=biztalkgeneral
    I used below xpath to fetch nth value of full repeating message nodes
    indexStr = System.Convert.ToString(index);DATE=xpath(In_FF, "string(//*[local-name() = 'Details']["+indexStr+"])/*[local-name()='DATE'])");index=index + 1;
    and i got below error, can any help me in this?
    Exception thrown from: segment 2, progress 43
    Inner exception: 'string(//*[local-name() = 'Details'][1])/*[local-name()='DATE'])' has an invalid token.
    Exception type: XPathException
    Source: System.Xml
    Target Site: MS.Internal.Xml.XPath.AstNode ParseXPathExpresion(System.String)
    The following is a stack trace that identifies the location where the exception occured

    your XPATH expression is WRONG.
    it should be
    DATE=xpath(In_FF,
    "string(//*[local-name() = 'Details']["+indexStr+"]/*[local-name()='DATE'])");
    There is NO ")" after ["+indexStr+"].
    The more reliable way is to use a string variable and use the System.String.Format() call as below
    xPathExpr = System.String.Format("string(//*[local-name() = 'Details'][{0}]/*[local-name()='DATE'])", index);
    DATE=xpath(In_FF, xPathExpr);
    The "invalid token" is because of the mismatched ")" in your XPATH Expression.
    Regards.

  • Converting XML Document to String

    Dear All,
    I am quite new to Java Web Services. I have made a Java Class which calls all the web services . I am displaying the results on a Command prompt. Below is my sample code:
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Stub;
    import horusWS.Horus_x0020_Web_x0020_Services_Impl;
    import horusWS.Horus_x0020_Web_x0020_ServicesSoap;
    public class JavaClient {
    public static void main(String[] args)
    Horus_x0020_Web_x0020_Services_Impl service = new Horus_x0020_Web_x0020_Services_Impl();
    Horus_x0020_Web_x0020_ServicesSoap port = service.getHorus_x0020_Web_x0020_ServicesSoap();
    String str;
    str = port.getTextFeedbackLearner(1,"P001",1);
    //where getTextFeedbackLearner is the my Web Service.
    System.out.println(str);
    System.out.println returns the web service in string format. Now I want to compare this string to my actual getTextFeedbackLearner.xml file. But I think I need to convert getTextFeedbackLearner.xml to string first. Please let me know
    how can I convert an XML Document to String.
    Thanking you in Anticipation.
    cheers,
    Sunil Sabir

    You can read the XML document as you read any other file.
    Read it into a String variable.
    Check java.io.FileReader, java.io.BufferReader, etc.

  • Convert XML file into DTD using Java

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

Maybe you are looking for

  • How do I set ringtones for specific people on my iPhone 4S?

    I recently upgraded from my 3GS to a 4S.  I remember when I set the ringtones on the 3GS is was quite easy and intuitive being a selection off of the contacts page iirc.  The interface seems to have changed adn I can't figure it out now.

  • Possible to run an Express in N, and join another N Express broadcasting G?

    I hope my title to this explained what I am trying to find out. I have two Airport Express N's that I want to connect to my existing router (Cradlepoint CTR500). One Express will be connected over Ethernet to the router, which is creating the WiFi ne

  • Enhanced podcasts

    No where on Apple's site does it say that YOU MUST HAVE CHAPTER TOOL to post enhanced podcasts made in Garage band. Yet it seems that other people on the web have posted this info. http://www.voxmedia.org/wiki/PodcastChapterTool#iPodChapterBug Why do

  • Lion 10.7.4 slow accessing network folders

    I'm using a networked hard drive to access files. After going to a system with Lion it is very slow accessing some of the folders. Sometimes it can take up to a minute to open a folder with vew few items. After updating to 10.7.4 I'm noticing some fo

  • Period overlaps code not working in apex page

    Hi there, Employees have a schedule with a begin and end date. Schedule periodes may not overlap each other for the same employee. I have a function returning error text validation as follow: declare l_dummy number; begin select  count(*) into    l_d