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

Similar Messages

  • XQuery Transformation in OSB for array of values

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

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

  • Convertion of 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

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

  • Problem with CALL TRANSFORMATION xml - abap

    Hello!
    I got the following problems using call transformation to read a xml-file to local abap datatype!
    Simple xml file for testing:
    <BMECAT>
    <HEADER>
    asdf
    </HEADER>
    </BMECAT>
    XSLT file:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <xsl:value-of select="./BMECAT/HEADER"/>
      </xsl:template>
    </xsl:transform>
    The xslt transformation works with xslt-tester!
    My Source:
    DATA: xmlupl TYPE string,
    outputx TYPE XSTRING,
    lv_string TYPE string.
    * in xmlupl my xml import is stored
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    EXPORTING
    text = xmlupl " variable type string
    IMPORTING
    buffer = outputx. " variable type xstring
    TRY .
         CALL TRANSFORMATION path_to_xslt_file
           SOURCE XML outputx
         RESULT HEADER = lv_string.
    CATCH cx_xslt_exception INTO xslt_error.
         data: xslt_message type string .
         xslt_message = xslt_error->get_text( ).
    ENDTRY.
    After debugging in xslt_message is stored the following text:
    "The element abap was expected for the XML-ABAP transformation"
    Can anyone help me with this problem?
    Regards,
    Daniel

    hi
    good
    try this code
    Just look at this piece of code, I think it should help you.
      DATA : ITAB   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB[] ).
    DATA IS CONVERTED TO XML; DISPLAY THE XML-DOCUMENT
      CALL METHOD L_XML->DISPLAY.
    thanks
    mrutyun^

  • Problem with x:transform function : translation with XSLT

    I've got a problem with this code :
    This is the XML file :
    <%@taglib prefix="x" uri="http://java.sun.com/jstl/xml"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <c:import var="xslDoc" url="test.xsl"/>
    <x:transform  xslt ="${xslDoc}">
      <students>
      <student id="1">
       <name>
         <first>John</first>
         <last>Smith</last>
         <middle>T</middle>
       </name>
       <grade>
         <points>72</points>
         <letter>C</letter>
       </grade>
      </student>
    </students>
    </x:transform>This is the XSLT :
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="students">
      <html>
      <head>
      <title>XSLT Transform</title>
      </head>
      <body>
       <table border="1">
       <tr><th>First</th><th>Last</th>
    <th>Points</th><th>Letter</th></tr> 
       <xsl:apply-templates/>
       </table>
       </body>
      </html>
    </xsl:template>
    <xsl:template match="student">
      <tr>
       <td><xsl:value-of select="name/first"/></td>
       <td><xsl:value-of select="name/last"/></td>
       <td><xsl:value-of select="grade/points"/></td>
       <td><xsl:value-of select="grade/letter"/></td>
      </tr>
    </xsl:template>
    </xsl:stylesheet>I use NetBeans 3.5.1 for compiling and testing, and on my machine all works fine.
    But when i upload the code on the server i''ve this type of error :
    HTTP Status 500 - Internal Server Error
    exception
    org.apache.jasper.JasperException: access denied (java.util.PropertyPermission org.xml.sax.driver read)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    java.security.AccessControlException: access denied (java.util.PropertyPermission org.xml.sax.driver read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
         at java.lang.System.getProperty(System.java:572)
         at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:81)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.getSource(TransformSupport.java:280)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.getSource(TransformSupport.java:276)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:159)
         at org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(TransformTag.java:104)
         at org.apache.jsp.test_jsp._jspService(test_jsp.java:78)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
         at java.lang.Thread.run(Thread.java:536)
    org.apache.jasper.JasperException: access denied (java.util.PropertyPermission org.xml.sax.driver read)It seems a permission problem, but my experience with JSP is very poor , i've asked to control to my host
    the policy of the folders but they didn't respond me yet.
    Any suggestion ?
    Thx for reading, and sorry for my rusty english :-P

    Thanks.
    I've already tried to insert the whole path. You mean this,right ?
    <c:import var="xslDoc" url="http://www.domain.net/examples/test.xsl"/>I've searched a lot with google but i haven't find anything.
    I've not searched a lot into the jakarta site, I'll do tomorrow, now it's
    a bit late (1:45 AM in Italy :-0 ), so i think that i'll go to sleep.
    Thanks for responding so soon!
    I'll wait for your new infos.
    Thanks again.
    read you tomorrow.

  • Problem With Match Transformation

    Hi ,
    I am using Match transformation to find the duplicates .
    My input data like this
    EMP NO     ENAME         SAL     DEPTNO
    10     SRIRAM MV  10000     100
    11     MV SRIRAM  11000     100
    12     SRIRAM PV  11000     100
    13     SRIHARI       11000     100
    14     SUBBIAH       11000     100
    15     RAMANA       11000     100
    Iam finding the duplicates on Ename .
    My ename data like SRIRAM MV, MV SRIRAM  like that data . both are duplicate records . for that iam using WORD SIMILARITY  option instead of field similarity with match score is 100 and no match score is 99.
    But i am getting all are unique records .
    If i am using match score is 85 and no match  score is 84 then iam getting the result like this .
    EMP NO     ENAME     SAL     DEPTNO     GROUP_NUMBER     MATCH_STATUS     MATCH_SCORE
    11     MV SRIRAM     11000     100     1     P     94
    15     RAMANA     11000     100          U     
    13     SRIHARI     11000     100          U     
    10     SRIRAM MV     10000     100     1     D     
    12     SRIRAM PV     11000     100     1     P     88
    14     SUBBIAH     11000     100          U     
    means MV SRIRAM,SRIRAM MV ,SRIRAM PV  comes under one group number with SRIRAM MV  as driver and MV SRIRAM as passenger with 94 similarity score and  SRIRAM PV as passenger with 88 score.
    While i am using the match score i need to get 100% per SRIRAM MV and MV SRIRAM . then whats the settings needed to get correct result. whats the problem with my settings.
    Please help me out to solve the problem
    Thanks&Regards,
    Ramana.

    Ramana,
    <<< My ename data like SRIRAM MV, MV SRIRAM like that data . both are duplicate records . for that iam using WORD SIMILARITY option instead of field similarity with match score is 100 and no match score is 99. >>>
    You are looking for an exact match here, but MV SRIRAM and SRIRAM MV are not exactly the same.  The characters MV are in different positions.  The Word Similarity option compares words instead of the entire field, but the character position also affects the match score.
    <<< While i am using the match score i need to get 100% per SRIRAM MV and MV SRIRAM . >>>
    You cannot force the the match score to be a specific value.  SRIRAM MV and MV SRIRAM are not a 100% match and never will be.  What you need to do is adjust the match settings so that the dupe group includes SRIRAM MV and MV SRIRAM but excludes SRIRAM PV.  Try Match Score = 90 and No Match Score = 89.

  • Problem with XSLT Transformation on BPM

    Hi there,
    I have a 1:N File --> Idocs Scenario with BPM, Inside the BPM i have an XSLT Transformation that has a problem i cant figure out, basically this XSLT Groups the file structure like this:
    <File>                                                *                  <Shipments>
       <Route>                                         *                     <Route>
          <Id>1</Id>                                   *                         <Id>1</Id>
          <delivery>1</delivery>               *                         <delivery>1</delivery>
       </Route>                                        *                         <delivery>2</delivery>
      <Route>                                          *                     </Route>
          <Id>1</Id>                                   *                     <Route>
          <delivery>2</delivery>               *                         <Id>2</Id>
       </Route>                                        *                         <delivery>3</delivery>
      <Route>                                          *                         <delivery>4</delivery>
          <Id>2</Id>                                   *                      </Route>
          <delivery>3</delivery>               *                   </Shipments>
       </Route>                                        *
       <Route>                                         *
          <Id>2</Id>                                   *
          <delivery>4</delivery>               *
       </Route>                                        *
    </File>                                               *
    It's supposed to generate 1 Route Segment for each disctint Route Id on the Source file, it has always worked fine as we ran several tests before going into production system, but now, sometimes it misses a few routes for example the output will be 25 different Routes for a source file that 28, or 2 routes from a file that as 3.
    I have tested the XSLT on the repository and it works fine all the time, same thing when using xml spy, i always download the payload i get from the file adapter, i got a source file from PRD that has 28 routes and i ran the whole scenario on QAS and it generated 12 routes only, im about to open an OSS message but first i wanted to know if anyone has seen something like this, thanks in advance for all the help you guys can provide.
    Best Regards,
    Roberto.
    p.s. i can send the XSL if needed or anything just ask for it.

    Hi,
    Basically because i  have to do 2 transformations, first i run the XSLT to group all the deliveries and such, and then i do a graphic mapping to split it into single Shipment Idocs, i dont know how to group by id on graphical mapping..., anyway i don't think the fact that im using BPM would finally alter the xslt result,
    Regards,
    Roberto.

  • Newbie problem with JAXM - Transformer  Exception

    Hi there!
    I am looking for some start- up help.
    I have this SOAP message in a file (test.xml)
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <soap-env:Header>
        <m:SessionID xmlns:m="Some-URL" value="2123123"/>
      </soap-env:Header>
      <soap-env:Body>
        <m:StartSession xmlns:m="Some-URL">
          <username>TestUser</username>
        </m:StartSession>
      </soap-env:Body>
    </soap-env:Envelope>I use the following lines of code
      StreamSource src  = new StreamSource(new File("c:/test.xml"));
      TransformerFactory tFact=TransformerFactory.newInstance();
      Transformer trans = tFact.newTransformer(src);And i get an Transformer exception saying
    javax.xml.transform.TransformerException: stylesheet requires attribute: versionAny hint? Thanks a lot!

    I think I found the problem because I managed to use the transformer ..and to read from the xml file.Aftwards with the output of the transformrt i produced a separaye xml
    WRONG ->>The passing parameter src
    Transformer trans = tFact.newTransformer(src);
    Anyway thats ok because I had to search through the XSLTC thing and read some usefull things!

  • Problem with XQuery

    Hello,
    I'm trying to run the XQuery also but even the
    XQLPlus interactive command line utility does not work with the sample xml file 'bib.xml' and the XQuery contained in the file 'exmpl1.xql'.
    I get the following error:
    XQE: Parsing failed 'null'
    What can be the problem?
    Thanks.

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • Problems with xml transformation via xslt - strange results

    hi everybody...
    i've little trouble finalling a little tool programmed by myself for my education.
    the application contains a kind of document-server which enables the client to up- and download xml-document in a special format to/from the server.
    in case of the xml-dtd of client and server are different (same type of content, different dtd) the server implements a method called transform(StreamSource source, StreamSource xsl_stylesheet, StreamResult result) which contains the following code:
        transform(StreamSource source, StreamSource xml_stylesheet, StreamResult result) {
          try {
            TransformerFactory factory = TransformerFactory.newInstance();
            Templates template = factory.newTemplates(xsl_stylesheet);
            Transformer transformer = template.newTransformer();
            transformer.transform(source, result);
            return true;
          catch(Exception e) {
            return false;
        }the method is called by the methods downloadFile(...) and uploadFile(...) which both generate the different StreamSource- and StreamResult-Objects.
    by using the downloadFile(...) method, the requested file is transformed, stored temporary in a tmp-directory, read in and send to the requesting client.
    by using the uploadFile(...) method, the sent file is stored temporary in the tmp-directory, read in, transformed and stored as new server-document (if the file still exists it will be overwritten).
    My Problem:
    the result files generated by transform(SreamSource source, StreamSource xsl_stylesheet, StreamResult result) look strange. That means the result xml-code is not equal to the result xml-code i generated by transforming my xml-documents with saxon.
    The xsl files are correct and the xml files are wellformed as well as they are valid.
    The result files look like this:
    <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?>
       XYZ
       ABC
          1
          piece
          One piece of ABC(-> <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?> is a "string" of code from the source xml-file...)
    The result should look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE a-resource SYSTEM "../dtd/A.dtd">
    <a-resource id="XYZ">
       <a-type>ABC</a-type>
       <a-data>
          <a-value>1</a-value>
          <a-unit>piece</a-unit>
          <a-descr>One piece of ABC</a-descr>
       </a-data>
    </a-resource>Is there anyone who knows what kind of mistake i did in my transform(...) method??
    Do I need to add some attributes to any of the Objects of Template of Transformer??
    please... help me
    i've been testing now over two nights long but couldn't find any solution how to bring my application to work "correct".
    thanks,
    Thof!!!

    ok...
    i got it!
    seems like jaxpi is unable to convert files with extensions different to .xml ...
    now it's working

  • B1iF 1.5 SQL Call problem with result transformation

    Hi all,
    i've made a scenario that reads a text file, and for each line, mak an sql call to find corresponding CardCode.
    Everything is ok until i want to transform the result of the SQL Call.
    Here is the result message
    <?xml version="1.0" encoding="UTF-8"?>
    <Msg xmlns="urn:com.sap.b1i.vplatform:entity">
      <Body>
        <Payload Role="C" id="atom5_1" system="0010000102" mode="single" method="Automatic detection by key word(Automatic detection by key word)" sql="SELECT CardCode,52657 as CodeTiers FROM OCRD WHERE U_CRL_CODE_DEN=52657" disable-output-escaping="false">
          <ResultSet xmlns="urn:com.sap.b1i.adapter:jdbcadapter" rowCount="0"/>
        </Payload>
        <Payload Role="C" id="atom5_2" system="0010000102" mode="single" method="Automatic detection by key word(Automatic detection by key word)" sql="SELECT convert(varchar,(Max(Convert(int,substring(CardCode,2,len(CardCode)-1))) + 1),20) as NewCardCode FROM OCRD WHERE Left(CardCode,1)= 'F' AND ISNUMERIC(substring(CardCode,2,len(CardCode)-1))=1" disable-output-escaping="false">
          <ResultSet xmlns="urn:com.sap.b1i.adapter:jdbcadapter" rowCount="1">
            <Row>
              <NewCardCode>3</NewCardCode>
            </Row>
          </ResultSet>
        </Payload>
      </Body>
    </Msg>
    When i apply the following XPath expression :
    //Msg/Body/Payload[@id='atom5_2']/jResultSet/Row/NewCardCode
    It gives nothing. So i've tried with XML Copy Editor, i've changed xmlns="urn:com.sap.b1i.adapter:jdbcadapter" to xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" and it works.
    It seems that the namespace is incorrect at the ResultSet level.
    So, here is my question : Why the SQL Call doesn't give the expected output ? How to correct it ?
    Thanks in advance !

    Well, i found a way to do it using local-name() function. it gives the following :
    <xsl:value-of select="$msg5_2[$Pos1]/*[local-name()='ResultSet']/*[local-name()='Row']/*[local-name()='NewCardCode']"></xsl:value-of>
    The job is done, but this not easy to read.

  • Problem with "CALL Transformation" in ABAP

    Hello All,
           I am creating XML from ABAP program and using CALL TRANSFORMATION. Everything works fine but when my XML is created sometimes in some "element" values it is truncating space between the texts. For example, I have a field "description" with value "Bon Apetite" it changes to "BonApetite" (space truncated) after transformation! I did research everywhere but could not find why this would happen! Please give me any feedback if you have any information.
    Thanks.
    Mithun

    Hello Mithun,
    when you use the call transformation statement you have to specifiy the xslt transformation used. As a first step you usually use the transformation with the name ID. This is a special transformation for making the asXML representation of abap data. Unfortunately if you look into this transformation you find the following:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:transform>
    If I remember correctly when you use another transformation this will first call the ID transformation and after this the specified one. So it should not be possible to just copy ID transformation and remove the line. I'll have to think again how to avoid the behaviour.
    Best Regards
    Roman

Maybe you are looking for