Generating XML signature with prefix dsig ?

Hi everyone,
I'm facing a problem generating a signature of XML document. I'm using Jwsdp and the apache toolkit. So far, I can generate the signature of this form :
<Signature>
<SignedInfo> .....
I would like to generate the signature like this :
<dsig:Signature>
<dsig:SignedInfo> ....
The API doesn't specify how to add the prefix dsig befor tags element ...
It's very important for me to solve the problem, so any help would be really really appreciated :-)
Thanks a lot.

There is a method in DOMSignContext to do that:
// org.w3c.dom.Document doc;
DOMSignContext dsc = new DOMSignContext(privateKey, doc.getDocumentElement());
dsc.putNamespacePrefix(XMLSignature.XMLNS, "dsig");  // or "ds" which is my case

Similar Messages

  • XML-file with prefix in Java importing

    Hello,
    I have one XML-file with prefix "wf" like this:
       <wf:data>
               <wf:name>NAME</wf:name>
               <wf:description/>
               <wf:creation_time>0001-01-01T00:00:00</wf:creation_time>
               <wf:user wf:ref=""/>
               <wf:properties/>
       </wf:data>the Java-Code like this:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              factory.setNamespaceAware(false);
              XPath xpath = XPathFactory.newInstance().newXPath();
              String expression = "./data/name/text()";
              InputSource inputSource = new InputSource("workflow.xml");
                    String result = xpath.evaluate(expression, inputSource);the Java-Code works well, if the prefix does not exist, otherwise I could not get any result. Could somebody please help me?
    Thank you
    Sunny

    I have defined the namespaceI didn't see that in your original post.
    I notice that your XPath expression doesn't include the namespace prefixes and you don't tell it how to map the prefixes to the namespace URIs. I am not sure whether calling factory.setNamespaceAware(false) makes it unnecessary to do that. I wouldn't count on it.

  • Generating XML content with SAX including schema reference

    Hi all, XML newbie question here.
    I'm trying to generate an XML document from a certain file format using SAX, but I can't figure out how to get the generated XML document to include a schema reference.
    Here's the code, it's taken from posts on this forum, so it should be familiar:
    StreamResult streamResult = new StreamResult(out);
            SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try {
                TransformerHandler hd = tf.newTransformerHandler();
                Transformer serializer = hd.getTransformer();
                serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
                serializer.setOutputProperty(OutputKeys.INDENT, "yes");
                hd.setResult(streamResult);
                hd.startDocument();
                AttributesImpl atts = new AttributesImpl();
                hd.startElement("http://maul.ddm.apm.bpm.eds.com", "DTR_XML", "DTR_XML", atts);
                hd.endElement("http://maul.ddm.apm.bpm.eds.com", "DTR_XML", "DTR_XML");
                hd.endDocument();
            } catch (SAXException e) {
                e.printStackTrace();
            } catch (TransformerConfigurationException e) {
                e.printStackTrace();
            }Here's the output I get:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <DTR_XML/>
    And I'm looking for output like this (I think - basically I have this dtr_xml.xsd located at the root web directory on http://maul.ddm.apm.bpm.eds.com and I want the generated XML file to reference that schema for validation when parsing):
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <DTR_XML xmlns="http://maul.ddm.apm.bpm.eds.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maul.ddm.apm.bpm.eds.com dtr_xml.xsd"/>

    Yes, you've led me along the right track with the attributes stuff. Here's what I've got right now...
    StreamResult streamResult = new StreamResult(out);
            SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try {
                TransformerHandler hd = tf.newTransformerHandler();
                Transformer serializer = hd.getTransformer();
                serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
                serializer.setOutputProperty(OutputKeys.INDENT, "yes");
                hd.setResult(streamResult);
                hd.startDocument();
                AttributesImpl atts = new AttributesImpl();
                atts.addAttribute("", "xmlns", "xmlns", "CDATA", "http://maul.ddm.apm.bpm.eds.com");
                atts.addAttribute("", "xsi", "xmlns:xsi", "CDATA", "http://www.w3.org/2001/XMLSchema-instance");
                atts.addAttribute("", "schemaLocation", "xsi:schemaLocation", "CDATA", "http://maul.ddm.apm.bpm.eds.com dtr_xml.xsd");
                hd.startElement("", "DTR_XML", "DTR_XML", atts);
                hd.endElement("", "DTR_XML", "DTR_XML");
                hd.endDocument();
            } catch (SAXException e) {
                e.printStackTrace();
            } catch (TransformerConfigurationException e) {
                e.printStackTrace();
            }This produces the output I wanted earlier...
    As for the org.xml.sax.helpers.NamespaceSupport, I can't seem to find any documentation on using it anywhere, and the javadoc is cryptic to me. Maybe it's used internally in SAX for tracking namespaces or something like that.
    Another interesting thing to me is that if I use the code you gave:
    atts.addAttribute("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation",
         "xsi:schemaLocation", "CDATA", "http://maul.ddm.apm.bpm.eds.com dtr_xml.xsd");I don't see "http://www.w3.org/2001/XMLSchema-instance" anywhere in the output. Is SAX ignoring the namespace uri argument? It appears so. The javadoc states that the uri argument is "The Namespace URI, or the empty string if none is available or Namespace processing is not being performed." It would appear that Namespace processing is not being done... but I don't know how to turn it on.

  • Form2xml generate xml files with "??????????" for non-latin characters

    i used form2xml in oracle 10 g suit to convert forms 5   .fmb to .xml . using the command:
    frmf2xml.bat OVERWRITE=YES myform.fmb
    The forms contains arabic character set, but the xml file is generated with character "????????? "  , and the xml file is unusable
    what can i do to keep arabic characters in the generated  xml files.
    Edit:
    I run form2xml on windows xp SP3 with arabic support (codepage =1256)
    The xml file is generated as UTF-8

    I resolved the problem.
    step1: search in the registry for every NLS_Lang key and modify its value to codepage 1256 using regedit
    step2: in control panel-Region and Language , I  modified language to be Arabic
    Now every thing is good

  • PL/SQL to generate XML compliant with an XSD

    Please excuse me if this has been asked elsewhere. I'm trying on Oracle 9.2 to output XML that will comply with a predefined schema. I've started out by creating various object types and an object view that matches the xml schema definition, and can use dbms_xmlgen.getxml to get out an xml document (a clob) without trouble, BUT I need to post-process this with shell scripts to add on the namespace information and amend the tags to put in the (e.g.) ns3: bit to identify which is the target namespace. It seems odd that I should need to do this - is there a better way? I have trawled all over rthe place but cannot find any mention of this requirement. Thanks for any help you might give me, I'm new to xml.

    Okay forget that, here's a quote from Oracle:
    "I'm the PM for XML DB, and our preferred direction for generating XML from data stored in relational tables is the industry standard SQL/XML operators. DBMS_XMLGEN will continue to be supported but most of our development efforts in terms of performance / feature improvements willl be targetted at the SQL/XML operators (XMLELEMENT(), XMLATTRIBUTES(), XMLAGG(), XMLFOREST() etc). In general they have proven to be much more flexible and performant, and easier to use "
    So it seems that the object-type/view route is dead in the water. Shame.

  • How to generate xml file with multiple nodes using sqlserver as database in SSIS..

    Hi ,
    I have to generate the xml file using multiple nodes by using ssis and database is sqlserver.
    Can some one guide me on to perform this task using script task?
    sudha

    Why not use T-SQL for generating XML? You can use FOR XML for that
    http://visakhm.blogspot.in/2014/05/t-sql-tips-fun-with-for-xml-path.html
    http://visakhm.blogspot.in/2013/12/generating-nested-xml-structures-with.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • XML Signature with Barcoded Form

    I have a form that has a number of fields that need to be filled out. When this is complete, the user should digitally sign (with a certificate) the form. However, due to legal requirements, the form must then be printed and mailed back to the organization. Is it possible to encode the signature data within the barcode (PDF417) so it can be validated?

    After finding the sign function and playing around with the resulting XML Signature, I've found it's just too much data to put in a barcode, even a 2D one.

  • Generating xml tags with stored procedure

    Hi Friends,
    I have to create a xml report using procedure .the code is given here to generate xml tags.
    create or replace procedure sri_xml (errbuff out varchar2,
    retcode out number) as
    /* create cursor to fetch the records*/
    cursor c_emp is select empno,
    ename,
    deptno,
    sal,
    job
    from emp;
    begin
    /* first line of xml data should be "<? xml version = "0.1"?>" */
    fnd_file.put_line(fnd_file.output,'<?xml version = "1.0" ?>');
    fnd_file.put_line(fnd_file.output,'<per_emp1>');
    for c in c_emp loop
    /* for each record create a group tag <gemp_name> at start */
    fnd_file.put_line(fnd_file.output,'<G_EMP_NAME>');
    /*EMBEDD DATA BETWEEN XML TAGS */
    fnd_file.put_line(fnd_file.output,'<empno>' || c.empno || '</empno>');
    fnd_file.put_line(fnd_file.output,'<ename>' || c.ename || '</ename>');
    fnd_file.put_line(fnd_file.output,'<sal>' || c.sal || '</sal>');
    fnd_file.put_line(fnd_file.output,'</G_EMP_NAME>');
    end loop;
    fnd_file.put_line(fnd_file.output,'</per_emp1>');
    end;
    i run the procedure in the concurrent program with output mode as text and i got the xml tags as the out put. i have created the template using the data definition and registered them in the xml publisher administer but i am unable to get the out put when i run the concurrent request it is giving the message "AUTHENTICATION FAILED".
    please help me to solve the problem and to get the desired output with desired template.
    thanks in advance,
    siddam

    Hi Siddam,
    Please post your query on BI Publisher forum.
    There are number of folks who can resolve the issue u faced.
    Please go through the bi publisher developers guide and then design the report.
    I am not sure about the process ur following for report development...i think you have to create data defination and rtf layout and then attach it to oracle xml administrator responsibility.
    Ratnesh

  • Validating generated XML file with DTD

    Hello all,
    my requirement is to test the XML file with its DTD.
    we are creating an XML file, before writing it on the application server , we need to test it with its DTD.
    i found one method set_validating in the interface if_ixml_parser , for validating XML file, but not getting an idea how to use it, like how to link the DTD to XML etc.
    if i try to use the above method am getting the following error:
    Unable to retrieve the external entity 'd:\dtdfile.dtd'.
    where 'd:\dtdfile.dtd' is the path of the DTD file included in the Doctype of the XML file.
    Please help me to solve this.
    Thx in advance.

    Hello,
    Did you find your answer ?
    I know how to validate an XML file an internal DTD, but not an external one... If you know, can you pelase advice ?
    If you didn't found yet, you need to use method get_reason() to get the description of the error.
    best regards,
    Gilles.

  • Generating XML File with Table data...

    Hi All,
    Bear with me, with my Oracle XML knowledge,,,
    we have Oracle 8i ( Relaease 3) as our database, and managegement want to have XML type of Text file, with respect to data in the Customer Table. Expected XML tags would be the Column Names of the Table.
    Table has three columns,, Name, Address, Telephone.
    So desired XML file looks like below:
    <Name>John Hunter</Name><Address> City Road, London</Address><Telephone>1223223</Telephone>
    If I deceided to do this task using PL/SQL, how could I start it,,,, All comments are welcome, this is the first time that I am going to generate this type of file ,,,

    Hi Chandana,
    You can check out the DBMS_XMLQUERY package for this purpose. It provides XMLType functionality in Oracle 8i. You can access the documentation for the same at:
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_xmlque.htm#ARPLS066
    If you happen to have access to Oracle 9i, then you can use XMLType Views provided with XML DB for your requirement.
    Thanks
    Shefali

  • XML Signature with WSDL

    Hello!!!
    I created this topic also at Security forum, but i think that was a wrong choice
    I need to consume Web Service (WSDL). It's working without any problem. But there is also one operation where I need to add Digitial Signature to it.
    It is very hard to find any documentation how to configure signing XML messages in SAP. I was looking for SSF which should fit to my requriements. Then I found something like WS Security in LPCONFIG - but i don't know how to use it. I put there Profile OUT, but nothing happen. Could you give me some directions where to look for this?
    To generate proxy i used SE80. I have only ABAP instance (but if there won't be any other choice i can install AS JAVA as well). No PI system in landscape.
    Best regards
    Rob

    Are you doing digital signing transport level or message level?
    Transport level:
    if you do transport level then share the end system certificate in PI keystore and use https communication. Use Soap receiver adapter.
    Message level:
    If you need to message level digital signature then you might want to explore WS adapter. THis adapter supports digital signing as well WS Reliable Messaging Protocol. You have to configure WS adapter as receiver for this.  Refer SAP help document on WS adapter for this. If there is a limitation to use WS adapter on this area, then you might have to do java mapping using Apache Axis software for digital signing. This requires more java effort.

  • Generate fortune signatures with mail

    hi again, i've already posted this in the "Mail & Address Book - Tiger" section but didn't get any feedback - the positive thing about that: nobody said that this is not possible
    i would be glad about a solution because i like mail and want to contiune useing it! (btw i am new to os x)
    so here comes the original question:
    hi, everyone!
    i want to add a random signature everytime i compose a new mail. this signature should be generated with the stdout put from the good old command line tool 'fortune'.
    i've already written an applescript that will do that but i don't want to execute the script everytime i want to write a new mail instead this should be done automatically evertime i hit compose mail.
    i didn't found a solution yet and when i search for 'random signature' they always come up with the functionality to choose a random signature of all available sigantures... a bad solution might be to create 1000 signatures
    have anyone of you an idea to realize that - with or without applescript?!
    thx
    PB-G4-12"   Mac OS X (10.4.7)  

    as told i've already a script that does this... but i don't want to use a cronjob for execute this but the mail.app itself...
    this would be a much more elegant solution
    even the possiblity to read from files for a signature would be nicer...
    it disappoints me a bit that an app in version 3.0 can't do this (ok, 2.0, but i guess 3.0 can't either)
    thx

  • Generate XML file with Elements and attributes from Oracle table

    Hi,
    I have the following table structure.
    CREATE TABLE COIL
    COIL_ID                         NUMBER(10),
    COIL_NUMBER                    VARCHAR2(40),
    COIL_PO_OPERATING_UNIT     VARCHAR2(20),
    COIL_PO_NUMBER               VARCHAR2(40),
    MILL_NUMBER                    VARCHAR2(2),
    MILL_COIL_STATUS          VARCHAR2(15),
    ITEM_NUMBER                    VARCHAR2(40),
    COIL_WEIGHT                    NUMBER(38),
    WEIGHT_UOM                    VARCHAR2(10),
    DOCUMENT_NUMBER               VARCHAR2(40),
    DOCUMENT_DATE               DATE,
    DOCUMENT_STATUS               VARCHAR2(15),
    DOCUMENT_TYPE               VARCHAR2(20),
    DOCUMENT_SOURCE               VARCHAR2(20),
    TEST_ID                         NUMBER(38),
    VALUE                         NUMBER,
    TEST_UOM                    VARCHAR2(20),
    TEST_STATUS               VARCHAR2(70),
    TESTER_LOGIN               VARCHAR2(20),
    EQUIPMENT_CODE               VARCHAR2(50),
    DOC_STS_MSG               VARCHAR2(600)
    For each COILID record, there could be multiple records baased on TEST_ID/VALUE/TEST_UOM etc.
    And I would like to prepare xml file in the following format by selecting data from COIL?
    <?xml version="1.0"?>
    -<Coil xsi:noNamespaceSchemaLocation="www.tempel.com/COIL.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb="http://xmlns.oracle.com/xdb">
    <CoilId>1419532</CoilId>
    <CoilNo>D2221050010A0</CoilNo>
    <CoilPOOperatingUnit>Changzhou</CoilPOOperatingUnit>
    <CoilPONo>4619</CoilPONo>
    <MillNo>86</MillNo>
    <MillCoilStatus>Test</MillCoilStatus>
    <ItemNo>050FP800 C5</ItemNo>
    <Weight>7076</Weight>
    <UOM>KILOGRAM</UOM>
    <DocumentNo>0</DocumentNo>
    <DocumentDate>2013-01-11</DocumentDate>
    <DocumentStatus>NonProcessed</DocumentStatus>
    <DocumentType>Tests</DocumentType>
    <DocumentSource>CHIGMA1</DocumentSource>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4992" TestUnit="mm" Status="NonProcessed" TestId="135"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.0128" TestUnit="mm" Status="NonProcessed" TestId="124"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="12" TestUnit="mm" Status="NonProcessed" TestId="125"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5095" TestUnit="mm" Status="NonProcessed" TestId="127"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5042" TestUnit="mm" Status="NonProcessed" TestId="128"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5058" TestUnit="mm" Status="NonProcessed" TestId="129"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4967" TestUnit="mm" Status="NonProcessed" TestId="130"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5049" TestUnit="mm" Status="NonProcessed" TestId="131"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4972" TestUnit="mm" Status="NonProcessed" TestId="132"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4960" TestUnit="mm" Status="NonProcessed" TestId="133"/>
    <Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4996" TestUnit="mm" Status="NonProcessed" TestId="134"/>
    </Coil>
    Can you please guide me how to do it in a single query?
    Thanks in advance.

    Hi Odie,
    Thanks for the quick offer.Sure,No problem.I expect the format to be as follows
    <Coil xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.tempel.com/COIL.xsd">
    <CoilId>97239</CoilId>
    <CoilNo>777078</CoilNo>
    <CoilPOOperatingUnit>TSUSA</CoilPOOperatingUnit>
    <CoilPONo>3407</CoilPONo>
    <MillNo>31</MillNo>
    <MillCoilStatus>Test</MillCoilStatus>
    <ItemNo>0140SP150 C5A</ItemNo>
    <Weight>17365</Weight>
    <UOM>POUNDS</UOM>
    <DocumentNo>0</DocumentNo>
    <DocumentDate>2008-10-13</DocumentDate>
    <DocumentStatus>Processed</DocumentStatus>
    <DocumentType>Tests</DocumentType>
    <DocumentSource>MILL</DocumentSource>
    <Tests EquipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="84" TestUnit="15T" Status="Processed" TestId="65"></Tests>
    <Tests EquipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="1.39" TestUnit="W/Lb" Status="Processed" TestId="48"></Tests>
    <Tests EquipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="1979" TestUnit="W/Lb" Status="Processed" TestId="49"></Tests>
    </Coil>
    But instead it came with below format
    <Coil xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSch
    emaLocation="www.tempel.com/COIL.xsd"><CoilId>97239</CoilId><CoilNo>777078</Co
    ilNo><CoilPOOperatingUnit>TSUSA</CoilPOOperatingUnit><CoilPONo>3407</CoilPONo>
    <MillNo>31</MillNo><MillCoilStatus>Test</MillCoilStatus><ItemNo>0140SP150 C5A<
    /ItemNo><Weight>17365</Weight><UOM>POUNDS</UOM><DocumentNo>0</DocumentNo><Docu
    mentDate>2008-10-13</DocumentDate><DocumentStatus>Processed</DocumentStatus><Do
    cumentType>Tests</DocumentType><DocumentSource>MILL</DocumentSource><Tests Equ
    ipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="84" TestUnit="15T" Status="P
    rocessed" TestId="65"></Tests><Tests EquipmentCode="MILLEDI" TesterLogin="MILL
    EDI" Value="1.39" TestUnit="W/Lb" St atus="Processed" TestId="48"></Tests><Tes
    ts EquipmentCode="MILLEDI" TesterLog in="MILLEDI" Value="1979" TestUnit="W/Lb"
    Status="Processed" TestId="49"></Tests></Coil>
    The sample insert records are as follows
    insert into COIL (coil_id, coil_number, coil_po_operating_unit, coil_po_number, mill_number, mill_coil_status, item_number, coil_weight, weight_uom, document_number, document_date, document_status, document_type, document_source, test_id, value, test_uom, test_status, tester_login, equipment_code, doc_sts_msg)
    values (97239, '777078', 'USA', '3407', '31', 'Test', '0140SP150 C5A', 17365, 'POUNDS', '0', to_date('13-10-2008', 'dd-mm-yyyy'), 'Processed', 'Tests', 'MILL', 65, 84, '15T', 'Processed', 'MILLEDI', 'MILLEDI', null);
    insert into COIL (coil_id, coil_number, coil_po_operating_unit, coil_po_number, mill_number, mill_coil_status, item_number, coil_weight, weight_uom, document_number, document_date, document_status, document_type, document_source, test_id, value, test_uom, test_status, tester_login, equipment_code, doc_sts_msg)
    values (97239, '777078', 'USA', '3407', '31', 'Test', '0140SP150 C5A', 17365, 'POUNDS', '0', to_date('13-10-2008', 'dd-mm-yyyy'), 'Processed', 'Tests', 'MILL', 48, 1.39, 'W/Lb', 'Processed', 'MILLEDI', 'MILLEDI', null);
    insert into COIL (coil_id, coil_number, coil_po_operating_unit, coil_po_number, mill_number, mill_coil_status, item_number, coil_weight, weight_uom, document_number, document_date, document_status, document_type, document_source, test_id, value, test_uom, test_status, tester_login, equipment_code, doc_sts_msg)
    values (97239, '777078', 'USA', '3407', '31', 'Test', '0140SP150 C5A', 17365, 'POUNDS', '0', to_date('13-10-2008', 'dd-mm-yyyy'), 'Processed', 'Tests', 'MILL', 49, 1979, 'W/Lb', 'Processed', 'MILLEDI', 'MILLEDI', null);
    commit;
    Thanks in Advance.

  • Problem with XML signature

    Can anybody tell me how to generate an xml signature
    with the base 64 transform(Transform.BASE64)?
    I just can't find any documentation on the web.
    It would be great to provide a small code exemple.
    Thanks
    Antoine

    Thanks for the reply.
    I'm applying appropriate namespaces to the generated xml string. Could it be the probelem?
    this is how the generated xml looks in final stage, I mean after I'm doing some rework on the generated xml.
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#PAYMENTS"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>IXgHx5ioixsJ13jyg767D8UCU9s=</DigestValue></Reference></SignedInfo><SignatureValue>DO+Fngf3h0Q5iDoMq2mZFL+bxL3vY1i1fyqzBbKRPhHlzqWrW2wP3SFHjVzPLXdj92W8hMx9I8Jq
    QBV/D+pUKa32aZB7kPwOGZqR63X+d6Hca58jnTK7+zq8Fzi2DPlE+omQhgT3xeXp/lQpKI8vAgVT
    eX+eylRYTAZDSfDw7qk=</SignatureValue><Object Id="PAYMENTS"><PAYMENTS xmlns=""><Payment><PaymentIdA></PaymentIdA><PaymentIdB>aa</PaymentIdB><SrcBank>bb</SrcBank><SrcAccount>cc</SrcAccount><PayerId>dd</PayerId><PayerName>Dato</PayerName><TaxPayerId>00022023</TaxPayerId><TaxPayerName></TaxPayerName><ReceiverName>mof</ReceiverName><AdditinalInfo>racxa</AdditinalInfo><Amount>521</Amount><TreasuryCode>hello</TreasuryCode><PaymentTime>hi</PaymentTime><PaymentChannel>ib</PaymentChannel></Payment></PAYMENTS></Object></Signature>

  • XML generation with SAP data using XML schema - Reg

    Hello experts,
      My requirement is , SAP( ztable data )  data has to be transferred to third party software folder.Third party using XML so they requires output from SAP in XML format.
    For that third party software guys told me that they will give their own XML schema to me.I have to generate XML file with SAP data using their XML schema.
    Generating XML file with their Schema should be underlined.
    I studied that call transformation statement helps for this.
    Even then i don't have clear idea about this topic.
    Please brief me about how to use their XML schema to generate XML with my own sap data.
    Thanks in advance experts.
    Kumar

    please  try this  same program    and see  it ....
    *& Report  z_xit_xml_check
      REPORT  z_xit_xml_check.
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:temporders_dtd.xml'.
    * Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
    *   Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    *   wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
                                                        size  = l_xml_table_size ).
    *   Creating a document
        l_document = l_ixml->create_document( ).
    *   Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
    *   Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
    *   Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
    *   Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
    *   Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
    *   upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            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.
    *   Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
    *   create a node iterator
        iterator  = node->create_iterator( ).
    *   get current node
        node = iterator->get_next( ).
    *   loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
    *         element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
    *           attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
    *         text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
    *     advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    reward  points  if it is use fulll ....
    Girish

