Changing datatype, afterwards Message-Mapping cannot produce target element

Hi,
we use PI/700.
I changed a working system by changing a datatype of an existing message (adding a new element). My interface mapping contains two mappings: an XSL-Mapping and afterwards a Message-Mapping.
My interface mapping looks like this:
Message-Type A ->
      XSL-Mapping ->
Message-Type B ->
      Message-Mapping ->
Message-Type B
When I test each mapping alone everything works fine (with the new element I added).
But if I test my interface mapping in IBD with both mappings together, I'll get an error:
"Cannot produce target element /MT_EDM_OUTBOUND_LASTGANG_TO_SAP/LASTGANG/MASSEINHEIT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd".
Is it possible that XI has problems in refreshing the XSDs?
I tried this:
(1) I changed my Message-Mapping and now all elements are mapped 1:1 -> no success!
(2) Later I changed my Message-Mapping and build in "exists" with "if" to check whether the element "MASSEINHEIT" is generated by the XSL-Mapping -> It doesn't exists (??? - WHY? - when I test it, everything works fine)
(2) Afterwards I changed my interface mapping and take only the XSL-Mapping (without the following Message-Mapping) -> the element "MASSEINHEIT" exists now!
I'm totally confused!
Any ideas?
Regards
Wolfgang Hummel

Hi,
If you have made structural changes to the data type..such as number of fields have decreased/increased..or some new fld altogether, then you have to activate the datatype..goto message mapping and then re-do the mapping...but if you have made "typo" changes like names have been changed, etc..then i think it should be alrite..i have sometimes made changes to my datatype, but after activating it, i had to redo the mapping..that was it!...the rest would fall into place:) No changes had to be made in the interface mapping..
Regards,
Sushumna

