From String to Element with XML structure

Hello.
I have String with XML elements. Can i simple this transform in to XML format?
I need Element which has XML structure.
my string looks like that is:
<payload xmlns="http://xmlns.oracle.com/bpel/workflow/task">
<usersxmlns="http://www.google.com" xmlns:ns1="http://www.google.com">
<ns1:id_name>Mario</ns1:id_name>
<ns1:id_address>Newsburgh</ns1:id_address>
</users>
</payload>
Edited by: Tony_Fabrizzio on Feb 11, 2009 5:57 AM

Tony_Fabrizzio wrote:
Hello.
I have String with XML objects. No you don't. Get your terminology straight
Can i simple this transform in to XML format?
I need Element which has XML structure.
my string looks like that is:
<payload xmlns="http://xmlns.oracle.com/bpel/workflow/task">
<usersxmlns="http://www.google.com" xmlns:ns1="http://www.google.com">
<ns1:id_name>Mario</ns1:id_name>
<ns1:id_address>Newsburgh</ns1:id_address>
</users>
</payload>The short answer is "yes". The long answer is "what are you planning on doing with the result, and 'process it' or 'parse it' isn't an answer"
But really, you need to do some research

Similar Messages

  • Get the Common from Two Internal Tables with same structure

    Hi ,
    I need to get the Common data from Two Internal Tables with same structure with using the looping method.
    For e.g.
    I have two internal table say ITAB1 and ITAB2.
    ITAB1 has values A,B,C,D,E,F
    ITAB2 has values A,H,B,Y,O
    Output at runtime should be : A,B

    Hi mohit,
    1. If u want to compare all fields,
       for matching purpose,
       then we can do like this.
    2.
    report abc.
    data : a like t001 occurs 0 with header line.
    data : b like t001 occurs 0 with header line.
    loop at a.
      LOOP AT B.
        IF A = B.
          WRITE :/ 'SAME'.
        ENDIF.
      endloop.
    ENDLOOP.
    regards,
    amit m.

  • How to check string array elements with a string with in one forEach tag ?

    Hi All,
    I am new to JSTL and EL. I need to change the following Java code into JSTL and EL.. I struggled to change this code into JSTL.
    How can i change the if loop which tests the string array element with one bean property ?
    -------------------------------------------------------------------------------------------------------------for(int j=0 ; j < iSelectedCount; j++)
    if(strSelectedRoleId[j].equals(lineRole.getRoleID()))
    isAvailable = true;
    Please help me on this.
    It is very urgent......
    Thank you for ur help,
    Natraj

    import java.util.Calendar;
    Calendar rightNow = Calendar.getInstance();  // gets the current date and time to millisec
    Calendar earlyTime = Calendar.getInstance().set(Calendar.HOUR_OF_DAY, 6).set(Calendar.MINUTE, 30);
    Calendar lateTime = Calendar.getInstance().set(Calendar.HOUR_OF_DAY, 8).set(Calendar.MINUTE, 0);
    if (rightNow.compareTo(earlyTime)> 0 && rightNow.compareTo(lateTime) < 0){
    // do something
    }Try this.

  • Need help with XML structure

    Hello, I would like to create an extention that will help to
    manage a
    glossary.
    First I need to decide on the structure of the xml document
    that will
    contain all glossary entries. Since I don't have much
    experience with XML in
    extention content, I was wondering if there are certain
    recommendations I
    should follow.
    What is preferable: using attributes that will holt the
    content or rather
    having xml-elements. What is easy to parce?
    I would greatly appreciate any tips, help and suggestions.
    Olyalyu

    .oO(olga)
    >First I need to decide on the structure of the xml
    document that will
    >contain all glossary entries. Since I don't have much
    experience with XML in
    >extention content, I was wondering if there are certain
    recommendations I
    >should follow.
    I would start as simple as possible, for example with
    something like
    this:
    <glossary>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    </glossary>
    Of course it also depends on what you want to do with this
    structure and
    if you need additional informations.
    >What is preferable: using attributes that will holt the
    content or rather
    >having xml-elements. What is easy to parce?
    There's no real rule-of-thumb whether to use elements or
    attributes.
    If unsure, use elements.
    Micha

  • From IDoc to SMTP with XML attachment.

    Hi,
    I'm looking for some info to guide me up how to split and IDOC structure into an email message that contents an XML file attached and a NFS repository.
    I mean, i need to create an XML FIle from the IDOC and i need to post it into a NFS directory and also send it attached into an email message.
    May i create both messages in a single process?
    This is my scenario:
    <R/3 Sales IDoc> TO <SMTP/FTP Business partners> and <local file system>.
    Thnx in advanced.
    Gerardo.
    Ps. I will post reward points.

    Bhavesh/Krishna,
    Thank you guys for your helpful comments, just to acknowledge you i have gathered all the links that i found in these forums in order to help other people in this issue:
    <b>Introduction to IDoc-XI-File scenario and complete walk through for starters</b>
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    <b>IDOC to XML</b>
    IDOC to XML
    <b>Send a XML file using the mail adapter</b>
    Send a XML file using the mail adapter
    <b>Example: Multicast – Multiple Receivers (with Response Message)</b>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm
    <b>Multi-Mapping without BPM - Yes, it’s possible!</b>
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    <b>Mail Adapter scenarios – SAP Exchange Infrastructure</b>
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    <b>XI: Dynamic name in the mail attachment - pseudo "variable substitution"</b>
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
    <b>XI: HTML e-mails from the receiver mail adapter ?</b>
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    <b>Receiving Mail attachments using additional files of file adapter.</b>
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Best regards,
    Gerardo.

  • Manual Drag and Drop from Tree to Tree with XML dataProvider

    Been struggling with Drag-n-Drop between Tree controls. As far as I can tell, it doesn't work very well.
    I have boiled it down to a minimal project below and would be ever so grateful if someone can tell me what I am doing wrong.
    The complete MXML application file is below. Flex 3.5.
    Two trees side-by-side. One has XML that I want to drag over to the drop tree.
    On the DragOver() event, I select the node which is given to me by the calculateDropIndex() function.
    After startup; first open the L1 branch on the left and drag L11 over and drop it on the right Tree.
    Looks good, root node is selected/highlighted and dropFeedback is correct and dropping the node drops it as a child of "Start Here".
    Open the Start Here root node to see it.
    Now proceded to #1 below.
    Here are the problems:
    1) Drag "L12" from the left tree over to the middle of the right tree (below "L11" just dropped). "L11" will not be selected. The Selected node (with dropIndex=4) will be the entire new nested XML "<L><L11/></L>"; and therefore only "Start Here" node will be highlighted. Drop "L12" anyway. So, it is acting like selectedIndex = <anynumber> will only select the root node. How do I get the new L11 to show as a drop target?
    2) Now drag "L21" from the left tree onto the right tree; again starting below all nodes on the right tree. Selected node will not change until you drag it above #2 out of 3. Then, you can drag it anywhere, and correctly highlight/select any node as the target, and get that node in code. This is a problem. Go ahead and drop it anywhere. Now if you drag, for example, L22 from the left it will correctly highlight/select any node without having to first drag above #2 in the list.
    3) Now, grab and drag L11 a second time and drop it at the bottom on the right. Drag L23 over. No matter which L11 you hover over, it highlights the one at the bottom. How can this be right?
    Those are the bugs I would like to figure out. If I am doing it wrong, I sure would like to know what I am doing wrong. The code below is distilled down to one simple mxml application module.
    Thanks,
    Jeff
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" minWidth="955" minHeight="600">
    <mx:Script>
    <![CDATA[
    import mx.collections.XMLListCollection; 
    import mx.core.IUIComponent; 
    import mx.events.DragEvent; 
    import mx.managers.DragManager; 
    Bindable] 
    private var dragXML:XML = 
    <Tree label="root"><L1 label="L1">
    <L11 label="L11"/>
    <L12 label="L12"/>
    </L1>
    <L2 label="L2">
    <L21 label="L21"/>
    <L22 label="L22"/>
    <L23 label="L23"/>
    </L2>
    </Tree> ; 
    Bindable] 
    private var dragXMLListCollection:XMLListCollection = new XMLListCollection(dragXML.*); 
    Bindable] 
    private var dropXML:XML = 
    <Tree label="root"><L label="Start Here"/>
    </Tree> ; 
    Bindable] 
    private var dropXMLListCollection:XMLListCollection = new XMLListCollection(dropXML.*); 
    // ************* Drag Drop Events ********************
    private function dragEnter(evt:DragEvent):void
    if (evt.dragSource.hasFormat("treeItems")) DragManager.acceptDragDrop(IUIComponent(evt.target));}
    private function dragOver(evt:DragEvent):void
    // Calculate dropindex and set selected item
    var dropIndex:int = dropTree.calculateDropIndex(evt);dropTree.selectedIndex = dropIndex;
    // setting the selected item based on calculateDropIndex()
    var selNode:XML = dropTree.selectedItem as XML; // Getting XML for selected node in Tree
    var selNodeName:String = (selNode != null ? selNode.localName() : ""); 
    // Get dragged XML
    var dragNode:XML = XML(evt.dragSource.dataForFormat("treeItems")[0]); 
    var dragNodeName:String = dragNode.localName(); 
    trace(evt, "\n", dropIndex, "\n", (selNode ? selNode.toXMLString() : "null"), "\n", dragNode.toXMLString()); 
    // you cannot drop a shorter name on a longer name
    if ((dragNodeName.length >= selNodeName.length) && (selNode != null)) DragManager.showFeedback(DragManager.COPY); 
    else DragManager.showFeedback(DragManager.NONE);}
    private function dragDrop(evt:DragEvent):void
    // get selected node in drop tree
    var selNode:XML = dropTree.selectedItem as XML; //selected in dragOver() event
    // Get dragged XML
    var dragNode:XML = XML(evt.dragSource.dataForFormat("treeItems")[0]); 
    // Drop logic
    // Compare dragNode.localName().length to dropNode.localName().length
    // if drag longer; drop as child
    // if drag is equal; drop as sibling
    // Drag can never be shorter in this example.
    var isChild:Boolean = String(dragNode.localName()).length > String(selNode.localName()).length; 
    if (isChild){
    selNode.insertChildAfter(
    null, dragNode);}
    else
    selNode.parent().insertChildAfter(selNode, dragNode);
    ]]>
    </mx:Script>
    <mx:Tree id="dragTree" width="30%" showRoot="true" height="100%" labelField="@label"dataProvider="
    {dragXMLListCollection}"dragEnabled="
    true" dragMoveEnabled="false" dropEnabled="false" />
    <mx:Tree id="dropTree" width="30%" showRoot="true" height="100%" labelField="@label"dataProvider="
    {dropXMLListCollection}"dragEnter="dragEnter(event);" dragDrop="dragDrop(event);" dragOver="dragOver(event);"
    />
    </mx:Application>

    I just found out that by setting the dataProvider for each tree to the XML variable instead of the XMLListCollection variable, problems #1 and #2 went away!
    But the documentation says to use an XMLListCollection if you will be dynamically changing the tree contents.
    And, I just found out that #1 returns if I specify showRoot="false". But with it set to "true" that problem goes away. Is there some sort of minimum XML required to make drag-n-drop work on these Tree controls?
    Hmmmm. It appears that (for #3) the calculateDropIndex() will always return the last matching XML node - by name - in the tree.

  • Limiting attributes of multiple elements with XML Schema

    I am working with a curriculum development group and we are trying to get all of their content into and XML format so that it can be easily displayed by a browser and parsed by our application. For quiz pages we would like to do something like the following:
    <question>
      <text>Who won superbowl XXXII?</text>
      <answer correct="true">Denver Broncos</answer>
      <answer correct="false">Green Bay Packers</answer>
      <answer correct="false">Dallas Cowboys</answer>
      <answer correct="false">Atlanta Falcons</answer>
    </question>However, I can't find a way to limit it so that only one answer element within a question element can have a correct attribute with the value of true. Is this possible?
    Additionally, if anybody has recommendations for already developed XML based languages for curriculum that they have experience with that would be appreciated.

    well, you create 4 sequences where each sequence has a different team winning, and then choice these 4 sequences together. Admittedly, that would be ugly.

  • Urgent: Calling web service from PL/SQl fails with XML parsing

    Hi,
    I am trying to call a web service from PL/SQL (using SOAP protocol and UTL_HTTP built in Package).I am using Oracle 9i .I am calling from pl/sql block invoking web service method created in java.
    I am getting the below response object as a SOAP protocol, but i couldn't able to parse the SOAP.
    Could you please provide the values of FirstName, LastName and ErrorDescription
    declare
    request_env varchar2(32767);
    v_xml XMLTYPE;
    l_user_first_name varchar2(100);
    l_user_last_name varchar2(100);
    l_error_value varchar2(100);
    begin
    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    <axis2ns1:ErrorDescription />
    </UserInfoObjResponse>
    </soapenv:Body>
    </soapenv:Envelope>';
    dbms_output.put_line('Length of Request:' || length(response_env));
    dbms_output.put_line ('Request: ' || response_env);
    v_xml := XMLTYPE(response_env);
    -- SELECT EXTRACTVALUE(v_xml, '//UserInfoObjResponse/FirstName') INTO l_user_fast_name varchar2(100); FROM DUAL;
    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    dbms_output.put_line ('l_error_value: ' || l_error_value);
    end;

    In Oracle 9i:
    SQL> declare
      2    response_env varchar2(32767);
      3    v_xml XMLTYPE;
      4    l_user_first_name varchar2(100);
      5    l_user_last_name varchar2(100);
      6    l_error_value varchar2(100);
      7  begin
      8    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      9                     <soapenv:Body>
    10                       <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    11                         <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    12                         <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    13                         <axis2ns1:ErrorDescription />
    14                       </UserInfoObjResponse>
    15                     </soapenv:Body>
    16                   </soapenv:Envelope>';
    17
    18    dbms_output.put_line('Length of Request:' || length(response_env));
    19  --  dbms_output.put_line ('Request: ' || response_env);
    20
    21    v_xml := XMLTYPE(response_env);
    22
    23    select EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()') first_name,
    24           EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()') last_name,
    25           EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescription/text()') error_description
    26      into l_user_first_name, l_user_last_name, l_error_value
    27      from dual;
    28
    29    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    30    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    31    dbms_output.put_line ('l_error_value: ' || l_error_value);
    32  end;
    33  /
    Length of Request:530
    l_user_first_name: First Name Output
    l_user_last_name : Last Name Output
    l_error_value:
    PL/SQL procedure successfully completed.In Oracle 10g:
    SQL> declare
      2    response_env varchar2(32767);
      3    v_xml XMLTYPE;
      4    l_user_first_name varchar2(100);
      5    l_user_last_name varchar2(100);
      6    l_error_value varchar2(100);
      7  begin
      8    response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      9                     <soapenv:Body>
    10                       <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
    11                         <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
    12                         <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
    13                         <axis2ns1:ErrorDescription />
    14                       </UserInfoObjResponse>
    15                     </soapenv:Body>
    16                   </soapenv:Envelope>';
    17
    18    dbms_output.put_line('Length of Request:' || length(response_env));
    19  --  dbms_output.put_line ('Request: ' || response_env);
    20
    21    v_xml := XMLTYPE(response_env);
    22
    23    select r.*
    24      into l_user_first_name, l_user_last_name, l_error_value
    25    from XMLTABLE('/' PASSING v_xml
    26                  COLUMNS
    27                  first_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()',
    28                  last_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()',
    29                  error_description varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescrition/text()'
    30                  ) r;
    31
    32    dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
    33    dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
    34    dbms_output.put_line ('l_error_value: ' || l_error_value);
    35  end;
    36  /
    Length of Request:530
    l_user_first_name: First Name Output
    l_user_last_name : Last Name Output
    l_error_value:
    PL/SQL procedure successfully completed.Max
    http://oracleitalia.wordpress.com
    Edited by: Massimo Ruocchio on Feb 14, 2010 11:55 PM
    Added the first one.

  • Path to the element in xml structure

    Hi,
    I have a input schema and I want to find out the exact path of one of the element of that schema. Schema uses some namespaces. I want the path of element which I can use in the inline xslt to reach upto that element.
    XPATH of element(TDLINE) in my source schema is :
    /*[local-name()='Receive' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Receive']/*[local-name()='idocData' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Receive']/*[local-name()='E2EDKT1002GRP'
    and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700']/*[local-name()='E2EDKT2001' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700']/*[local-name()='TDLINE' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700']
    Namespaces are:
    xmlns:s1="http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Receive"
    xmlns:s0="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700"
    I tried different possible paths such as:
    s1:idocData/s0:E2EDKT1002GRP/E2EDKT2001/TDLINE
    s1:idocData/s0:E2EDKT1002GRP/s0:E2EDKT2001/s0:TDLINE
    Can someone help me findinng the exact path of TDLINE?
    Thanks, Girish R. Patil.

    The exact XPATH is what you wrote:
    /*[local-name()='Receive' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Receive']/*[local-name()='idocData'
    and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Receive']/*[local-name()='E2EDKT1002GRP' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700']/*[local-name()='E2EDKT2001' and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700']/*[local-name()='TDLINE'
    and namespace-uri()='http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700']
    If you can use namespace-prefixes, it will be:
    s1:Receive/s1:idocData/s0:E2EDKT1002GRP/s0:E2EDKT2001/s0:TDLINE
    Both should work, but the latter will only work if you use an XPATH utility where the namespace-prefixes s0 and s1 has/can be declared.
    Morten la Cour

  • Message Mapping: Map value from the first element in a context in target el

    Hi experts,
    I have a problem with a message mapping in XI. I hope you can help me. At first I will give you a source and a target structure. Then I will explain the problem.
    <u>Source structure:</u>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    The structure can contain more than one E1EDP01-Elements, more than one E1EDPT1-Elements and more than one E1EDPT2-Elements.
    <u>target structure:</u>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    For every E1EDP01-Element my mapping creates one LineItem-Element in the target structure. To fill the element <vendmemo> the mapping should do the following steps:
    The mapping should search in E1EDP01 for a E1EDPT1 with the TDID = Z505. And from this E1EDPT1-Element (with the TDID=Z505) the mapping should take the value <TDLINE> from the first E1EDPT2-Element in the context of the E1EDPT1-Element (the E1EDPT1 with the TDID=Z505) and put this value in <vendmemo>.
    The mapping should do this action for every E1EDP01 -> so for every LineItem.
    I tried it with UDF but I didn't found a solution. Can anybody help me?
    best regards
    Christopher

    Hello experts,
    i was wrong ... my mapping isn't still working. I had created a test instance. and only for this test instance the mapping (see above) works.
    Can anybody help me? I'm trying the whole day but I can't find a solution. Here a second description of my problem:
    <u>Source Structure:</u>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    <u>Target Structure:</u>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    <u>Description of my Problem:</u>
    For each E1EDP01 in the source structure the mapping creates one LineItem in the target structure.
    The element "vendmemo" should be created in any case ... also if it will be empty.
    To fill the element "vendmemo" the mapping should search in E1EDP01 for a E1EDPT1 with the TDID=Z505. If there is an element E1EDPT1 with the TDID=Z505, the mapping should write the TDLINE from the first E1EDPT2 (under the element E1EDPT1 with the TDID=Z505) in the target field "vendmemo".
    The Problem is that TDLINE an TDID are not in the same context. I tried it with setting the context of both to E1EDP01. But it was not working ... have you any idea oder suggestion?
    Thank you very much
    best regards
    Christopher

  • Converting string data from a web service respons into XML structure of XI

    Hi,
    We receive a string structure from a web service.
    The string structure has an xml type format, that is all the tags and its content are in one line .
    The WSDL file of the webservice defines its response structure as a string type.
    How do i convert this string into proper XML structure (predefined by me in Integration repository).
    OR how do i make XI understand this string as an XML structure for further processing.
    Later i have to map this XML message type into IDoc.
    Himani

    Hi Himani,
    Please find the code for ur requirement -
    String need to parse -<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>
    Below mentioned code will convert it to -<MT_DATA><FROMDATE>20080202</FROMDATE><TODATE>20080101</TODATE></MT_DATA>
    Create a Message type and map it like this using java mapping ( no need to use Graphical mapping).
    Use MT_DATA as source and map it to your target structure .
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class XMLParser {
         private Map param = null;
         public static void main(String[] args) {
              try {
                   XMLParser wdb = new XMLParser();
                   wdb.parse();
              } catch (Exception e) {
                   e.printStackTrace();
         public void setParameter(Map param) {
              this.param = param;
              if (param == null) {
                   this.param = new HashMap();
         public void parse() {
              String document = "<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>";
              try {
                   Document sdoc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   // Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   // parse using builder to get DOM representation of the XML file
                   sdoc = db.parse(new InputSource(new StringReader(document)));
                   Element docEle = sdoc.getDocumentElement();
                   NodeList nl = docEle.getElementsByTagName("from_date");
                   Element lstElmnt = (Element) nl.item(0);
                   NodeList nl1 = docEle.getElementsByTagName("to_date");
                   Element fstElmnt = (Element) nl1.item(0);
                   System.out.println(fstElmnt.getFirstChild().getNodeValue());
                   System.out.println(lstElmnt.getFirstChild().getNodeValue());
                   Document tdoc = db.newDocument();
                   Element structure = createElement("MT_DATA", null, tdoc);
                   tdoc.appendChild(structure);
                   Element statement = createElement("FROMDATE", fstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement);
                   Element statement2 = createElement("TODATE", lstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement2);
                   System.out.println("Struct is :::"+tdoc.getDocumentElement().toString());               
              } catch (DOMException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }  catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SAXException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (TransformerFactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         static Element createElement(String elementName, String content,
                   Document document) {
              Element returnElement;
              returnElement = document.createElement(elementName);
              if (content != null) {
                   Text T = document.createTextNode(content);
                   returnElement.appendChild(T);
              return returnElement;
         static Element createElement(String elementName, String content,
                   String attributeName, String attributeValue, Document document) {
              Element returnElement = createElement(elementName, content, document);
              returnElement.setAttribute(attributeName, attributeValue);
              return returnElement;
    Regards,
    Kishore

  • Issue with Contract Replication from SRM to MDM  - XML structure

    Hi
    We are having an issue with trnsfering a contract to MDM. We have released the contract for update to MDM in the contract through the distribute to catalog option. An XML is generated in SRM that gets sucessfully passed to PI through Catalogupdatenotification_out. In PI the XML fails in the Interface Determination step. the issue that has been noticed is that the XML that is generated in SRM does not contain product category or product ID which is basically what the condition mapping in PI checks for. The conditions in PI were setup as per SAP.
    But now the XML fails in PI because it does not find a combination for Catalog type code = 03 and product category. Please find the XML structure in SRM and you will see that it does not have a product category even though the contract has one.
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:CatalogTransmission xmlns:n0="http://sap.com/xi/EBP" xmlns:prx="urn:sap.com:proxy:SS1:/1SAI/TASDE808778FFEB81012891:701:2010/10/07">
    - <StandardBusinessDocumentHeader>
      <ID schemeID="0080">56000004100000000220110616202243</ID>
      <CreationDateTime>2011-06-16T20:22:43Z</CreationDateTime>
    - <SenderParty>
      <InternalID schemeID="PartyID" schemeAgencyID="SS1CLNT100">143</InternalID>
      </SenderParty>
      </StandardBusinessDocumentHeader>
    - <Catalog>
      <ID>5600000410</ID>
      <CatalogTypeCode>03</CatalogTypeCode>
    - <NameList>
      <Name>(Copy of Contract 5600000395)</Name>
      </NameList>
      <ActionCode>04</ActionCode>
      <CompleteTransmissionIndicator>true</CompleteTransmissionIndicator>
    - <ValidityDateTimePeriod>
      <StartDateTime>2011-06-13T12:00:00Z</StartDateTime>
      <EndDateTime>2012-06-12T12:00:00Z</EndDateTime>
      </ValidityDateTimePeriod>
    - <CatalogContent>
    - <ItemList>
    - <Item>
      <ID>1</ID>
      <ActionCode>04</ActionCode>
      <CompleteTransmissionIndicator>false</CompleteTransmissionIndicator>
    - <PropertyValuationList>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE</PropertyReference>
    - <PropertyValues>
    - <MultipleValue>
      <Index>1</Index>
    - <SimpleValue>
      <AmountSpecification currencyCode="USD">1.0</AmountSpecification>
      </SimpleValue>
      </MultipleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE_BASIS_QUANTITY</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <QuantitySpecification unitCode="EA">1.0</QuantitySpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>CCM/PMNTTRMS</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <NameSpecification>0002</NameSpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
      </PropertyValuationList>
      </Item>
    - <Item>
      <ID>2</ID>
      <ActionCode>04</ActionCode>
      <CompleteTransmissionIndicator>false</CompleteTransmissionIndicator>
    - <PropertyValuationList>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE</PropertyReference>
    - <PropertyValues>
    - <MultipleValue>
      <Index>1</Index>
    - <SimpleValue>
      <AmountSpecification currencyCode="USD">12.0</AmountSpecification>
      </SimpleValue>
      </MultipleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE_BASIS_QUANTITY</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <QuantitySpecification unitCode="EA">1.0</QuantitySpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>CCM/PMNTTRMS</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <NameSpecification>0002</NameSpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
      </PropertyValuationList>
      </Item>
      </ItemList>
      </CatalogContent>
      </Catalog>
      </n0:CatalogTransmission>
    Edited by: vishakhrajeev123 on Jun 20, 2011 6:49 PM

    Dear Krupa,
    Thank you for your quick reply.
    So we should consider the scenario where SRM is the central repository for the contracts, and all the changes done in SRM should be replicated to ERP.
    In this scenario, do you know which steps should be done to allow contract replication from SRM to ERP? I already created a central contract in SRM but there is no message sent to PI.
    Thanks in advance.
    Regards,
    Andreia

  • Converting XML string to Element Type

    Im receiving an XML document as a String.
    I have defined an element whose message type is of the same schema as the XML String.
    How can i assign this string to this element in BPEL?
    im using the setVariable function as follows:
    setVariableData("Customer","CustomerType", new String(received))
    It does not throw an error. But im unable to retrieve any of the values from this element.
    Could someone pls help me with this?

    The output seems to be fine and structured in the XML Format, when i pass the string to the Message Type(ie CustomerType) rather than the root node (CustomerElement).
    eg: in this case i have
    Customer - > CustomerType -> CustomerElement - > Name, date etc...
    When i assign the string to Customer Element, it displays it as a string.
    When i assign the string to CustomerType it displays it in the XML Structure.
    It however throws an error when i assign an element in the data to something.

  • How to use STRANS to translate XML to ABAP with deep structure

    every experts, I want to use Tcode: STRANS to translate XML to ABAP, But it does not work well,
    here is XML code,I want to translate this XML into an an Inter table gt_orders with deep structure of oeb, and colum oeb is also and intertable,how can I do this.
    <?xml version="1.0" encoding="gb2312" ?><axmt410><ObjectID>setSalesOrder</ObjectID><azp01>000000</azp01><oea00>1</oea00><ta_oeaecn>SO-140227-3041</ta_oeaecn><oea03>25325017</oea03><oea02>2014-02-27 17:44:44.0</oea02><ta_oea002>2763.0</ta_oea002><ta_oea001>0.0</ta_oea001><oea14></oea14><oea15>25325017</oea15><oea23>RMB</oea23><oeaconf>S3</oeaconf><oea10></oea10><oeaud01>null</oeaud01><ta_oea007></ta_oea007><oea25>101</oea25><ta_oea008>0</ta_oea008><ta_oea009>null</ta_oea009><oeauser>Hanjingya</oeauser><ta_oeanday>2014-02-27 17:44:44.991</ta_oeanday><ta_oeamday>2014-02-28 08:30:14.866</ta_oeamday><ta_oeacday>2014-02-28 08:30:14.866</ta_oeacday><oeaud02>0</oeaud02><ta_oea030>null</ta_oea030><oeb><oeb03>1</oeb03><oeb04>7400208249</oeb04><oeb05>PCS</oeb05><oeb17>921.0</oeb17><oeb13>921.0</oeb13><oeb15></oeb15><oeb12>5</oeb12><oeb09>990001</oeb09><ta_oeb001></ta_oeb001><ta_oeb002>Yunnan</ta_oeb002><ta_oeb003>address1</ta_oeb003><ta_oeb004>zhangdagui、zhanglan</ta_oeb004><ta_oeb005>15974749998、15987782008</ta_oeb005><ta_oeb006>address and street</ta_oeb006><oebud01></oebud01></oeb><oeb><oeb03>2</oeb03><oeb04>7400208250</oeb04><oeb05>PCS</oeb05><oeb17>921.0</oeb17><oeb13>921.0</oeb13><oeb15></oeb15><oeb12>5</oeb12><oeb09>990001</oeb09><ta_oeb001></ta_oeb001><ta_oeb002>Yunnan</ta_oeb002><ta_oeb003>address2</ta_oeb003><ta_oeb004>zhangdagui、chenlan</ta_oeb004><ta_oeb005>15974749998、15987782008</ta_oeb005><ta_oeb006>address and street</ta_oeb006><oebud01></oebud01></oeb></axmt410>
    I write these codes in SAP XSLT  editor
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
       <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
       <xsl:strip-space elements="*"/>
       <xsl:strip-space elements="*"/>
       <xsl:template match="/">
         <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
           <asx:values>
             <ORDERS>
               <xsl:apply-templates select="//axmt410"/>
             </ORDERS>
           </asx:values>
         </asx:abap>
       </xsl:template>
       <xsl:template match="axmt410">
         <OBJECTID>
           <xsl:value-of select="ObjectID"/>
         </OBJECTID>
         <AZP01>
           <xsl:value-of select="azp01"/>
         </AZP01>
         <OEA00>
           <xsl:value-of select="oea00"/>
         </OEA00>
         <TA_OEAECN>
           <xsl:value-of select="ta_oeaecn"/>
         </TA_OEAECN>
         <OEA03>
           <xsl:value-of select="oea03"/>
         </OEA03>
         <OEA05>
           <xsl:value-of select="oea05"/>
         </OEA05>
         <OEA02>
           <xsl:value-of select="oea02"/>
         </OEA02>
         <TA_OEA002>
           <xsl:value-of select="ta_oea002"/>
         </TA_OEA002>
         <TA_OEA001>
           <xsl:value-of select="ta_oea001"/>
         </TA_OEA001>
         <OEA14>
           <xsl:value-of select="ora14"/>
         </OEA14>
         <OEA15>
           <xsl:value-of select="ora15"/>
         </OEA15>
         <OEA23>
           <xsl:value-of select="ora23"/>
         </OEA23>
         <OEACONF>
           <xsl:value-of select="oeaconf"/>
         </OEACONF>
         <OEA10>
           <xsl:value-of select="ora10"/>
         </OEA10>
         <OEAUD01>
           <xsl:value-of select="oeaud01"/>
         </OEAUD01>
         <TA_OEA007>
           <xsl:value-of select="ta_oea007"/>
         </TA_OEA007>
         <OEA25>
           <xsl:value-of select="ora25"/>
         </OEA25>
         <TA_OEA008>
           <xsl:value-of select="ta_oea008"/>
         </TA_OEA008>
         <TA_OEA009>
           <xsl:value-of select="ta_oea009"/>
         </TA_OEA009>
         <TA_OEA013>
           <xsl:value-of select="ta_oea013"/>
         </TA_OEA013>
         <TA_OEA014>
           <xsl:value-of select="ta_oea014"/>
         </TA_OEA014>
         <TA_OEA015>
           <xsl:value-of select="ta_oea015"/>
         </TA_OEA015>
         <TA_OEA016>
           <xsl:value-of select="ta_oea016"/>
         </TA_OEA016>
         <TA_OEA017>
           <xsl:value-of select="ta_oea017"/>
         </TA_OEA017>
         <TA_OEA018>
           <xsl:value-of select="ta_oea018"/>
         </TA_OEA018>
         <TA_OEA019>
           <xsl:value-of select="ta_oea019"/>
         </TA_OEA019>
         <TA_OEA020>
           <xsl:value-of select="ta_oea020"/>
         </TA_OEA020>
         <TA_OEA021>
           <xsl:value-of select="ta_oea021"/>
         </TA_OEA021>
         <TA_OEA022>
           <xsl:value-of select="ta_oea022"/>
         </TA_OEA022>
         <TA_OEA028>
           <xsl:value-of select="ta_oea028"/>
         </TA_OEA028>
         <OEAUSER>
           <xsl:value-of select="oeauser"/>
         </OEAUSER>
         <TA_OEANDAY>
           <xsl:value-of select="ta_oeanday"/>
         </TA_OEANDAY>
         <TA_OEAMDAY>
           <xsl:value-of select="ta_oeamday"/>
         </TA_OEAMDAY>
         <TA_OEACDAY>
           <xsl:value-of select="ta_oeacday"/>
         </TA_OEACDAY>
         <OEAUD02>
           <xsl:value-of select="oeaud02"/>
         </OEAUD02>
         <TA_OEA030>
           <xsl:value-of select="ta_oea030"/>
         </TA_OEA030>
         <OEB>
           <xsl:for-each select="oeb">
             <OEB03>
               <xsl:value-of select="oeb03"/>
             </OEB03>
             <OEB04>
               <xsl:value-of select="oeb04"/>
             </OEB04>
             <OEB05>
               <xsl:value-of select="oeb05"/>
             </OEB05>
             <OEB17>
               <xsl:value-of select="oeb17"/>
             </OEB17>
             <OEB13>
               <xsl:value-of select="oeb13"/>
             </OEB13>
             <OEB15>
               <xsl:value-of select="oeb15"/>
             </OEB15>
             <OEB12>
               <xsl:value-of select="oeb12"/>
             </OEB12>
             <OEB09>
               <xsl:value-of select="oeb09"/>
             </OEB09>
             <TA_OEB001>
               <xsl:value-of select="ta_oeb001"/>
             </TA_OEB001>
             <TA_OEB002>
               <xsl:value-of select="ta_oeb002"/>
             </TA_OEB002>
             <TA_OEB003>
               <xsl:value-of select="ta_oeb003"/>
             </TA_OEB003>
             <TA_OEB004>
               <xsl:value-of select="ta_oeb004"/>
             </TA_OEB004>
             <TA_OEB005>
               <xsl:value-of select="ta_oeb005"/>
             </TA_OEB005>
             <TA_OEB006>
               <xsl:value-of select="ta_oeb006"/>
             </TA_OEB006>
             <OEBUD01>
               <xsl:value-of select="oebud01"/>
             </OEBUD01>
           </xsl:for-each>
         </OEB>
       </xsl:template>
    </xsl:transform>
    and I use below ABAP program for a test, but the items from XML can not translate into Interner table gt_orders-oeb[]
    TYPE-POOLS abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\temp\order02.xml'.
    * This is the structure for the data from the XML file
    TYPES:
       BEGIN OF typ_s_oeb,
         oeb03     TYPE string,    "
         oeb04     TYPE string,    "
         oeb05     TYPE string,    "
         oeb17     TYPE string,    "
         oeb13     TYPE string,   
         oeb15     TYPE string,   
         oeb12     TYPE string,    "
         oeb09     TYPE string,    "
         ta_oeb001 TYPE string,    "
         ta_oeb002 TYPE string,    "
         ta_oeb003 TYPE string,    "
         ta_oeb004 TYPE string,    "
         ta_oeb005 TYPE string,    "
         ta_oeb006 TYPE string,    "
         ta_oeb013 TYPE string,    "
         ta_oeb014 TYPE string,    "
         ta_oeb015 TYPE string,    "
         ta_oeb016 TYPE string,    "
         ta_oeb017 TYPE string,    "
         ta_oeb018 TYPE string,    "
         ta_oeb019 TYPE string,    "
         ta_oeb020 TYPE string,    "
         ta_oeb021 TYPE string,    "
         ta_oeb022 TYPE string,    "
         oebud01   TYPE string,    "
       END OF typ_s_oeb.
    TYPES: typ_t_oeb TYPE TABLE OF typ_s_oeb WITH KEY oeb03.
    TYPES:
       BEGIN OF typ_s_order,
         objectid   TYPE string,   "
         azp01      TYPE string,   "
         oea00      TYPE string,   "
         ta_oeaecn  TYPE string,   "
         oea03      TYPE string,   "
         oea02      TYPE string,   "
         ta_oea002  TYPE string,   "
         ta_oea001  TYPE string,   "
         oea14      TYPE string,   "
         oea15      TYPE string,  
         oea23      TYPE string,   "
         oeaconf    TYPE string,   "
         oea10      TYPE string,   "
         oeaud01    TYPE string,   "
         ta_oea007  TYPE string,   "
         oea25      TYPE string,   "
         ta_oea008  TYPE string,   "
         ta_oea009  TYPE string,   "
         oeauser    TYPE string,   "
         ta_oeanday TYPE string,   "
         ta_oeamday TYPE string,   "
         ta_oeacday TYPE string,   "
         oeaud02    TYPE string,   "
         ta_oea030  TYPE string,   "
         ta_oea013  TYPE string,
         ta_oea014  TYPE string,
         ta_oea015  TYPE string,
         ta_oea016  TYPE string,
         ta_oea017  TYPE string,
         ta_oea018  TYPE string,
         ta_oea019  TYPE string,
         ta_oea020  TYPE string,
         ta_oea021  TYPE string,
         ta_oea022  TYPE string,
         ta_oea025  TYPE string,
         oeb        TYPE typ_t_oeb,
        END OF typ_s_order.
    * Table for the XML content
    DATA: gt_itab       TYPE STANDARD TABLE OF char2048,
           gs_itab       LIKE LINE OF gt_itab.
    * Table and work ares for the data from the XML file
    DATA: gt_orders     TYPE STANDARD TABLE OF typ_s_order,
           gs_orders     TYPE typ_s_order.
    * Result table that contains references
    * of the internal tables to be filled
    DATA: gt_result_xml TYPE abap_trans_resbind_tab,
           gs_result_xml TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex     TYPE REF TO cx_root,
           gs_var_text   TYPE string.
    * Get the XML file from your client
    CALL METHOD cl_gui_frontend_services=>gui_upload
       EXPORTING
         filename                = gs_file
       CHANGING
         data_tab                = gt_itab
       EXCEPTIONS
         file_open_error         = 1
         file_read_error         = 2
         no_batch                = 3
         gui_refuse_filetransfer = 4
         invalid_type            = 5
         no_authority            = 6
         unknown_error           = 7
         bad_data_format         = 8
         header_not_allowed      = 9
         separator_not_allowed   = 10
         header_too_long         = 11
         unknown_dp_error        = 12
         access_denied           = 13
         dp_out_of_memory        = 14
         disk_full               = 15
         dp_timeout              = 16
         not_supported_by_gui    = 17
         error_no_gui            = 18
         OTHERS                  = 19.
    IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_orders INTO gs_result_xml-value.
    gs_result_xml-name = 'ORDERS'.
    APPEND gs_result_xml TO gt_result_xml.
    * Perform the XSLT styleshee
    TRY.
         CALL TRANSFORMATION zfx_so_xml_to_abap
         SOURCE XML gt_itab
         RESULT (gt_result_xml).
       CATCH cx_root INTO gs_rif_ex.
         gs_var_text = gs_rif_ex->get_text( ).
         MESSAGE gs_var_text TYPE 'S'.
    ENDTRY.
    LOOP AT gt_orders INTO gs_orders.
    ENDLOOP.

    The simplest way seems to me is to use a XSL file for that. The <xsl:output> attributes doctype-system and doctype-public generate the DTD declaration <!DOCTYPE YOUR_ROOT SYSTEM "yourDTDfile.dtd"> and <!DOCTYPE YOUR_ROOT PUBLIC "yourDTDfile.dtd">, respectively.
    When calling transformerInstance.transform() the XSLT processor performs the identity transformation - it just copies elements, attributes, content, processing instructions and comments to the result stream.
    If you're using an xsl file for your transformation already, simply add <xsl:output doctype-system="yourDTDfile.dtd"/> to your existing XSL file.
    If you're only using the identity transformation you'd need to change the line of code where you obtain the transformer instance from the TransformerFactory to:
    t_factory.newTransformer(new StreamSource("test.xsl"));
    and use this as test.xsl:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:output doctype-system="yourDTDfile.dtd"/>
       <!-- this is the identity transformation -->
       <xsl:template match="*|@*|comment()|processing-instruction()|text()">
          <xsl:copy>
             <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
          </xsl:copy>
       </xsl:template>
    </xsl:stylesheet>Good luck.

  • Issue with working on a webservice that has  xml elements with attributes

    This is  a branchout of Thread: Some more complex sample of invokin WS needed_
    We are working on a project that involves a outbound SALT Web service call that includes complex elements with attributes..We are looking for options of how to use FML API's to pass these attribute values from the application code.
    We opened a ticket with oracle where we were suggested to frame the entire xml and pass the xml using the FML32 of the complex element. But when we framed the xml for Service and put the entire XML which includes the attributes using the FML ID of Service.
    Please find a sample Schema and XML similar to the one we are working on...its associated code
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="Service" type="Service_Type" nillable="true">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="Service_Type">
              <xs:sequence>
                   <xs:element name="DateTime" type="xs:dateTime" nillable="true">
                   </xs:element>
                   <xs:element name="UUID" nillable="true">
                   </xs:element>
                   <xs:element name="Status" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded">
                   </xs:element>
              </xs:sequence>
              <xs:attribute name="Version" type="xs:string" use="required">
              </xs:attribute>
              <xs:attribute name="Name" type="xs:string" use="required">
              </xs:attribute>
         </xs:complexType>
    </xs:schema>
    The sample XML is :
    ___<?xml version="1.0" encoding="UTF-8"?>___
    ___<!--Sample XML file generated by XMLSpy v2010 rel. 2 (http://www.altova.com)-->___
    ___<Service Name="TestService" Version="1.1" xsi:noNamespaceSchemaLocation="Untitled6.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">___
    ___     <DateTime>2001-12-17T09:30:47Z</DateTime>___
    ___     <UUID>text</UUID>___
    ___</Service>___
    wsdlcvt generated the mif file with Service as a FML32 type and all its child elements as "mbstring". We tried to leave as it is and we also tried to replace all the child elements and just had a mif entry for "Service" as a mbstring neither produced a different output...Tried to dump using Ferror32 which did not dump any..._
    The sample C/C++ code as per suggestions were to do the following...
    _1) Have a string with the entire XML for Service_
    xmldata="<Service Name=\"TestService"\ Version="1.1\"_ xsi:noNamespaceSchemaLocation=\"Untitled6.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">_
    _     <DateTime>2001-12-17T09:30:47Z</DateTime>_
    _     <UUID>text</UUID>_
    _</Service>";_
    _2) Use Fmbpack32 to create a mbstring data_
    _memcpy(reqmbptr, (char*)xmldata.data(),xmldata.length());_
    _len=xmldata.length();_
    _Fmbpack32(mbcodeName,reqmbptr,len, packdata,(FLDLEN32 *)&packedlen,0);_
    userlog("Size of packedlen is %d",packedlen);
    3) Add the packed data to the output buffer
    Fadd32(fmlbuffer,Service, packdata,packedlen );
    But we do not see the Service tag populated in the GWWS outbound request.Everything else makes it....any help on how to move ahead would be appreciated...

    It seems you switch to the 10gR3 GA and now the whole XML data is mapped to FLD_MBSTRING.
    I will forward my sample to you by mail, but this sample is not offical sample, it is just QA test case. You can refere it and check what's the difference.
    Please let me know your mail address.
    Regards,
    Xu he

Maybe you are looking for

  • Sending mails to UWL using SO_NEW_DOCUMENT_ATT_SEND_API1 function module

    Hi all, is it possible to view mails send using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to UWL? I am receving emails in my SAP Inbox. Please guide. thanks.

  • Error in SM58 on XI box

    Hi, While trying to post IDocs to an R3 system, getting the following error in sm58 - 'Transactional RFC' transaction 'PASSWORD LOGON NO LONGER POSSIBLE'. But when I do a connection test from SM59, to the corresponding RFC destination listed in the r

  • Multithreading in JMS Adapter

    I am working in SOA 11g and I need to configure multiple threads through JMS Adapter. I have entered <property name="adapter.jms.receive.threads" type="xs:string" many="false">4</property> in the composite.xml of the consumer. (4 being the number of

  • Required step by step guidance to deploy ejb on AppServer

    Hi Friends, I've downloaded the "Sun Java System Application Server Platform Edition" from sun site. But i don't knw how to deploy it using this App server. eg. 1)How to create a project and application (Go to Menu select New something like this) usi

  • DHCP getting self IP address and manually too has no response.

    I have 13" White MacBook Pro didn't  get an IP via DHCP from my USB Modem. It gives the self assigned IP 169.254.X.X. and manually too not working. Please help me what should i do for my internet connection.