Changing XML payload

Hello,
  Is it possible to change the xml payload when an XI message has run into error ?
  And after the change, restart the processing.
  Like with idoc's, change the idoc segment data and reprocess the idoc again.
Regards, Michel

Yes you can..
See the SAP help link below to modify messages - >
http://help.sap.com/saphelp_nw70/helpdata/en/44/f5c3de84056c30e10000000a114a6b/frameset.htm
Arvind R

Similar Messages

  • Namespace and prefix are not coming up in xml payload created from BSSV

    Hello
    I am facing this issue that when I am creating xml payload from BSSV, payload does not have namespace and no prefix. I googled on this and made code change in package-info. java file. Now, when I test BSSV locally from Jdeveloper xml gets created with namespace but when I run it from server, there's no namespace.
    Does this file package-info.java gets deployed on server? is it ok to make change to it? If not, then what is the other way to resolve this issue?
    Please suggest.
    Thanks
    TK

    Hi Peter,
    Thanks for the valuable input.
    We have already implemented note 378648 i.e these all parameters are already there under sidadm user in DB node.
    BR_OFS=1
    BR_OFS_RESOURCE=< database_resource_name>
    BR_OFS_CLUSTER=< cluster_name>
    BR_OFS_USER=<user_name>
    BR_OFS_DOMAIN=<domain>
    BR_OFS_PWD=<password>
    registry HKEY_LOCAL_MACHINE/Software/Oracle/HomeX ORA_<SID>_AUTOSTART is having value false.
    Please guide what could be the other possible reason?
    Regards
    Praveen

  • Enhancement Fields missing in the Inbound XML payload

    We are using XI3.0. We need to send some Purchase Order data from R/3 to SRM(SUS), in addition to what is available in the standard content. We have created the required datatype enhnacement. we have mapped these additional fields in the message mapping to their respective sources. We have also generated and activated the ABAP proxies on the SUS side. However at runtime whenever a PO is created, none of the additional fields are available in the inbound XML payload.
    Can some one help me to know what could be wrong ?
    Thanking You
    Regards
    Vinay Rane

    Hi Vinay,
    You can try one of the following options:
    1) Clear/reload XI cache using trx SXI_CACHE, after that try to test again and check whether you are getting the correct fields.
    2) Are you using the RFC adapter? if you do; then try to restart it. This adapter also caches a lot of meta data and information during runtime.
    3) Last but not least; (You probably know this better than me , but just in case...) If you had previously generated the proxy classes, and after that you did some changes in the repository then you certainly will need to regenerate those proxy classes.
    Cheers,
    R.

  • Getting BAM Error: BAM-06008: The XML payload is invalid; extra contents we

    Hi All,
    Version: 11.1.1.4
    We are getting the BAM Error: "BAM-06008: The XML payload is invalid; extra contents were found" after I added a another field to a BAM Object. I can see the new field in BAM and I can also see it when I pull up and map to a BAM adapter in my SOA composite. However, when I have the process send a payload with the newly added field it fails with the above error. However, if I add a new data object in BAM with the field it works fine. What would be causing BAM to think that the newly added field should be in payload?
    Any suggestions would be greatly appreciated.
    --S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    If the layout of the data object changes then you need to restart BAM server for changes to take effect. Also make sure, your mapper file isn't adding extra elements than expected.
    Thanks
    Jahangir Pasha

  • Deleting Message Type name and namespace tag from XML payload

    Hi Gurus,
    Need help. My payload looks like this
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_O_sss xmlns:ns1="http://sap.com/xi/tm">
    - <Job>
       <Field name="xxxx" value="" />
      <Field name="xxx" value="" />
      <Field name="xxx" value="" />
       </Job>
      </ns1:MT_O_sss>
    But The soap webservice is expecting it in
    <?xml version="1.0" encoding="utf-8" ?>
    - <Job>
       <Field name="xxxx" value="" />
      <Field name="xxx" value="" />
      <Field name="xxx" value="" />
       </Job>
    I have to remove the message type name and namespace tag.
    So how can I achieve this. I am sending this payload using a Receiver Soap Adapter. Please help. I am kind of stuck.

    hi,
    you have to simply add one module in your communication channel
    that is XMLAnonymizerBean
    you can refer below for help:
    Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
    hope it helps.
    regards,
    ujjwal kumar

  • How to pass XML payload to HTTP POST Service.

    Hi All,
    I am calling a RestFul service using Http Post method.
    If the payload type is "url-encoded" then my directly assignment of values using assign activity is working fine.
    But when i change the payload type to "xml" , It's erroring out saying the value is not provided for the parameters..
    You can also try this using below details to reproduce the issue.
    Details:
    =====
    URL : http://api.geonames.org/postalCodeSearch
    Used HttpBinding as reference in composite.
    XSD :
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="geonames">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="totalResultsCount" type="xsd:integer"/>
    <xsd:element name="code" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="postalcode" type="xsd:string"/>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="countryCode" type="xsd:string"/>
    <xsd:element name="lat" type="xsd:float"/>
    <xsd:element name="lng" type="xsd:float"/>
    <xsd:element name="adminCode1" type="xsd:string"/>
    <xsd:element name="adminName1" type="xsd:string"/>
    <xsd:element name="adminCode2" type="xsd:integer"/>
    <xsd:element name="adminName2" type="xsd:string"/>
    <xsd:element name="adminCode3" type="xsd:integer"/>
    <xsd:element name="adminName3" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Input">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="postalcode" type="xsd:string"/>
    <xsd:element name="username" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    We need to send following input values to the service.
    postalcode = 90110
    username =siddhardha
    Can someone let me know how to make it work with XML payload.Looks like i am not constructing the XML payload correctly in assign.
    Please send me the sample to [email protected].
    Thanks in advance,
    Siddhardha.

    Sid,
    I am still trying the same, here we need to change the input type to mimeXml
    have a look at this link....
    https://blogs.oracle.com/reynolds/entry/oracle_http_adapter
    I am trying multiple ways, everytime i get the same below error...
    <messages>
    <Invoke1_Request-Response_InputVariable_2>
    <part name="Input">
    <Input>
    <postalcode>90110</postalcode>
    <username>siddhardha</username>
    </Input>
    </part>
    </Invoke1_Request-Response_InputVariable_2>
    <Invoke1_Request-Response_OutputVariable>
    <part name="geonames">
    <geonames>
    <status message="Please add a username to each call in order for geonames to be able to identify the calling application and count the credits usage." value="10"/>
    </geonames>
    </part>
    </Invoke1_Request-Response_OutputVariable>
    </messages>
    Thanks,
    N

  • Amend XML payload Error for Processing

    I have an issue where I need to amend the XML payload for a message that is stuck in a queue.  I am on PI 7.0, SP10 and I know I have seen this in the runtime workbench where you select the message in error and select Message Editor in Message monitoring.
    For some reason, when I click the Message Editor, I get the log in, enter this, and the pop up window with the Message Display Tool (Detail Display) but I am unable to change the XML and process.,,,  I have corrected the XML but cannot seem to process this...
    Normally it wouldn't be an issue but I have 145 items in the queue and I am bound to get Serialisation issues...
    I have seen this and used it before - in this version...

    I amended the Idoc at source system via WE19 and processed that way... 
    The serialisation issues resolved themselves...

  • Parsing xml payload and edit it

    Hi
    I am trying to parse xml payload in sender side.I have inserted a stateless session bean before " local ejbs call sap adapter".But changes made to string are not reflected in xml file.The code written in ejb is as follows
    package com.cts.xi;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.DocumentHelper;
    import org.dom4j.Element;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.ra.ms.api.PayloadFormatException;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    @ejbLocal <{com.cts.xi.EjbLocal}>
    @ejbLocalHome <{com.cts.xi.EjbLocalHome}>
    @stateless
    @transactionType Container
    public class EjbBean implements SessionBean, Module {
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         private SessionContext myContext;
    Create Method.
         public void ejbCreate() throws CreateException {
              // TODO : Implement
         /* (non-Javadoc)
    @see com.sap.aii.af.mp.module.Module#process(com.sap.aii.af.mp.module.ModuleContext, com.sap.aii.af.mp.module.ModuleData)
         public ModuleData process(ModuleContext mc, ModuleData md) {
              // TODO Auto-generated method stub
              Message msg = (Message) md.getPrincipalData();
              XMLPayload pl = msg.getDocument();
              String str = null;
              String str1 = null;
              int m = 0;
              str = new String(pl.getContent());
              /*int[] ra = null;
              for (int i = 0; i < 4; i++) {
                   ra<i> = Integer.parseInt(mc.getContextData("rate"));
              try {
                   File f1 = new File("
    pciib04530
    USERS
    piyush
    test1.xml");
                   FileOutputStream fout1;
                   fout1 = new FileOutputStream(f1);
                   fout1.write(str.getBytes());
                   fout1.close();
              } catch (RuntimeException e2) {
                   // TODO Auto-generated catch block
                   e2.printStackTrace();
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              try {
                   Document doc = DocumentHelper.parseText(str);
                   Element root = doc.getRootElement();
                   str1 = traverseXML(root, str1,m);
              } catch (DocumentException e3) {
                   // TODO Auto-generated catch block
                   e3.printStackTrace();
              try {
                   File f6 = new File("
    pciib04530
    USERS
    piyush
    test6.txt");
                   FileOutputStream fout6;
                   fout6 = new FileOutputStream(f6);
                   //fout2.write(rt.getBytes());
                   //fout2.write(str1.getBytes());
                   //fout2.write(str2.getBytes());
                   //fout2.write(str3.getBytes());
                   fout6.write(str1.getBytes());
                   fout6.close();
              } catch (FileNotFoundException e4) {
                   // TODO Auto-generated catch block
                   e4.printStackTrace();
              } catch (IOException e4) {
                   // TODO Auto-generated catch block
                   e4.printStackTrace();
              try {
                   pl.setText(str);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              try {
                   msg.setDocument(pl);
              } catch (PayloadFormatException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              md.setPrincipalData(msg);
              return md;
    @param root
    @param str1
         private String traverseXML(Element e, String str1,int m) {
              // TODO Auto-generated method stub
              int spc = 0;
              String tmp = null;
              String tmp1 = null;
              tmp1 = str1;
              tmp = e.getName();
              String tmp3 = new String("SIPIR");
              if (tmp3.equals(e.getName())) {
                   int l = Integer.parseInt(e.getStringValue());
                   e.setName("SI");
                    int k = l * 3;
                   m++;
              str1 += tmp;
              /*for(int i=0;i<e.nodeCount();i++){
                   Element e1=e.elements().get(i);
              for (int j = 0; j < e.attributeCount(); j++) {
                   str1 += e.attribute(j).getName();
                   str1 += e.attribute(j).getData();
              for (int i = 0; i < e.elements().size(); i++) {
                   Element e1 = (Element) e.elements().get(i);
                   spc += 3;
                   traverseXML(e1, str1,m);
                   spc -= 3;
              return str1;
    Thanking you in advance.
    Regards
    piyush

    xml or plist , just the extension differs.(Both are Extended Markup Language).
    If u want to edit it manually - u can use property list editor (which is in XCode )
    or u can open with dashcode , which can be edited easily.
    If ur question was to edit dynamically.
    U can do that with write to file functionality.
    For example u may check this.
    http://www.iphonedevsdk.com/forum/iphone-sdk-development/1613-read-write-create- data-files.html

  • Very  Urgent Pls  help :  Change of  payload type to  user-defined types

    Hello Experts
    I was using sys.xml_type as payload type in my queue table creation.
    consider xml message
    <order>
    <id>1</id>
    <load rerer="mq" erere='gg" > </load>
    </order>
    This i inserted into queue table using enqueue process.
    this is done.
    BUT NOW My manager wants to change the payload type.
    he created a type
    create or replace type systype as object (msg varchar2(4000));
    Now payload type of queue table is changed to
    PayloadType==>aq.systype.
    Pls help me how can i insert xml messages into this queue table.
    This is very urgent. Pls help me
    S

    I've just read this thread three times and I have absolutely no idea what you are doing, in what version, and what you are asking for help with.
    Do you want to change the message type? If you do you MUST drop the queue and start over again from the beginning.
    Do you want to enqueue messages?
    Post your DDL and other relevant information or you are on your own. We can not guess at your issue.

  • In PI how do I convert the XML payload (input) to a text file and send out

    I am extracting data from SAP and sending thru XI / PI to a file (non-sap system).
    On the receiving end, I need the file to be a text file, with one row for each "FTZ_Row concatenated_data" tag in the input.  It needs to be just a plain text file with no XML tags.
    Currently the file gets one record which matches exactly to the XML payload below.
    I want it to create a file that looks like this :
               CONCATENATED DATA 1
               CONCATENATED DATA 2
                012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12
    here is the payload going thru XI
      <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
      <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
      <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
      <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
      </n0:FTZ_Concatenated_Row>
    thanks
    jay

    thanks for the input but I am still having issues - I get an empty file when I use the content conversion option.
    My payload coming into XI is :
            <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
    <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
    <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
    </n0:FTZ_Concatenated_Row>
    Here is the layout of my data type - I am using the same for input & output
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" targetNamespace="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone">
       <xsd:complexType name="FTZ_Concatenated_Row">
          <xsd:sequence>
             <xsd:element name="FTZ_Row" maxOccurs="unbounded">
                <xsd:complexType>
                   <xsd:attribute name="concatenated_data" type="xsd:string" />
                </xsd:complexType>
             </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    I mapped these items :  FTZ_Concatenated_Row & FTZ_Row & concatenated_data
    I set up my content convesion with :
      recordset structure   FTZ_Row
    FTZ_Row.fieldSeparator     #
    FTZ_Row.endSeparator     'nl'
    I am not sure why the following row looks like this ??
        <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    I thought FTZ_Row would be one tag and "concatenated_data" would be another one.
    any help would be appreciated.
    I have read many entries/blogs/etc in SDN but and tried many different setups, but nothing is working.
    thanks

  • "Error while parsing SOAP XML payload: no element found" received when invoking Web Service

    Running PB 12.1 Build 7000.  Using Easysoap.  Error ""Error while parsing SOAP XML payload: no element found" received when invoking Web Service".  This error does not appear to be coming from the application code.  Noticed that there were some erroneous characters showing up within the header portion of the XML ("&Quot;").  Not sure where these are coming from.  When I do a find within the PB code for ""&quot;" it gets located within two objects, whereas they both reference a "temp_xml_letter".  Not sure where or what temp_xml_letter resides???   The developer of this is no longer with us and my exposure to WSDL and Web Services is rather limited.  Need to get this resolved...please.
    This is the result of the search.  Notice the extraneous characters ("&quot;"):
    dar1main.pbl(d_as400_mq_xml)
    darlettr.pbl(d_email_xml)
    ---------- Search: Searching Target darwin for 'temp_xml'    (9:52:41 AM)
    ---------- 2 Matches Found On "temp_xml":
    dar1main.pbl(d_as400_mq_xml).d_as400_mq_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> number </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    darlettr.pbl(d_email_xml).d_email_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> imcnumber </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    ---------- Done 2 Matches Found On "temp_xml":
    ---------- Finished Searching Target darwin for 'temp_xml'    (9:52:41 AM)

    Maybe "extraneous" is an incorrect term.  Apparantly, based upon the writeup within Wiki, the parser I am using does not interpret the "&quot;"?  How do I find which parser is being utilized and how to control it?
    <<<
    If the document is read by an XML parser that does not or cannot read external entities, then only the five built-in XML character entities (see above) can safely be used, although other entities may be used if they are declared in the internal DTD subset.
    If the document is read by an XML parser that does read external entities, then the five built-in XML character entities can safely be used. The other 248 HTML character entities can be used as long as the XHTML DTD is accessible to the parser at the time the document is read. Other entities may also be used if they are declared in the internal DTD subset.
    >>>

  • SSL/TLS security certificate data match with XML Payload in SAP PI

    Hi,
    We are working on a solution where we would want to use SSL/TLS or WS Security with client server mutual authentication using client server certificates.
    But, once the sender is authenticated using the certificates, can the XML payload be matched for the correctness with the certificate information? Is this available to PI integration engine at any time? Like Sender A autheticated as A using certificates, must be stopped if his XML payload is saying that he is sender B (which is most unlikely if we trust the senders but did not want to leave a loophole).
    Any ideas here?
    Thanks and Regards,
    Vijay

    Hi Wolfgang,
    Cross-posting is discouraged and against the forum rules, because it is misused and makes a mess of the search due to distributed discussions and answers.
    I will move it to the PI forum and add a watch on it as it is security forum related.
    Unfortunately, the forum software does not have the option to "mirror" threads.
    Cheers,
    Julius
    Edited by: Julius Bussche on Sep 14, 2009 9:50 PM

  • Reading XML payload from text file

    Hello,
    I have a text file with XML payload in it. The text file has some header information and then the XML payload. How do I read only the XML payload for processing in PI?
    the structure of the text file is something like this..
    Header Information
    Payload
    Sample:
    #Datetime: 20140318-09:28:50.129
    #MessageID: sample123
    #Sender: TEST
    #SenderParty: TEST
    #ReceiverService:
    #ReceiverParty: Test
    #Interface: Test123
    #InterfaceNamespace: http://test.com
    <?xml version="1.0" encoding="UTF-8"?>
    <Sample ><Header>......
    Please advise.
    Thank you.
    Larry.

    package com.learning.utils;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    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 FetchPayload extends AbstractTransformation {
      String strData = null;
      @Override
      public void transform(TransformationInput arg0, TransformationOutput arg1)
      throws StreamTransformationException {
      // TODO Auto-generated method stub
      getTrace().addInfo("File Reading started ");
      String strData = convertStreamToString(arg0.getInputPayload()
      .getInputStream());
      getTrace().addInfo("File Reading successfully completed ");
      try {
      getTrace().addInfo("Generating XML started");
      strData.substring(strData.indexOf("<?xml"), strData.length());
      arg1.getOutputPayload().getOutputStream().write(
      strData.getBytes("UTF-8"));
      getTrace().addInfo("Generating XML started");
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      public String convertStreamToString(InputStream in) {
      StringBuffer sb = new StringBuffer();
      try {
      InputStreamReader isr = new InputStreamReader(in);
      Reader reader = new BufferedReader(isr);
      int ch;
      while ((ch = in.read()) > -1) {
      sb.append((char) ch);
      reader.close();
      } catch (Exception exception) {
      return sb.toString();
    and u can get  the xml as a resultant which  u can use as input for next message mapping.
    thanks and regards,
    Praveen T

  • Xml payload related problem

    Hi ALL
    Currently I am doing a scenario in which i m encrypting the incoming xml payload(field by field) in java mapping and then decrypting it with in the adapter module.Now problem that i m facing is that after encryption if i get some special characters, the resulting xml payload becomes invalid and will not be parsed.

    hi,
    Try to put it into CDATA.
    <script>
    <b><![CDATA[</b>!@!#!@#!@#!@$@#$<b>]]></b>
    </script>
    regards,
    Wojciech
    Message was edited by: Wojciech Gasiorowski

  • Namespace in XML Payload for HTTP Sender

    Hello,
    I have just configured my snychronous HTTP <--> RFC Scenario. When I want to test it with some XML payload in the HTTP testing tool I get a mapping runtime exception.
    After some investigation using the test tab in the message mapping I realized that missing namespace in the XML payload caused the error. I tried to add manually a namespace to the XML and then it worked
    This is very strange I though that the namespace of the sender interface is automatically added to the XML payload?
    Do you have any information on this?

    Hi,
    U need to copy the payload from Message mapping test message tab and use that payload.
    or u can use the HTTP test client for testing the same.
    sample HTML code to create HTTP Client:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8
    You can also use the Wfetch application by Microsift for the same..
    download the same from below link
    http://www.iisfaq.com/Default.aspx?tabid=2975
    Thnx
    Chirag

Maybe you are looking for