Problem changing XML element in Adapter Module

Hey!
I am developing an adapter module to transform a coded password back to clear text. I have access to the XML element where the password is and I get to transform it, but I have 2 problems as also stated in the code:
1) I cannot set the new value back to the node. I try with
firstNode.getFirstChild().setNodeValue(decodedPwd);
but this does not seem to work. How can I achieve this?
2) Between the first issue and the code
msg.setDocument(xmlpayload);
I am not sure how to get my new values for the node back in the XMLPayload. How can I achieve this?
Here is the code:
msg = (Message) inputModuleData.getPrincipalData();
          XMLPayload xmlpayload = msg.getDocument();
          factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = factory.newDocumentBuilder();
          Document document = builder.parse((InputStream)xmlpayload.getInputStream());
          password = (Element)document.getElementsByTagName("ns1:passord").item(0);
          firstNode = password.getFirstChild();                    
          pwd = firstNode.getNodeValue();
          if(pwd != null){
               decodedPwd = Decoder.decodeString(pwd);
// THIS FAILS!
          firstNode.getFirstChild().setNodeValue(decodedPwd);
//HOW TO SET NEW NODE VALUE TO XMLPAYLOAD HERE?
          msg.setDocument(xmlpayload);
          inputModuleData.setPrincipalData(msg);
               return inputModuleData;          
Help is much appreciated!
Thanks!
regards Ole

Hey!
The problem was solved. The code snipped I found was:
               DOMSource DOMSource = new DOMSource(document);
               ByteArrayOutputStream myBytes = new ByteArrayOutputStream();
               Result dest = new StreamResult(myBytes);
               TransformerFactory tf = TransformerFactory.newInstance();
               Transformer serializer = tf.newTransformer();
               serializer.transform(DOMSource, dest);
               byte[] docContent = myBytes.toByteArray();
               xmlpayload.setContent(docContent);
               msg.getDocument().setContent(xmlpayload.getContent());               
Ole
Edited by: Ole Mugaas on Mar 27, 2008 8:43 PM

Similar Messages

  • XML tag markers moved: Find and Replace causing problem in xml elements

    Hi All,
    I am doing find and replace using GREP. While using the expression like $1, $2 (Found Items) in the change to field it changes the placement of tag marker. If the found item is a part of two of more xml elements, I am getting a serious problem while replacing it. (ie. The xml tag markers are moved.)
    See the screen shot below, then you may get better idea. And help me to overcome this issue.
    This is just an example to show you what i'm trying to say, there are so many cases like this.
    Original text/ Before doing find replace
    After replacing
    Green4ever

    Hi Peter and John,
    but it seems to me that the example is looking for any space that
    follows a semi-colon and has two word characters following it, and
    repalce that with an em space. I think you could do the same using look
    behind and look ahead and not need to replace the found text.
    Yes you are right about the look behind and look ahead. I'd like to show some more examples to show what the actual problem is,
    Original/Before Replacing,
    (Consider there is another case here, instead of em-space some times normal word space will also be there)
    Using the Grep:
    Find What---------> ^(\d+\.(?:\d+)?)~m
    Change To------------->$1\t
    After Replace:
    Did I make any sense? Eventhough this will not make any changes in the layout, my requirement is to insert the tab out-side the tag marker not indise.
    Green4ever

  • Covnert Complex XML to Simple XML tags using Adapter Module

    Hi
    <buyer>
    <fnParty:partyIdentifier partyIdentifier="GER" partyIdentifierQualifierCode="SenderAssigned"/>
    </buyer>
    I want to convert above complex xml into following simple xml document
    <buyer>GER</buyer>
    I am writing adapter module. Could any one please tell me how to convert this
    Regards
    Sowmya

    Hi,
    Is partyidentifier is source xml and buyer in target xml?
    You can map the attribute to buyer element in message mapping itself.
    Why do you want adapter module?
    Thanks,
    Beena.

  • REG : Can we change namespace using any adapter module.

    Hi All,
               I was working on the XMLAnonymizerBean adapter module. his module provides us the functinality of changing the prefix of namespace and selecting  sprecified modules in the output XML. Now i am stuck with a question ie is there any module that can change the namespace in the output xml. for example :
    xmnls :  namespace1 to
    xmnls : namespace 2.

    Hi,
    You can use a simple XSLT mapping in Receiver adapter . check this blog
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417100%29ID0975923150DB01234155231841994144End?blog=/pub/wlg/2620
    Provide the actual namespace in the bleow code
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p2="provideyournamespace">
         <xsl:template match="/">     
                       <xsl:copy-of select="*"/>
         </xsl:template>
    </xsl:stylesheet>
    Regards
    Suraj

  • How to read XML payload in Adapter module

    Hi all,
    I have to read content of xml payload inside custom adapter module:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_REQ xmlns:ns0="namespace">
    <record>
      <EmployeeName>a</EmployeeName>
      <EmployeeID>9999</EmployeeID>
      </record>
    <record>
      <EmployeeName>b</EmployeeName>
      <EmployeeID>9999</EmployeeID>
      </record>
    <record>
      <EmployeeName>c</EmployeeName>
      <EmployeeID>9999</EmployeeID>
      </record>
      </ns0:MT__REQ>
    obj = inputModuleData.getPrincipalData();
    msg = (Message) obj;
    XMLPayload xpld = msg.getDocument();
    String xmltxt = xpld.getText();
    InputStream in = new ByteArrayInputStream(xmltxt.getBytes("UTF-8"));
    & then using DOM parser i am trying to read the contents.
    But i am not able to read anything. And no exception is raised.
    How can i read contents of this xml file.
    Thanks,
    Mayank

    hi,
    I am still getting same Blank payload.
    My Code for Parsing is:
    doc = db.parse((InputStream) xpld.getInputStream());
    NodeList list_Set=doc.getElementsByTagName("record");
    NodeList list_Set1=doc.getElementsByTagName("EmployeeName");
    NodeList list_Set2=doc.getElementsByTagName("EmployeeID");
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "12");
    String input = "";
    for(int i = 0; i < list_Set.getLength(); i++){
    Node f=list_Set1.item(i);
    f=f.getFirstChild();
    String str_f=f.getNodeValue();
    Node f2=list_Set2.item(i);
    f2=f2.getFirstChild();
      String str_f2=f2.getNodeValue();
    input = input + str_f + "," + str_f2 +  "END" ;
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Value added from incoming payload");
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, input);
    And in RWB monitoring, i am able to see:
    2009-10-01 14:20:51 Information 12
    2009-10-01 14:20:51 Information UNDEFINED
    2009-10-01 14:20:51 Information 14
    So UNDEFINED is coming for input.
    Edited by: Mayank  Gupta on Oct 1, 2009 11:08 AM

  • Problem with XML element creation

    hello,
    i have a problem creating an XML element using XMLForest
    and XMLConcat in Oracle 9.2.0.3 release.
    This problem there wasn't when we had the Oracle 9.2.0.2
    release.
    If i make this statement:
    SELECT XMLELEMENT( "message",
    XMLATTRIBUTES( 1321324 AS IDSEQ,
    'fff' AS CDMS,
    'fff' AS TPMS,
    SYSDATE AS TIME,
    342134 AS REFID),
    XMLCONCAT( XMLELEMENT("header",
    XMLFOREST( 'ttt' AS TXID,
    'rrr' AS RXID,
    'QQQ' AS QUEUENAME,
    XMLFOREST( 123456789 AS COD_COM,
    111 AS ID_CAT,
    'www' AS ID_ITM,
    1123 AS PR_KEY,
    'ST' AS STATUS) AS REFOBJ)),
    xmltype('<body>gfgfg</body>') )).getstringval() FROM dual;
    i got this XML document:
    <message IDSEQ="1321324" CDMS="fff" TPMS="fff" TIME="28-MAR-03" REFID="342134">
    <body>gfgfg</body>
    </message>
    D>rrr</RXID>
    <QUEUENAME>QQQ</QUEUENAME>
    <REFOBJ>
    <COD_COM>123456789</COD_COM>
    <ID_CAT>111</ID_CAT>
    <ID_ITM>www</ID_ITM>
    <PR_KEY>1123</PR_KEY>
    <STATUS>ST</STATUS>
    </REFOBJ>
    </header>
    instead of this:
    <message IDSEQ="1321324" CDMS="fff" TPMS="fff" TIME="28-MAR-03" REFID="342134">
    <header>
    <TXID>ttt</TXID>
    <RXID>rrr</RXID>
    <QUEUENAME>QQQ</QUEUENAME>
    <REFOBJ>
    <COD_COM>123456789</COD_COM>
    <ID_CAT>111</ID_CAT>
    <ID_ITM>www</ID_ITM>
    <PR_KEY>1123</PR_KEY>
    <STATUS>ST</STATUS>
    </REFOBJ>
    </header>
    <body>gfgfg</body>
    </message>
    any idea?
    this happens only after we had installed the patch 9.2.0.3
    thanks in advance
    Mc

    As Jim Stated the problem is related to using XMLCONCAT and a combination of SQL/XML non SQL/XML operators. In this example XMLCONCAT is not required. XMLElement allows multiple XMLType children to be included in the Element, as the attached SQL shows...
    Christian please note that Oracle strongly recommend the use of the SQL/XML operators over ways of generating XML from SQL queries. All future development efforts will be focused on optimizing and improving this technology, rather that older, legacy approaches.
    SQL> SELECT XMLELEMENT
    2 ( "message",
    3 XMLATTRIBUTES
    4 (
    5 1321324 AS IDSEQ,'fff' AS CDMS,'fff' AS TPMS,SYSDATE AS TIME,342134 AS REFID
    6 ),
    7 XMLELEMENT
    8 (
    9 "header",
    10 XMLFOREST
    11 (
    12 'ttt' AS TXID,
    13 'rrr' AS RXID,
    14 'QQQ' AS QUEUENAME,
    15 XMLFOREST
    16 (
    17 123456789 AS COD_COM,
    18 111 AS ID_CAT,
    19 'www' AS ID_ITM,
    20 1123 AS PR_KEY,
    21 'ST' AS STATUS
    22 ) AS REFOBJ
    23 )
    24 ),
    25 xmltype
    26 (
    27 '<body>gfgfg</body>'
    28 )
    29 ).getstringval()
    30 FROM dual;
    XMLELEMENT("MESSAGE",XMLATTRIBUTES(1321324ASIDSEQ,'FFF'ASCDMS,'FFF'ASTPMS,SYSDAT
    <message IDSEQ="1321324" CDMS="fff" TPMS="fff" TIME="31-MAR-03" REFID="342134"><
    header><TXID>ttt</TXID><RXID>rrr</RXID><QUEUENAME>QQQ</QUEUENAME><REFOBJ><COD_CO
    M>123456789</COD_COM><ID_CAT>111</ID_CAT><ID_ITM>www</ID_ITM><PR_KEY>1123</PR_KE
    Y><STATUS>ST</STATUS></REFOBJ></header><body>gfgfg</body>
    </message>
    SQL> select xmlelement("a", xmlelement("empno", empno), xmltype('<b>1</b>')) from emp;
    XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
    <a><empno>7369</empno><b>1</b>
    </a>
    <a><empno>7499</empno><b>1</b>
    </a>
    <a><empno>7521</empno><b>1</b>
    </a>
    <a><empno>7566</empno><b>1</b>
    </a>
    XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
    <a><empno>7654</empno><b>1</b>
    </a>
    <a><empno>7698</empno><b>1</b>
    </a>
    <a><empno>7782</empno><b>1</b>
    </a>
    <a><empno>7788</empno><b>1</b>
    XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
    </a>
    <a><empno>7839</empno><b>1</b>
    </a>
    <a><empno>7844</empno><b>1</b>
    </a>
    <a><empno>7876</empno><b>1</b>
    </a>
    XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
    <a><empno>7900</empno><b>1</b>
    </a>
    <a><empno>7902</empno><b>1</b>
    </a>
    <a><empno>7934</empno><b>1</b>
    </a>
    14 rows selected.

  • Problem with XML SQL  JDBC adapter

    Hello All.
    I have quite strange problem with my PI.
    Whole scenario is SOAP -> JDBC, asynchronous. Everything works fine on DEV server. After transporting objects (using CTS) to QA env I'm getting this error:
    JDBC Message processing failed, due to Error processing request in sax parser:
    No 'action' attribute found in XML document
    (attribute "action" missing or wrong XML structure)
    But document seems to be correct. I've compared it to DEV server documents - they are identical. What could be wrong??
    Document looks like this:
    <ns2:BIPMessage xmlns:ns2="http://mynamespace.com/xi/sn"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <synchSlLok>
       <STATEMENTNAME>
         <SYNCH_SL_LOK ACTION="INSERT">
            <TABLE>SYNCH_SL_LOK</TABLE>
             <ACCESS>
                <ID_TRANS>22050</ID_TRANS>
                <ID_LOK>1234</ID_LOK>
                <ID_CBK>1000050911</ID_CBK>
                <NR_LOK>1234</NR_LOK>
                <OPIS_LOK>12312312312312</OPIS_LOK>
                <TYP>D</TYP>
                <OPERACJA>U</OPERACJA>
              </ACCESS>
          </SYNCH_SL_LOK>
        </STATEMENTNAME>
      </synchSlLok>
      </ns2:BIPMessage>
    TIA
    Best Regads
    Maciej

    Hi,
    i was also facing the same error few days back in a JDBC -RFC-JDBC Synchronous scenario. In that scenario, i was using 2 modules in JDBC sender module tab. It was working fine. later i change polling interval and then i started getting same error. it happened coz of sequence of Module got changed somehow.
    So please check in Receiver JDBC adapter and SOAP sender adapter CC  if anything is changed. If this scenario is working in DEV as it is then it should work after transport.
    Else have a look here
    Re: attribute "action" missing or wrong XML structure
    JDBC - No 'action' attribute found in XML document - error
    Regards
    Aashish Sinha
    Edited by: Aashish Sinha on Mar 15, 2011 10:42 AM

  • Sender Adapter Module Not Working

    Hi,
    I have changed an existing Sender Adapter Module code and deployed using SDM.
    It was working fine but after some days it is not working as designed. Say for an example, the number of pipes(|) in each record is one less than usual number of pipes. It does not say any error in module but in my java mapping raising GENERIC Exception.
    I had the same problem in Dev and now I am facing the same in QA.
    When I checked the standalone code it is working fine. Any reason for this anomalous behavior?
    Regards,
    Manikandan R

    Hi,
    Could you give us more details about : your coding, input sample when error is raised ?
    That'd help a lot
    Chris

  • Adapter Module Error-Sending excel file as an attachment of the mail

    Hi ,
    My scenario is as follows
    1)I am sending an excel file as an attachment of the mail.I need to read that excel attachment as a payload.
    So mail adapter is used in sender side.
      To configure this, have used standard PayloadSwapBean  module with proper module key.
      Next to convert excel to XML another custom adapter module is being used.
    Both this adapter module , I configured into the CC of sender mail adapter.
    The order in which adapter modules are being used in the sender CC are as follows
    1)localejbs/AF_Modules/PayloadSwapBean
    2)localejbs/MDPExcelToXMLConversion
    3)sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    MDPExcelToXMLConversion-Custom adapter module written to convert excel to xml.
    I am getting the following error
    exception caught during processing mail message [4899]com.sap.aii.af.lib.mp.module.ModuleException
    And also,
    no messages in coming MONI of PI.
    Pls suggest what to do.
    Thanks
    Ayan

    Shabarish,
    Will the ordering in which the adapter modules(In this case there are two-PayloadSwapBean & MDPExcelToXML) are appearing into Module tab of sender adapter matter?
    Firstly, what is happenning
    1)If I take out the custom  adapter module MDPExcelToXML and put only PayloadSwapBean  then it is successfully converting mail attachment into the main Payload i.e PayloadSwapBean   module is working.
    2)Nextly, my local code( i.e java code without including standard Module specific method like ejbActivate(),ejbPassivate(),process()  etc etc.)) for MDPExcelToXML is successfuly converting the excel file into the XML file.Then I am making the local code into adapter module specific code and deploying that.
    A few question arises here,
    Do I need to do any specific configurations here in PI for this particular things.Maybe both the adapter module is clashing with each other.
    And also using tracing and logging into my custom adapter module code.Getting the following error,
    java.io.IOException: Unable to read entire header; 116 bytes read; expected 512 bytes#
    Thanks
    Ayan

  • How to insert Text physically to xml in xml Element

    hello friends,
    I am newb of jDom. i am trying to change xml "Element's"--->"Text". My xml is as follows .....
    <?xml version ="1.0">
    <Elements>
             <code>
                       <data>EE550</data>
             </code>
    </Elements> I am trying to replace that "<data>" by <data>AA550</data>
    my code is as below
                 SAXBuilder sb = new SAXBuilder();
                 Document doc = sb.build(new File("src/xml/M90EE.xml"));
                 Element element = doc.getRootElement();
                 List children = element.getChildren();
                 String key = (element.getChild("text").getChild("mkey").setText("AA550").getTextTrim());   System.out.println("mkey       :"+key);
    output:
    mkey   :AA550 but is it possible to change in the xml file phisically.
    thanQ
    Ajay

    hello Reegz,
    ThanQ so much for perfect solution....
    when i do like that it is actually adding text to the existing Element Text.. so i wrote as follows....
    SAXBuilder sb = new SAXBuilder();
    Document doc = sb.build(new File("src/xml/M90EE.xml"));
    *String skey = (element.getChild("text").getChild("mkey").removeContent().toString());*     //--------->step 1
    *String skey1 = (element.getChild("text").getChild("mkey").addContent("ISO9001").toString());* //-------->step 2     
    String rdmkey = (element.getChild("text").getChild("mkey").getTextTrim());
    XMLOutputter serializer = new XMLOutputter();
    String str = serializer.outputString(doc);
    FileWriter fr = new FileWriter("src/xml/M90EE.xml");
    fr.write(str);
    fr.flush();
    fr.close();Is there any other way to replace text in step1 and step2 other than above or will it be enough for multiuser programming. Because this application will be accessed by so many number of user's what do u sujjest.
    thanQ ...
    Han.

  • Adapter Module error

    Hi,
    I made some code changes to a file adapter module code which was working fine [ before the changes were made].
    After making the changes and redeploying the adapter module 'am getting the following error in the RWB communication channel monitoring.
    Error: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.
    Any possible reasons for this error?
    Thanks,
    Anand

    Hi,
    Tested the code 'standalone' in the NWDS.No issues with the code execution.
    This particular project was imported from a colleagues machine into my NWDS...not sure if any settings have gone kaput because of that?
    Proabably I would try recreating the EJB project with the exact same steps in my NWDS and then check.
    Thanks,
    Anand

  • Adapter module - problem with XML

    Hi all
    I have written an adapter module for the sender jdbc adapter(it shouldn't matter which adapter) that converts the content into xml by addressing each byte of the message content.
    I am able to make the xml but when the message reaches the integration server it throws up a mapping exception. When I look at the payload in SXI_MONITOR it says -
    Invalid at the top level of the document. Error processing resource 'file:/// ........
    But when I right click on the payload and do "view source" and then save the text document and then refresh the payload in the payload window it shows me the xml document.
    Would you have any idea as to why the IS doesn't recognise the message to be an xml message?
    Thanks a lot
    Salil

    Hi Bhavesh
    Yup it's a perfectly valid xml. I tried saving it as a file to my desktop and it opened fine in my browser. As I mentioned earlier even when I do a "view source" of the payload and then save that and subsequently refresh the payload it shows up fine too.
    Actually here is the payload. i am wondering if all it needs is a carriage return after the <?xml tag.
    <?xml version="1.0" encoding="utf-8"?>          <ns0:out_sale_mt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.rd1.com/pos/sales"><TransHeaders><ID>1782219</ID><TransNo>2</TransNo><Branch>91</Branch><Station>99</Station><Receipt>0910990000002</Receipt><Logged>2007-08-02T18:52:53</Logged><TransType>C</TransType><TransStatus>C</TransStatus><TheUser>cantlong</TheUser><Customer>100001006</Customer><CustType>C</CustType><SecondCustomer></SecondCustomer><SecondCustCard></SecondCustCard><LinesNo>2</LinesNo><PaymentsNo>1</PaymentsNo><TotalBeforeTax>2.8400</TotalBeforeTax><TotalAfterTax>3.1900</TotalAfterTax><ScannedNo>0</ScannedNo><ScanTime>0</ScanTime><PayTime>0</PayTime><IdleTime>0</IdleTime><Reason>0</Reason><Rounding>0.0000</Rounding><TH_FieldText1></TH_FieldText1><TH_FieldText2></TH_FieldText2><TH_FieldText3></TH_FieldText3><System1>0</System1><System2>0.0000</System2><System3></System3><FolioID>0</FolioID><UserAcc>1</UserAcc><Salesperson></Salesperson><TransLines xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.rd1.com/pos/sales"><TransNo>2</TransNo><Branch>91</Branch><Station>99</Station><Line>1</Line><LineType>N</LineType><UPC>9400559001014</UPC><IsVoided>0</IsVoided><Quantity>1.0000</Quantity><Price>3.1900</Price><DiscountID>0</DiscountID><TaxNo>1</TaxNo><SubBeforeTax>2.8356</SubBeforeTax><SubAfterTax>3.1900</SubAfterTax><Reason>0</Reason><Note/><TL_FieldText1/><TL_FieldText2/><TL_FieldText3/><SerialNumber/><TransStatus>C</TransStatus><Cost>2.4000</Cost><PriceSet>3.1900</PriceSet><TaxNo1>1</TaxNo1><TaxNo2>0</TaxNo2><TaxNo3>0</TaxNo3><TaxAmount1>0.3544</TaxAmount1><TaxAmount2>0.0000</TaxAmount2><TaxAmount3>0.0000</TaxAmount3><CostProtect xsi:nil="true"/><Location>0</Location><ESMPack>0</ESMPack></TransLines><TransPayments xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.rd1.com/pos/sales"><TransNo>2</TransNo><Branch>91</Branch><Station>99</Station><Line>1</Line><MediaID>9</MediaID><MediaName>SPLIT</MediaName><Value>3.1900</Value><Fee>0.0000</Fee><Change>0.0000</Change><MediaNumber/><TP_FieldText1/><Rate>0.000000000</Rate><FCValue>0.0000</FCValue></TransPayments><PostCapture xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.rd1.com/pos/sales"><Id>168165</Id><Type/><TransStatus>C</TransStatus><TransNo>2</TransNo><Branch>91</Branch><Station>99</Station><Line>0</Line><IsVoided>0</IsVoided><Logged>2007-08-02T18:52:54</Logged><TheUser>cantlong</TheUser><Status>0</Status><UPC/><Note1/><Note2/><LineBucket>1</LineBucket><Bucket>&amp;lt;capture&amp;gt;&amp;lt;splits&amp;gt;&amp;lt;split&amp;gt;&amp;lt;code&amp;gt;100001006&amp;lt;/code&amp;gt;&amp;lt;percent&amp;gt;50&amp;lt;/percent&amp;gt;&amp;lt;/split&amp;gt;&amp;lt;split&amp;gt;&amp;lt;code&amp;gt;100001030&amp;lt;/code&amp;gt;&amp;lt;percent&amp;gt;50&amp;lt;/percent&amp;gt;&amp;lt;/split&amp;gt;&amp;lt;/splits&amp;gt;&amp;lt;/capture&amp;gt;</Bucket></PostCapture></TransHeaders></ns0:out_sale_mt>

  • Creating J2EE adapter module problem

    Hi All,
    when i am creating a J2EE customer-specific adapter module in SAP Netweaver Developer Studio, then in the java class when i write these statements:
    <u>import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;</u>
    public class CustomerMeter implements SessionBean, <u>Module</u>{
    it is showing error on the  above underlined things that it cannot resolve these things.
    can anybody suggest where to locate these librarys in Project - Properties - Java Build Path - Libraries path from the main menu.
    Thanks,
    Rajeev Gupta

    Hi Amit,
    On changing the ejb-jar.xml as you said:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
                             "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
        <description>EJB JAR description</description>  
        <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <session>
                   <ejb-name>CustomerMeter</ejb-name>
                   <ejb-class>pkgCustomerMeter.CustomerMeter</ejb-class>
                   <home>com.sap.aii.af.mp.module.ModuleHome</home>
                   <remote>com.sap.aii.af.mp.module.ModuleRemote</remote>
                   <local-home>com.sap.aii.af.mp.module.ModuleLocalHome</local-home>
                   <local>com.sap.aii.af.mp.module.ModuleLocal</local>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
         </enterprise-beans>       
    </ejb-jar>
    But now on saving this xml, it is giving the following  error:
    <b>The content of element type "session" must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,ejb-class,session-type,transaction-type,env-entry,ejb-ref,ejb-local-ref,security-role-ref,security-identity?,resource-ref,resource-env-ref)".</b>
    Could you please tell how to correct this error.
    Thanks and Regards,
    Rajeev Gupta

  • SOAP Axis adapter - problem with XML formatting

    Hello All,
    We are using SOAP Axis adapter on our scenario (because of NTLM authenticatiom) and faced a problem that some module in a module chain is pretty-formatting XML message (inserting newlines and spaces).
    Receiving WebService is REALLY strict on format and doesn't allow spaces and newlines between XML elements.
    Formatting is for sure done already in adapter as in sxmb_moni message is still one-liner.
    After different tests this formatting is most likely done by XI30OutboundHandler.
    Are there any parameters to prevent this formatting?
    If there are no parameters, than maybe there is a standard module to remove this XML indentation?
    Where I can found source code for XI30OutboundHandler to check how it is extracting payload from XI message?
    Thanks in advance for your answers!
    Best Regards,
    Artsiom Anichenka

    Hi, have you find a solution for this problem?
    I've tried set the parameter “disablePrettyXML”, as mentioned in SAP note 1039369 (search for “disabling pretty XML”), but apparently it didn’t work too. Have you tried that?
    I still get linefeeds and carriage return in the post requisition to the WebService.
    Regards,
    Ronaldo Schork.

  • Change "subject" in Receiver Mail Adapter Module

    Hi all,
    following the "How To Guide" I developed a Module for my receiver mail adapter. Everything works fine.
    Now my question: is it possible to change the content of the mail-"subject" in the module?
    Your help is appreciated.
    Carmen

    Hi Stefan,
    maybe I should describe my problem more detailed:
    My scenario is RFC-XI-Mail. I use the mail package to determine the receiver of the mail dynamically. Another thing I want to do, is to attach a file to this mail which is located on the server. So far so good.
    My problem is, that the name of the file (which I need in my adapter module) changes for every mail. So what I need is the possibility to deliver it to the adapter module.
    I found out that it is possible to read the payload. So my idea was to hand it over in one of the fields like "subject". But now I want to change the subject afterwards...(delete the filename).
    Maybe you have another idea?
    Regards
    Carmen

Maybe you are looking for