Similar Messages

  • BPM Message Mapping: "Cannot produce target element /ns1:BAPI...."

    Hi,
    A scenario File - BPM - BAPI call was developed, as described in blog 'RFC scenario using BPM' cfr. link
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    The Mapping is as follows:
    MT_EDB_MATERIAL_REQ (1:1) --> BAPI_MATERIAL_EXISTENCE_CHECK (1:1)
    MATNR (1:1) -
    > MATERIAL (1:1)
    When executing the scenario, an error appears in the trace of SXMB_MONI, step 'Request Message Mapping'
    Cannot produce target element /ns1:BAPI_MATERIAL_EXISTENCECHECK. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd....
    I tried the following:
    1) import the XML-file into the testmapping: executed successfully
    File:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_EDB_MATERIAL_REQ xmlns:ns0="http://agfa.com/SD_EDB">
    <MATNR>15P6X</MATNR>
    </ns0:MT_EDB_MATERIAL_REQ>
    2) Removed the mapping on node level and left mapping only on element level (material): same error
    3) Activated the message mapping, interface mapping, determinations, etc again...:same error
    4) Removed the Interface Mapping and created it again: same error
    5) Compared the version ID of the Interface Mapping/message mapping in the Monitor trace with the version ID of the IR and saw that there was a difference.
    After the CPA full cache, SXI_CACHE full refresh and object refresh in the IB Administration, the differences remain, and also the error....
    Anybody an idea ?

    Hi
    >>>Cannot produce target element /ns1:BAPI_MATERIAL_EXISTENCECHECK. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd....
    The error clearly says that one of the occurrence value  for the target node mentioned is not coming from the source during mapping. The easiest way to solve the problem is as follows
    <b>
    First Execute the mapping as pointed out by "Raj" and the following steps.
    </b>
    1. Goto the Mapping Editor
    2. Double click on the target node that is causing the problem here BAPI_MATERIAL_EXISTENCECHECK.
    3.  Right click on the same node and select "DisplayQueue".
    4. View the Queue.
    5. YOu will find "Suppress" entries, which means a value is expected but no value is coming in.
    6.Go from right to left and check each node in the mapping and you will be able to trace where the suppress node comes from and take appropriate action
    regards
    krishna

  • Error in message mapping - Cannot produce target element

    As one step in my integration process, I am builing a very simple file to BPM integration (inbound MI async, outbound MI abstract).
    The source type and the target type are completely equal - I am only doing some modifications to some of the content.
    The type for both messages - source & target message - is an imported external definition (DTD), and hence no DT or MT are created.
    As a first step I am trying to fill the target message with the content from the source message (without any modifications to the content). However, when testing this in the message mapping area, I get an error message already when filling the first element, the 'root node'.
    The error message is as follows:
    Start of test
    Compilation of <MM name> successful
    Cannot produce target element <elementname>. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element <elementname>. . Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    End of test
    Any suggestions?
    Thanks,
    C

    Thanks,
    when creating the source message manually in the MM it worked - so nothing wrong with the mapping.
    I saved this file and compared with the "original file" - containing the content which I wanted to upload, and on which the xsd (external definition) was based - and there where some inconsistancies.
    I changed some values in the source XML which made it work, also when uploading the file from a drive.
    So, I will go back to the source system and try to get a better XML.
    Thanks for now!

  • Mapping exception in XI :Cannot produce target element

    Hi All,
    This is for RFC-to-JDBC Scenario.
    I import an RFC from SAP for Vendor Master ( BTE Event : 00001421). In that there are tables and structures.
    When i create a Vendor in transaction XK01, if i dont fill any of the values in structure WYT3, it gives an exception in mapping in XI when i test it in Message Mapping ( Cannot produce target element /ns1:MT_MDM_RECEIVER/STATEMENT1/NC_SUPPLIERMASTER/ACCESS/PARTNERTYPE. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd ).
    In the XML format in XI at sender side it doesn`t show the fields in the structure at all if it doesnt have any data.
    Thanks & Regards,
    Ruchi

    Hi Suraj,
    The sender xml is a structure(FWYT3) which might have data and might not , -
    - <xsd:complexType name="FWYT3">
    - <xsd:sequence>
    - <xsd:element name="PARVW" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="2" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    If this structure doesnt have data it`ll only show like this in sender xml,ni.e it doesnt show the fields in this structure (T_YWYT3).So this field parvw is mapped to partnertype in target.But when parvw doesnt have any data this field is not at all displayed in this structure WYT3.
    - </T_YWYT3>
    The target xml structure is whose occurence is '1'-
    - <xsd:element name="PARTNERTYPE" default="Supplier">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">d27dbd80e40b11da8293ece80a9821f4</xsd:appinfo>
      </xsd:annotation>
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="40" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    Thanks & Regards,
    Ruchi

  • 1:N mapping for ZALEAUD01: Cannot produce target element /ns:0Messages

    Hi,
    I am working on a scenario where my sender MT is ZALEAUD01 (idoc occurance 1..1) and receiver MT is a xml file (Root Node occurance 1..1). I want to generate the number of files based on the occurance of a particular node (E1STATE). I am using a multi-mapping here by changing the occurance of the root node of Receiver xml file  to 0..unbounded in Messages tab of MM and mapping it with E1STATE
    During runtime, I am getting the Mapping error and in Trace I am getting the message: Cannot produce target element /ns0:Messages.Check xml instance is valid for source xsd and target field mapping fullfills requirement of target xsd
    Please tell me some solution
    Thanks & Regards

    Hi All,
    Thanks for your quick responses
    But I have already checked all that..
    My mapping is E1STATE----> MT_Root with the context of E1STATE as Idoc,
    I have tested the mapping in test and everything is successful.
    I know we can not test the mapping with the Idoc structure generated in sxi_monitor as its missing the /ns0: Messages and /ns0: Message1 nodes. So I have added these nodes in my xml structure while testing in IR and the mapping test is successful.
    But @ runtime as these Messages node should be generated by Xi so I feel this is where the problem is.

  • Mapping error: cannot produce target element

    Hello all,
    I am trying to test a mapping. i have 3 messages in my source and one Msg in my target. when i test execute it
    i get this msg:
    1) compilation of mapping successful
    2) cannot produce target elements/Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd.
    I am not sure what the error might be, can somebody please advice..
    Thanks in advance

    Hi Harika,
    how many Elements do u have In your Source Message Type(for example you have 3 elements and how u want to see these elements in your Target Message Type, define that much elements in your Target Message Type and Mappe those)
    1. usually people will go with one to one element mappaing, in such case define your souce and Target Message type Elements equal
    other wise you can do one Source having 3 elements and you want to see only one output from them then use Standard Function like "Contacte" that will add the 3 elements in one.
    if you are satisfied with this please provide points to me.
    Ashok

  • Cannot produce target element

    Hi,
    I am getting "Cannot produce target element /ns:OUTFILE_MT" error when trying to do a simple File2File scenario.
    Message Mapping test is working fine.
    Any help would be appreciated.
    Regards,
    Sudha

    if your scenario is text file to xml file then use the following parameters in the sender communication channel.
    RECORD.fieldSeparator :,
    RECORD.fieldNames :KEY,FNAME,LNAME,AGE
    RECORD.keyFieldValue :1
    DETAIL.fieldSeparatr :,
    DETAIL.fieldNames :KEY,SALARY,EMPID
    DETAIL.fieldNames :2
    Note:these parameters are accoding to the structure given below.
    suppose you have a structure like as below
    data (0..unbounded)
    record (0..unbounded)
    key (1..1)
    fname (1..1)
    lname (1..1)
    age (1..1)
    detail (0..unbounded)
    key (1..1)
    salary (1..1)
    empid (1..1)
    and the input file will look like as below
    1,aaa,bbb,23
    2,12000,10838
    1,ccc,ddd,23
    2,13000,10830
    Thanks
    Rinku

  • ERROR IDoc2File "Cannot produce target element"

    Hi,
    well i am sending an IDoc as i did some times before via XI to the client.
    Funny thing is that now it's the first time the MM is not able to handle empty fields from sender.
    I configured the target DT and the field 'co' from IDoc for occurrence with 0..1 but when i test the MM with the given XML-Structure from SXMB_MONI i am getting following ERROR:
    <b>Cannot produce target element /ns0:MT_Certificate/recordType2A/co. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</b>
    This field is the first one which is empty in the sent IDoc - but i have no clue why the is a problem because i did this some times before and it all works and i havn't done anything wrong - i hope.
    So do u have an idea?!
    br, Jens

    Jese,
    I explained it above, but let me try to put it better.
    MAPWITHDEFAULT is used to check if a the source field exists. if it exists then it maps the source with the field else it maps the default value to the target field.
    When a field is not populated by an idoc, the field is not a part of your XML strucuture itself. In your mapping, the field for which you have used MAPWITHDEFAULT I guess has a occurence of 1..1 and so, as the source field does not come in the Idoc, the mapping fails and this is now handled with mapwithdefault.
    Hope this helps,
    Regards
    Bhavesh

  • XI-XML Error: Cannot Produce Target Element /ns0:Messages?

    Experts,
    Anybody ever seen this error?
    Looks like XI is expecting a line of XML that says:
    <ns0:messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    I making this assumption based on a valid test case for this mapping in XI. However, the real SAP outbound file incoming to XI is missing these lines.
    Any direction is appreciated.
                Thank-You
    Are we having fun yet?

    These are the missing lines of code I think?
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
      <ns0:Message1>

  • Cannot create target element /ns0 Values missing in queue context

    Hi Sdn,
    When I am testing the Message mapping in PI i am getting the below error message .
    Cannot create target element /ns0:TechObjChange. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD See error logs for details
    Could you please tel me what would be the wrong.
    below is the XML file data .
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:TechObjChange xmlns:ns0="http://schemas.xxxxx.com/iiiii/xxxxxx">
       <TechObjChangeFLEQ>
          <FormType/>
          <FunctionalLocation/>
          <Descoffunctionalloc/>
          <Equipment/>
          <DescofEquipment/>
          <StartupDateofTechObj/>
          <Manufacturer/>
          <Manufacturermodelnumber/>
          <Manufacturerpartnumber/>
          <Manufacturerserialnumbe/>
          <Countryofmanufacture/>
          <Yearofconstruction/>
          <Monthofconstruction/>
          <TypeofTechObject/>
          <PlannerGroup/>
          <MainWorkCenter/>
          <CatalogProfile/>
          <NameofUserchangingtheobject/>
          <Characteristic>
             <CharacteristicName/>
             <Characteristicvalue/>
          </Characteristic>
          <MeasuringPoint>
             <MeasurementPosition/>
             <Characteristic/>
             <MeasurementPoint/>
             <MeasuringPointAsIs/>
             <MeasuringPointAsLeft/>
             <PCTCodeGroupMP/>
             <PCTCodeMP/>
          </MeasuringPoint>
       </TechObjChangeFLEQ>
    </ns0:TechObjChange>

    WSDL structure
    WSDL structure
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://schemas.xxxxxxxx">
       <wsdl:types>
          <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:p0="http://schemas.xxxxxxxxx" targetNamespace="http://schemas.xxxxxxxxxx">
             <xsd:element name="TechObjChange">
                <xsd:complexType>
                   <xsd:sequence>
                      <xsd:element name="TechObjChangeFLEQ">
                         <xsd:complexType>
                            <xsd:sequence>
                               <xsd:element name="FormType" type="xsd:string" minOccurs="0" />
                               <xsd:element name="FunctionalLocation" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Descoffunctionalloc" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Equipment" type="xsd:string" minOccurs="0" />
                               <xsd:element name="DescofEquipment" type="xsd:string" minOccurs="0" />
                               <xsd:element name="StartupDateofTechObj" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Manufacturer" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Manufacturermodelnumber" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Manufacturerpartnumber" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Manufacturerserialnumbe" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Countryofmanufacture" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Yearofconstruction" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Monthofconstruction" type="xsd:string" minOccurs="0" />
                               <xsd:element name="TypeofTechObject" type="xsd:string" minOccurs="0" />
                               <xsd:element name="PlannerGroup" type="xsd:string" minOccurs="0" />
                               <xsd:element name="MainWorkCenter" type="xsd:string" minOccurs="0" />
                               <xsd:element name="CatalogProfile" type="xsd:string" minOccurs="0" />
                               <xsd:element name="NameofUserchangingtheobject" type="xsd:string" minOccurs="0" />
                               <xsd:element name="Characteristic" minOccurs="0" maxOccurs="unbounded">
                                  <xsd:complexType>
                                     <xsd:sequence>
                                        <xsd:element name="CharacteristicName" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="Characteristicvalue" type="xsd:string" minOccurs="0" />
                                     </xsd:sequence>
                                  </xsd:complexType>
                               </xsd:element>
                               <xsd:element name="MeasuringPoint" minOccurs="0" maxOccurs="unbounded">
                                  <xsd:complexType>
                                     <xsd:sequence>
                                        <xsd:element name="MeasurementPosition" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="Characteristic" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="MeasurementPoint" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="MeasuringPointAsIs" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="MeasuringPointAsLeft" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="PCTCodeGroupMP" type="xsd:string" minOccurs="0" />
                                        <xsd:element name="PCTCodeMP" type="xsd:string" minOccurs="0" />
                                     </xsd:sequence>
                                  </xsd:complexType>
                               </xsd:element>
                            </xsd:sequence>
                         </xsd:complexType>
                      </xsd:element>
                   </xsd:sequence>
                </xsd:complexType>
             </xsd:element>
          </xsd:schema>
       </wsdl:types>
       <wsdl:message name="TechObjChange">
          <wsdl:part xmlns:p4="http://schemas.xxxxxxx" name="TechObjChange" element="p4:TechObjChange" />
       </wsdl:message>
    </wsdl:definitions>

  • Changes done in message mapping is not reflecting in output

    Hi all,
    i have created one scenario XML to XML and i before i had done 1 to 1 mapping, i got the output also.
    but when i changed few calculation in the message mapping
    there is one node "name" and "Description" in source and target in both places.
    i am having name in SOURCE XML as "something" but i want to change this name to "Xsomething" and in description i have something in source but i want to pass constant value "ZSUBHODIP".i did mapping in message mapping, and when i did the testing in message mapping then in target in message mapping
    i got "XCOPC_C03" and "ZSUBHODIP" but when it takes the XML file which is in my system then in output XML name value "XCOPC_C03" and description "ZSUBHODIP" is not coming.
    i activated it too.
    even i tried with the same FILE to FILE scenario also but in this scenario also problem is same like one one mapping only then when i changed it in message mapping then previous output is coming.
    is there server problem, if yes then how to fix it??
    please tell me what to do
    thanks

    Hi,
    can you test it like this:
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    Regards,
    Michal Krawczyk

  • PI 7.1 EHP1 SP3, Message Mapping cannot select object in the folder ?

    Hi,
    I am very new with PI 7.1 EHP1, i am not sure whether there is some new restriction or bug, because i was trying to create Data Type, Message Type in site the folder, but the Message Mapping cannot select those object insite the folder. The message mapping only can select those object without folder.
    Please advise ?
    Thank You and Best Regards
    Fernand Lesmana

    Hi Swarup,
    I just finish installed the PI 7.1 EHP1 SP03, so i would like to test the functionality of the PI. just create 2 DT 2 MT insite the folder.
    but when i am trying to create Message Mapping, the message mapping, i can't find these 2 MT ???.
    after that i created new MT but outsite of the folder (still same namespaces) and the message mapping can see the MT ?
    so i can make sure not duplication coz i just create those object.
    any idea ?
    Thank you and Best Regards
    Fernand Lesmana

  • EXCEPTION_DURING_EXECUTE and Cannot create target element ?

    hi experts
    i got error in jdbc to idoc scenario  (PI 7.1 sp7)
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_mm_avabtis_to_ps_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
      <SAP:P3>on: Cannot create target element /ZENTITY. Values</SAP:P3>
      <SAP:P4>missing in queue context. Target XSD requires a v~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_mm_avabtis_to_ps_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ZENTITY. Valuesmissing in queue context. Target XSD requires a v~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    jdbc struc
    jdbcdt->
    row -->
    comp
    plant
    dept
    entype
    entity
    endesc
    glcode
    Idoc struc
    zentity root-->  (mapped to jdbcdt)
    idoc
    begin    -
    >( constant value 1)
    edi_dc40---->(Disabled Total segment)
    z1entity -
    >(Mapped to Row)
    segment -
    >(Constant value  1)
    comp
    plant
    dept
    entype
    entity
    endesc
    glcode
    please help me out.

    Hi
    -->In your IDOC do you have any other segments which are mandatory?Please do recheck your IDOC structure and check for the mandatory segments and assgin them with the constant value 1.
    -->The error seems to be the mandatory segment value is not mapped.
    Thanks

  • How did i solve "Cannot create target element" but still having problems.

    Hi Experts,
    I solved my problem of "Cannot create target element" by removing of the data type structure the following fields :
    DT_AS400_1 -> Complex Type
    Payroll      1..1   (Should i put 0..0?)
       ->  Row  0..Unbounded And then Fields to be passed.
    I can't figure how pi can't detect the fields, i use them pretty often.
    Any Suggestions,
    Thanks for your help,
    Regards,
    Steve.

    Hi Steve,
    Check if input message, has the field that is producing the output.
    Therefore, if you don't have any input to fill the structure root, you can fill it with an empty constant.
    Best regards,
    Pedro M. D. Pereira
    Edited by: Pedro Pereira on Jun 10, 2010 1:26 AM

  • UDF required !! Cannot create target element Values missing in queue context

    Dear Experts,
    I am getting the cannot create target element error with acknowledgement payload in response message mapping  in synchronous interface. I have shared the response payload2. Please suggest do I need write any UDF.
    Message mapping successful with below payload1:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:updateOppResponse xmlns:ns0="http://soap.sforce.com/schemas/class/clientUpdateInqWebService">
       <ns0:result>
          <ns0:Description>Record Updated</ns0:Description>
          <ns0:SFDCId>006M0000007xjTrIAI</ns0:SFDCId>
          <ns0:Status>true</ns0:Status>
       </ns0:result>
    </ns0:updateOppResponse>
    With the below target system response message, Mapping failing with Cannot create target element /ns1:MT_InquiryUpdate_ECC_Ack. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD com.sap.aii.mappingtool.tf7.IllegalInstanceException:
    Actual acknowledgement reply from target system payload2:
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns="http://soap.sforce.com/schemas/class/clientUpdateInqWebService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <updateOppResponse>
             <result>
                <Description>Record Updated</Description>
                <SFDCId>006M0000007xjTrIAI</SFDCId>
                <Status>true</Status>
             </result>
          </updateOppResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    Regards
    RKN

    Hi
    The easiest solution will be , write an simple java map for your response mapping.
    Please provide your target structure , if you need any help on the java mapping.
    Sample code:
    Response message from web service
    target msg:
    java code:
    package com.sap;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class populateResponseMessage extends AbstractTransformation {
          public void transform(TransformationInput arg0, TransformationOutput arg1)
                      throws StreamTransformationException {
                try {
                      DocumentBuilderFactory tfactory = DocumentBuilderFactory
                                  .newInstance();
                      DocumentBuilder tbuilder = tfactory.newDocumentBuilder();
                      Document doc = tbuilder.parse(arg0.getInputPayload()
                                  .getInputStream());
                      Document newdoc = tbuilder.newDocument();
                      Element root = (Element) newdoc.createElementNS(
                                  "urn:sap-com:document:sap:rfc:functions",
                                  "ns1:ZTEST_FAULT_MESSAGE_DATA.Response");
                      newdoc.appendChild(root);
                      NodeList nlList = doc.getElementsByTagName("ConversionRateResult");
                      if (nlList.getLength() != 0 && nlList != null) {
                            Node data = nlList.item(0);
                            String sourceval = data.getTextContent();
                            Element rate = (Element) newdoc.createElement("RATE");
                            rate.setTextContent(sourceval);
                            root.appendChild(rate);
                      Transformer transformer = TransformerFactory.newInstance()
                                  .newTransformer();
                      Source source = new DOMSource(newdoc);
                      Result output = new StreamResult(arg1.getOutputPayload().getOutputStream());
                      transformer.transform(source, output);
                } catch (Exception e) {
                      e.printStackTrace();
          }// end of transform

Maybe you are looking for

  • ITunes cannot open because of a problem

    I upgraded to Lion and am trying to run iTunes 11.1.4.  Every time I try to open iTunes, the icon bounces once and then an error pops up. It says the following: "iTunes cannot be opened because of a problem. Check with the developer to make sure iTun

  • Should I fix or replace my MacBook (late 2008)?

    Hello, My MacBook (late 2008) has been running slow for some time now. I think it might be time for a new hard drive... or maybe a new Mac, but not too sure what is the root cause.  Here is the data pulled from EtreCheck. I'm looking for some expert

  • Automating "check vpn" through C#

    Hello, I would like to automatically check if the VPN is up or down, simple enough, and respond by bumping it, disconnecting and connecting, as needs be (not so simple I think). This through a C# program using HttpWebRequest and HttpWebResponse. It's

  • Blackberry curve 9300 photos wont view

    My blackberry is taking pictures, but when i go to view them in my media, i cant see them? is there anything i can do to solve this?

  • How to delete flv files from iPhone library

    Hi, I am a newbie to iOS and I am using factory unlocked iPhone 4s with iOS 7. I have added some flv files to library and synced them to iPhone using iTunes. But as iPhone doesn't support flv files so I can't see them in movies. They have claimed dis