Maybe you are looking for

  • Error in file-webservice- file (Error: java.lang.NullPointerException)

    Hi everybody, I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread: File - RFC - File without a BPM - Possible from SP 19. I have  used a soap adapter (for webservice) instead of rfc .My inpu

  • Why is the sound fluctuating on my new imac in iTunes?

    I am just bringing the content of this forum over to apple's as it seems there are a few people having issues with 'fluctuating sound levels' on iMac and other apple products.http://forums.macrumors.com/showthread.php?p=19101290#post19101290

  • Which table stores relationship of business roles and its associated roles.

    Hi, I want to know the table that stores the relationship between a Business role and its associated roles. Please note that i am aware of the table GRACBUSROLESNAP that stores the business role relationship corresponding to a request id and this is

  • Where to get JSP?

    I'm trying to install Tomcat and JSP for my own use. Where do I get the JSP stuff from Sun? There are a lot of packages and none is clearly marked as the JSP one. Do I need more than one? I tried J2EESDK-1-4-3-windows.exe but Tomcat couldn't find the

  • Bluetooth Mighty Mouse Problems - NO RIGHT CLICK.

    i tried dozens of times... i can't use the right click. it acts as a primary button even though i set it to secondary... is there another way of setting it so that it is secondary that i didn't do so that it would cause such a phenomenon? I NEED HELP