Maximum size of XML files and number of IDocs for IDoc receiver adapter

Hi Guys,
We have an XML file to IDoc scenario where XI picks up an XML file with multiple Customer records in it, it does a simple mapping and creates one DEBMAS06 IDoc per record in the XML file. All IDocs are sent in a single file in XML-IDOC format to IDoc adapter which then posts the separate DEBMAS IDocs to R/3.
a) What is the maximum size of XML files that XI can handle with mapping involved ?
b) What is the maximum number of IDocs in a single file that the receiver IDoc adapter can handle ?
The first time this interface runs almost 200,000 Customer records will be exported in one XML file.
Thank you.

Hi,
Well it is difficult to find out the  maximum Size of xml messgaes that can be processed by XI and also Maximum number idocs an recevier Idoc adapter can handle.
This totally depends on your production system loads and the limits can be set totally on trail & error basis..
In my heavy loaded production system, i found out that the maximum size of the successfull messages after processing by XI is around 75 MB (seen in transaction SXMB_MONI). Whereas messages with size around 100 MB went into error.
I havent encounter any such limits with respect to Idocs.
I would suggest that you divide your data into smaller chunks and sent it part by part instead of sending it all once since you data size is huge.
You can vary your batch size as per your system load.
Regards,
- Deepak.

Similar Messages

  • Convert XML to text file and sending the same via Mail receiver adapter

    Dear All,
    I have a requirement like....
    I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and
    the converted file needs to be sent to a mail address in text format.
    Any body has idea how to achieve this?
    Thanks in advance for your help.
    Regards
    Hari

    >
    HP CReddy wrote:
    > Dear All,
    >
    > I have a requirement like....
    >
    > I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and
    > the converted file needs to be sent to a mail address in text format.
    >
    > Any body has idea how to achieve this?
    >
    > Thanks in advance for your help.
    >
    > Regards
    > Hari
    use the StructXML2Plain or XML2Plain from the standard MessageTransformBean
    Add the module to you Mail adapter before the mail adapters standard module itself
    Ref: http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm

  • [svn:osmf:] 17548: Remove left-over event handler, which could trigger an unnecessary event if a player loaded plugins through the config XML file and manually  (e.g.

    Revision: 17548
    Revision: 17548
    Author:   [email protected]
    Date:     2010-09-01 14:09:14 -0700 (Wed, 01 Sep 2010)
    Log Message:
    Remove left-over event handler, which could trigger an unnecessary event if a player loaded plugins through the config XML file and manually (e.g. for static plugins).
    Modified Paths:
        osmf/trunk/libs/samples/ChromeLibrary/org/osmf/chrome/configuration/PluginsParser.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Maximum size of a file that  the getResourceAsStream() can read?

    hi guys.before i post this new topic, i have search through the forum,and google. on the web .so reply are appreciated.
    1) getResourceAsStream() method, is there a way to know the maximum size of a file that the getResourceAsStream() can read?
    InputStream          is = getClass().getResourceAsStream("Dream2.gif");
                                  byte[]               byte0          = new byte[10 * 1024];
    bcos the size of my bytearray is hardcoded, if any thing is greater than that size ,my program would crash.so i would like to know if there is a way to do that
    2)if that is not available, are there any methods in j2me using any connection (http or socket),that can know the maximum size of the file that are available??????

    You won't be able to tell how big the resource is using this approach. However, since your resource is in the JAR you will be able to know the size of it before hand.
    Otherwise, use the read(byte[], int, int) method to read the resource in chunks like this:
    int count = 0;
    byte[] bytes = new byte[1024];
    while ((count = read(bytes, count, 1024)) != -1) {
      // do something like write to a ByteArrayOutputStream
    }Although redundant, using this approach you can see that you can keep a count of the number of bytes you've read and thus know the total size of the resource.

  • Suggested size of XML files?

    Hello,
    I am currently building a catalog website where each page
    will display from 1 to 5 products. I am using Spry with XML to
    populate the products on the pages and with that using the
    master/detail method to display more information about each
    product.
    For each catalog page I have created a XML file to go along
    with it, listing the products and their various features. With 200
    product pages, there will be 200 XML files! I believe creating
    these by hand is my best way to go, programming in PHP and using
    databases will be slow going for me because I am not skilled at all
    with those. Using conditionals and the products unique SKU number,
    can I create one monster XML file and load the products on each
    page using conditionals?
    Would a large XML file take too long to parse when checking
    the conditionals? Would it will be too big to load in an appropiate
    time? Once it is loaded will it be kept in the cache? Or maybe 200
    XML files is the way to go when not using PHP...
    Thank you,
    Braxo

    hi Braxo,
    A couple points.
    First, Spry should be able to handle the XML file. We have
    tested files with 1000 records or more. It will take some time to
    download, but once downloaded, it will be cached. Performance-wise,
    it depends on the final size of the XML.
    Second, with 200 XML files, it seems that in the time that
    would take to make them, you can learn enough PHP to write one
    script that would handle the whole thing. I think if you have a
    database, use it. Managing those static files will be a total
    headache.
    You can do data set filtering to do what you want from one
    big file.
    Hope this helps.
    Don

  • How to Parse the XML File and create an IDOC?

    Hello friends,
    I've an xml file which needs to be parsed and create an idoc into SAP to post the New Hire process?  I need to create an ABAP for this
    Could somebody help me do this?
    Thanks

    here is the sample code for loading local xml file and parsing its using the abov ementioned FM
    report y_xml_upload
           no standard page heading.
           data: filename type string ,
                 xmldata type xstring .
    data: result_xml type standard table of smum_xmltb .
    data: return type standard table of bapiret2 .
    constants: line_size type i value 255.
      data: begin of xml_tab occurs 0,
               raw(line_size) type x,
            end   of xml_tab,
            file  type string,
            size  type i.
    * upload the xml file
    filename = 'C:raja123.xml' .
      call function 'GUI_UPLOAD'
        exporting
          filename            = filename
          filetype            = 'BIN'
          has_field_separator = ' '
          header_length       = 0
        importing
          filelength          = size
        tables
          data_tab            = xml_tab
        exceptions
          others              = 1.
    ************uncomment this and comment the call of SCMS_BINARY_TO_XSTRING if you dont have this fm in your system.
    *  if sy-subrc <> 0.
    *    clear: xmldata.
    *    exit.
    *  else.
    *    data: len type i.
    *    len = size.
    *    loop at xml_tab.
    *      if len <= line_size. exit. endif.
    *      concatenate xmldata xml_tab-raw(line_size)
    *             into xmldata in byte mode.
    *      len = len - line_size.
    *    endloop.
    *    if len > 0.
    *      concatenate xmldata xml_tab-raw(len)
    *             into xmldata in byte mode.
    *      len = len - size.
    *    endif.
    *  endif.
    ******* end of comment.
    call function 'SCMS_BINARY_TO_XSTRING'
      exporting
        input_length       = size
    *   FIRST_LINE         = 0
    *   LAST_LINE          = 0
    importing
       buffer             = xmldata
      tables
        binary_tab         = xml_tab
    exceptions
       failed             = 1
       others             = 2
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'SMUM_XML_PARSE'
      exporting
        xml_input       = xmldata
      tables
        xml_table       = result_xml
        return          = return .
    Regards
    Raja
    do not forget to assign points to helpful answers

  • How can I take the part that parses the .XML file and make it a procedure.

    CREATE OR REPLACE PACKAGE BODY XMLSTUD6 AS
    Author: Jimmy Harris
    Created: 5/25/2006
    Purpose: 1.This package has an XML file initialized to a variable called DOC .
              2.It will then take the values from the XML file and insert them into a PL/SQL table.
              3.From the PL/SQL table it will insert values into the STUDENTS table.
              4.After step four above, the STUDLOAD procedure will insert (Sequence,Status, .XML file, USER, SYSDATE, ERROR_Message
                             into the AUDIT_XMLSTUD table regardless if insert status was successfull or not status is indicated by either an Y or
              NO and the original XML filed that was currently processed, the date and user who executed the procedure.
              If the status was NO then it will insert the Oracle SQLERRM massage, into the REASON_FOR_ERROR column.
                             If status is Y then REASOK_FOR_ERROR IS NULL.
                             5,Make sure you embed the xml file with an inner and outer ' ' ie: ' the whole .xml file string ' as the input
                             parameter into the STUDLOAD procedure.
    This package excepts the whole .XML file as a CLOB as an input parameter, so that the end-user will not have
                                  modify the code.      
    Modification History:     1.6/09/2006 JImmy Harris Modified code, added the Function "WORD_CONVERTER1" to accept the requested text data and
    return a coded value back to our Welligent system.     
                                  2. Was advised that a front end type of functionality was not neccesary for this issue so I removed the INSERT_XML_FILE,
                                  UPDATE_XML_FILE and the INSERT_XML_file.
    FUNCTION WORD_CONVERTER1 (v_domain IN VARCHAR2 := null,
    v_incoming IN VARCHAR2 := null) RETURN VARCHAR2 IS
    v_well VARCHAR2(32);
    v_editdd BOOLEAN;
    v_code VARCHAR2(32);
    CURSOR C_conv_wrd IS
    SELECT WELL
    INTO v_code
    FROM CONVERSION_TABLE
    WHERE DOMAIN = UPPER(TRIM(v_domain))
    AND INCOMING = UPPER(TRIM(v_incoming));
    BEGIN
    OPEN c_conv_wrd;
    LOOP
    FETCH c_conv_wrd INTO v_code;
    EXIT WHEN c_conv_wrd%NOTFOUND;
    END LOOP;
    CLOSE c_conv_wrd;
    RETURN v_code;
    END WORD_CONVERTER1;
    PROCEDURE STUDLOAD (DOC CLOB) IS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    v_mm NUMBER;
    v_dd NUMBER;
    v_yyyy NUMBER;
    v_DATE DATE;
    v_race VARCHAR2(1);
    v_eth VARCHAR2(1);
    v_prim_lang VARCHAR2(1);
    v_house_lang VARCHAR2(1);
    v_gender VARCHAR2(1);
    TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
    s_tab stuxml_type := stuxml_type();
    v_success VARCHAR2(200);
    v_failure VARCHAR2(200);
    l_error_code varchar2(200);
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, FALSE);
    -- Parse the document and create a new DOM document.
    SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
    v_doc := SYS.XMLPARSER.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the STUD nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent');
    -- Loop through the list and create a new record in a table collection for each STUD record.
    FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, stud);
    s_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/LastName');
         s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/FirstName');
         s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/MiddleName');
         v_dd := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Day');
         v_mm := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Month');
    v_yyyy := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Year');
         v_DATE := TO_DATE(v_mm||' '||v_dd||' '||v_yyyy,'MMDDYYYY');
         s_tab(s_tab.last).STUDENT_DOB := v_date;
         s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/Street');
         s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ApartmentNumber');
         s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/County');
         s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/State');
         s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ZipCode');
    v_race := WORD_CONVERTER1('RACE',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Race')));
         v_eth := WORD_CONVERTER1('EHTNICITY',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Ethnicity')));
         v_prim_lang:= WORD_CONVERTER1('PRIMARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/PrimaryLanguage')));
         v_house_lang:= WORD_CONVERTER1('SECONDARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/HouseholdLanguage')));
         v_gender := WORD_CONVERTER1('GENDER',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Gender')));
    s_tab(s_tab.last).STUDENT_RACE := v_race;
         s_tab(s_tab.last).STUDENT_ETHNIC := v_eth;
         s_tab(s_tab.last).STUDENT_PRI_LANG :=v_prim_lang;
         s_tab(s_tab.last).STUDENT_SEC_LANG := v_house_lang;
         s_tab(s_tab.last).STUDENT_GENDER :=v_gender;
    END LOOP;
    FOR stud IN s_tab.first..s_tab.last LOOP
    INSERT INTO STUDENTS (SHISID, SSN, DOE_SCHOOL_NUMBER,PATIENT_TYPE, TEACHER, HOMEROOM,STUDENT_LAST_NAME, STUDENT_FIRST_NAME, STUDENT_MI,STUDENT_DOB,
    STUDENT_BIRTH_CERT, STUDENT_COMM,STUDENT_MUSA, STUDENT_FAMSIZE, STUDENT_FAMINCOME,STUDENT_UNINSURED, STUDENT_LUNCH, STUDENT_ZIP,STUDENT_STATE,
    STUDENT_COUNTY, STUDENT_STREET,STUDENT_APART_NO, STUDENT_PHONE, STUDENT_H2O_TYPE,STUDENT_WASTE_TRT, STUDENT_HOME_SET, STUDENT_NONHOME_SET,
    STUDENT_GENDER, STUDENT_RACE, STUDENT_ETHNIC,STUDENT_PRI_LANG, STUDENT_SEC_LANG, STUDENT_ATRISK,EMER_COND_MEMO, ASSIST_DEVICE_TYPE,
    SCHOOL_ENTER_AGE,STUDENT_CURR_GRADE, S504_ELIG_DATE, S504_DEV_DATE,S504_REV_DATE, STUDENT_504, STUDENT_IEP,IEP_EXP_DATE, GRAD_CLASS, TYPE_DIPLOMA,
    GRADE_RETAIN, LIT_PASS_TEST_MATH, LIT_PASS_DATE_MATH,LIT_PASS_TEST_WRITE, LIT_PASS_DATE_WRITE, LIT_PASS_TEST_READ,LIT_PASS_DATE_READ, SPEC_ED_ELIG,
    SPEC_ED_CODE,TRANSPORT_CODE, TRANSPORT_NO, PRIME_HANDICAP,PRIME_HANDICAP_PERCENT, PRIME_HANDI_MANAGER, FIRST_ADD_HANDI,FIRST_ADD_HANDICAP_PERCENT,
    FIRST_ADD_HANDI_504, FIRST_ADD_HANDI_504_DATE, SECOND_ADD_HANDI, SECOND_ADD_HANDICAP_PERCENT, MED_EXTERNAL_NAME, INS_TYPE, INS_PRI, INS_NAME,
    INS_MEDICAID_NO, ELIGDATE, INS_PRIV_INSURANCE, INS_APPR_BILL, INS_APPR_DATE, INS_PARENT_APPR,INS_POL_NAME, INS_POL_NO, INS_CARRIER_NO,
    INS_CARRIER_NAME, INS_CARRIER_RELATE, INS_AFFECT_DATE, INS_COPAY_OV, INS_COPAY_RX, INS_COPAY_AMBUL,INS_COPAY_EMER, INS_COPAY_OUTPAT,STUDENT_INACTIVE,
    PHYS_ID, ENCOUNTERNUM,USERID,MODDATE, STUDENT_ID, S504_DISABILITY,CHAPTER1, WELLNESS_ENROLL, SCHOOL_OF_RESIDENCE,INITIAL_IEP_DATE, CALENDAR_TRACK,
    USA_BORN,ALT_ID, FUTURE_SCHOOL, IEP_LAST_MEETING,IEP_LAST_SETTING, IEP_LAST_REFER_EVAL, THIRD_ADD_HANDI,LEP, GIFTED, IEP_EXIT_REASON,
    CASE_MANAGER_ID, INTAKE_NOTES, CALLER_PHONE,CALL_DATE, CALLER_RELATIONSHIP, CALLER_NAME,BUSINESS_PHONE, FAX, EMAIL,HIGHEST_EDUCATION, INTAKE_DATE,
    SERVICE_COORDINATOR, DISCHARGE_DATE, DISCHARGE_REASON, DISCHARGE_NOTES,INTAKE_BY, INTAKE_STATUS, IEP_LAST_SERVED_DATE,IEP_APC_DATE, IEP_EXIT_DATE,
    ADDRESS2, LEGAL_STATUS, RELIGION, EMPLOYMENT_STATUS, TARG_POP_GROUP1, TARG_POP_GROUP2, MARITAL_STATUS,THIRD_ADD_HANDI_PERCENT, LAST_INTERFACE_DATE,
    SERVICE_PLAN_TYPE,CURRENT_JURISDICTION, FIPS, BIRTH_PLACE_JURISDICTION,BIRTH_PLACE_HOSPITAL, BIRTH_PLACE_STATE, BIRTH_PLACE_COUNTRY,
    OTHER_CLIENT_NAME, SIBLINGS_WITH_SERVICES, PERM_SHARE_INFORMATION,PERM_VERIFY_INSURANCE, REFERRING_AGENCY, REFERRING_INDIVIDUAL,AUTOMATIC_ELIGIBILITY,
    INTAKE_IEP_ID, FUTURE_SCHOOL2,FUTURE_SCHOOL3, TRANSLATOR_NEEDED, TOTAL_CHILDREN_IN_HOME,REFERRED_BY, FAMILY_ID, SCREENING_CONSENT_FLAG,PICTURE_FILE,
    DUAL_ENROLLED, DOE_SCHOOL_NUMBER2)
    VALUES (123456789025, null,null ,null,null,null ,s_tab(stud).STUDENT_LAST_NAME,s_tab(stud).STUDENT_FIRST_NAME,s_tab(stud).STUDENT_MI,
    s_tab(stud).STUDENT_DOB,null ,null,null ,null,null,null,null,s_tab(stud).STUDENT_ZIP,s_tab(stud).STUDENT_STATE ,s_tab(stud).STUDENT_COUNTY,
    s_tab(stud).STUDENT_STREET,s_tab(stud).STUDENT_APART_NO,null,null,null ,null , null,
    s_tab(stud).STUDENT_GENDER ,s_tab(stud).STUDENT_RACE , s_tab(stud).STUDENT_ETHNIC,
    s_tab(stud).STUDENT_PRI_LANG ,s_tab(stud).STUDENT_SEC_LANG, null, null ,null , null,
    null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
    null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
    null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
    null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
    null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
    null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null, null,null );
    END LOOP;
    INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
    VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,DOC,'Y',NULL,SYSDATE);
    HTP.HTMLOPEN;
    v_success:= 'The values from the .XML file have been successfully inserted into the STUDENTS table in the Oracle Database.';
    htp.bold(v_success);
    HTP.HTMLCLOSE;
    COMMIT;
    -- Free any resources associated with the document now it that it is no longer needed.
    xmldom.freeDocument(v_doc);
    EXCEPTION
    WHEN OTHERS THEN
    l_error_code := SQLERRM;
    INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
    VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,nvl(DOC,TO_CLOB('No .XML file entered, user pressed button without entering correct information.')),'NO',l_error_code,SYSDATE);
    HTP.HTMLOPEN;
    v_failure:= 'The attempt made to insert files to the Student table has failed because,'||l_error_code;
    htp.bold(v_failure);
    HTP.HTMLCLOSE;
    COMMIT;
    END STUDLOAD;
    PROCEDURE UPDSTUDLOAD (DOC CLOB) IS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    v_mm NUMBER;
    v_dd NUMBER;
    v_yyyy NUMBER;
    v_DATE DATE;
    v_race VARCHAR2(1);
    v_eth VARCHAR2(1);
    v_prim_lang VARCHAR2(1);
    v_house_lang VARCHAR2(1);
    v_gender VARCHAR2(1);
    TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
    s_tab stuxml_type := stuxml_type();
    v_success VARCHAR2(200);
    v_failure VARCHAR2(200);
    l_error_code varchar2(200);
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, FALSE);
    -- Parse the document and create a new DOM document.
    SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
    v_doc := SYS.XMLPARSER.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the STUD nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent');
    -- Loop through the list and create a new record in a table collection for each STUD record.
    FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, stud);
    s_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/LastName');
         s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/FirstName');
         s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/MiddleName');
         v_dd := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Day');
         v_mm := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Month');
    v_yyyy := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Year');
         v_DATE := TO_DATE(v_mm||' '||v_dd||' '||v_yyyy,'MMDDYYYY');
         s_tab(s_tab.last).STUDENT_DOB := v_date;
         s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/Street');
         s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ApartmentNumber');
         s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/County');
         s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/State');
         s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ZipCode');
    v_race := WORD_CONVERTER1('RACE',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Race')));
         v_eth := WORD_CONVERTER1('EHTNICITY',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Ethnicity')));
         v_prim_lang:= WORD_CONVERTER1('PRIMARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/PrimaryLanguage')));
         v_house_lang:= WORD_CONVERTER1('SECONDARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/HouseholdLanguage')));
         v_gender := WORD_CONVERTER1('GENDER',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Gender')));
    s_tab(s_tab.last).STUDENT_RACE := v_race;
         s_tab(s_tab.last).STUDENT_ETHNIC := v_eth;
         s_tab(s_tab.last).STUDENT_PRI_LANG :=v_prim_lang;
         s_tab(s_tab.last).STUDENT_SEC_LANG := v_house_lang;
         s_tab(s_tab.last).STUDENT_GENDER :=v_gender;
    END LOOP;
    FOR stud IN s_tab.first..s_tab.last LOOP
         UPDATE STUDENTS
         SET
         STUDENT_LAST_NAME = s_tab(stud).STUDENT_LAST_NAME,
         STUDENT_FIRST_NAME = s_tab(stud).STUDENT_FIRST_NAME,
         STUDENT_MI = s_tab(stud).STUDENT_MI,
         STUDENT_DOB = s_tab(stud).STUDENT_DOB,
         STUDENT_ZIP = s_tab(stud).STUDENT_ZIP,
         STUDENT_STATE = s_tab(stud).STUDENT_STATE,
         STUDENT_COUNTY = s_tab(stud).STUDENT_COUNTY,
         STUDENT_STREET = s_tab(stud).STUDENT_STREET,
         STUDENT_APART_NO = s_tab(stud).STUDENT_APART_NO
         WHERE SHISID = 123456789025;
    END LOOP;
    INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
    VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,DOC,'Y',NULL,SYSDATE);
    HTP.HTMLOPEN;
    v_success:= 'The updated .XML file has been successfully saved to the STUDENTS table in the Oracle Database.';
    htp.bold(v_success);
    HTP.HTMLCLOSE;
    COMMIT;
    -- Free any resources associated with the document now it that it is no longer needed.
    xmldom.freeDocument(v_doc);
    EXCEPTION
    WHEN OTHERS THEN
    l_error_code := SQLERRM;
    INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
    VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,nvl(DOC,TO_CLOB('No .XML file entered, user pressed button without entering correct information.')),'NO',l_error_code,SYSDATE);
    HTP.HTMLOPEN;
    v_failure:= 'The attempt made to insert files to the Student table has failed because,'||l_error_code;
    htp.bold(v_failure);
    HTP.HTMLCLOSE;
    COMMIT;
    END UPDSTUDLOAD;
    PROCEDURE DELSTUDLOAD (DOC CLOB) IS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    v_mm NUMBER;
    v_dd NUMBER;
    v_yyyy NUMBER;
    v_DATE DATE;
    TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
    s_tab stuxml_type := stuxml_type();
    v_success VARCHAR2(200);
    v_failure VARCHAR2(200);
    l_error_code varchar2(200);
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, FALSE);
    -- Parse the document and create a new DOM document.
    SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
    v_doc := SYS.XMLPARSER.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the STUD nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent');
    -- Loop through the list and create a new record in a table collection for each STUD record.
    FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, stud);
    s_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/LastName');
         s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/FirstName');
         s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/MiddleName');
         v_dd := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Day');
         v_mm := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Month');
    v_yyyy := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Year');
         v_DATE := TO_DATE(v_mm||' '||v_dd||' '||v_yyyy,'MMDDYYYY');
         s_tab(s_tab.last).STUDENT_DOB := v_date;
         s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/Street');
         s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ApartmentNumber');
         s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/County');
         s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/State');
         s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ZipCode');
    END LOOP;
    FOR stud IN s_tab.first..s_tab.last LOOP
         DELETE FROM STUDENTS
         WHERE SHISID = 123456789025;
    END LOOP;
    INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
    VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,DOC,'Y',NULL,SYSDATE);
    HTP.HTMLOPEN;
    v_success:= 'The .XML file has been successfully deleted from the STUDENTS table in the Oracle Database.';
    htp.bold(v_success);
    HTP.HTMLCLOSE;
    COMMIT;
    -- Free any resources associated with the document now it that it is no longer needed.
    xmldom.freeDocument(v_doc);
    EXCEPTION
    WHEN OTHERS THEN
    l_error_code := SQLERRM;
    INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
    VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,nvl(DOC,TO_CLOB('No .XML file entered, user pressed button without entering correct information.')),'NO',l_error_code,SYSDATE);
    HTP.HTMLOPEN;
    v_failure:= 'The attempt made to insert files to the Student table has failed because,'||l_error_code;
    htp.bold(v_failure);
    HTP.HTMLCLOSE;
    COMMIT;
    END DELSTUDLOAD;
    END XMLSTUD6;

    Try opening the problem files using a text editor or file viewer to see what the first few bytes contain. All valid FM binary files for FM 11 will contain <MakerFile 11.0> in the first bytes of the file.
    When updating books, it's sometimes better to just to create a new book file and add the files to that.
    When renaming files in a book, changes at the system level will break any links/cross-references between files, so it's always best to use the Rename option in the Book file to change FM file names. This will maintain the correct linkages.

  • Reading A xml file and sending that XML Data as input  to a Service

    Hi All,
    I have a requirement to read(I am using File adapter to read) a xml file and map the data in that xml to a service(schema) input variable.
    Example of  xml file that I have to read and the content of that xml file like below:
      <StudentList>
        <student>
           <Name> ravi</Name>
           <branch>EEE</branch>
          <fathername> raghu</fathername>
        </student>
      <student>
           <Name> raju</Name>
           <branch>ECE</branch>
          <fathername> ravi</fathername>
        </student>
    <StudentList>
    I have to pass the data(ravi,EEE,raghu etc) to a service input varible. That invoked Service input variable(schema) contains the schema similar to above schema.
    My flow is like below:
      ReadFile file adapter -------------------> BPEL process -----> Target Service.I am using transform activity in BPEL process to map the data from xml file to Service.
    I am using above xml file as sample in Native Data format(to create XSD schema file).
    After I built the process,I checked file adapter polls the data and receive the file(I am getting View xml document in EM console flow).
    But transform activity does not have anything and it is not mapping the data.I am getting blank data in the transform activity with only element names like below
    ---------------------------------------------------------------------------EM console Audit trail (I am giving this because u can clearly understand what is happening-----------------------------------------------------
       -ReceiveFile
            -some datedetails      received file
              View XML document  (This xml contains data and structure like above  xml )
        - transformData:
            <payload>
              <InvokeService_inputvariable>
                  <part name="body">
                     <StudentList>
                         <student>
                           <name/>
                            <branch/>
                            <fathername/>
                         </student>
                   </StudentList>
              </part>
             </InvokeService_inputvariable>
    'Why I am getting like this".Is there any problem with native data format configuration.?
    Please help me out regarding this issue as I am running out my time.

    Hi syam,
    Thank you very much for your replies so far so that I have some progrees in my task.
    As you told I could have put default directory in composite.xml,but what happenes is the everyday new final subdirectory gets created  in the 'soafolder' folder.What I mean is in  the c:/soafolder/1234_xmlfiles folder, the '1234_xmlfiles' is not manually created one.It is created automatically by executing some jar.
    Basically we can't know the sub folder name until it is created by jar with its own logic. whereas main folder is same(soafolder) ever.
    I will give you example with our folder name so that it would be more convenient for us to understand.
    1) yesterday's  the folder structure :  'c:/soafolder/130731_LS' .The  '130731_LS' folder is created automatically by executing some jar file(it has its own logic to control and create the subdirectories which is not in our control).
    2) Today's folder structure :  'c:/soafolder/130804_LS. The folder is created automatically(everytime the number part(130731,130804).I think that number is indicating 2013 july 31 st like that.I have to enquire about this)is changing) at a particular time and xml files will be loaded in the folder.
    Our challenge : It is not that we can put the default or further path in composite.xml and poll the file adapter.Not everytime we have to change the path in composite.xml.The process should know the folder path (I don't know whether it is possible or not.) and  everyday and file adapter poll the files in that created subfolders.
    I hope you can understand my requirement .Please help me out in this regard.

  • Parse XML file and extract data

    I'd like to parse an XML file and get some data extracted as columns.
    Input file country.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <MAS Action="Insert">
    <Country ObjectId="100000000000000009" VersionId="8"><Id>1</Id><NlTexts><Name Language="de">Land1</Name><Name Language="en">Country1</Name></NlTexts></Country>
    <Country ObjectId="100000000000000033" VersionId="2"><Id>2</Id><NlTexts><Name Language="de">Land2</Name><Name Language="en">Country1</Name></NlTexts></Country>
    </MAS>
    I'd like to parse the xmlfile in order to get the following output
    Required result:
    col1        col2           col3
    1            Land1        Country1
    2            Land2        Country2
    or alternatively
    col1  col2      
    1            Land1      
    1            Country1
    2            Land2      
    2            Country2
    I tried extract-function
    select extract((XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'),
               NLS_CHARSET_ID('AL32UTF8'))) , '/*/*/Id') as "xdata"
    from dual;
    xdata
    <Id>1</Id><Id>2</Id>
    and XMLTABLE (but how can I add the countries now)
    SELECT *
        FROM XMLTABLE('/*/*/Id'
               PASSING XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'),
               NLS_CHARSET_ID('AL32UTF8'))
    COLUMN_VALUE
    <Id>1</Id>
    <Id>2</Id>
    DB version 11.2.0.3 on Windows 64bit
    Thanks,
    Tim

    Here are a few examples.
    For your required output :
    SELECT *
    FROM XMLTable(
           '/MAS/Country'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1 number       path 'Id'
                 , col2 varchar2(30) path 'NlTexts/Name[1]'
                 , col3 varchar2(30) path 'NlTexts/Name[2]'
    or, if the Language attribute is significant :
    SELECT *
    FROM XMLTable(
           '/MAS/Country'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1 number       path 'Id'
                 , col2 varchar2(30) path 'NlTexts/Name[@Language="de"]'
                 , col3 varchar2(30) path 'NlTexts/Name[@Language="en"]'
    For your alternate output :
    SELECT x1.col1
         , x2.col2
         --, x2.col3
    FROM XMLTable(
           '/MAS/Country'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1  number  path 'Id'
                 , names xmltype path 'NlTexts/Name'
         ) x1
       , XMLTable(
           '/Name'
           passing x1.names
           columns col2 varchar2(30) path '.'
                 --, col3 for ordinality
         ) x2
    (uncomment col3 to see what it does)
    or, in a shorter way :
    SELECT *
    FROM XMLTable(
           'for $i in /MAS/Country
              , $j in $i/NlTexts/Name
            return element r { $i/Id, $j }'
           passing XMLType(bfilename('TEST_DIR', 'country.xml'), nls_charset_id('AL32UTF8'))
           columns col1 number       path 'Id'
                 , col2 varchar2(30) path 'Name'

  • Hi, extract data from xml file and insert into another exiting xml file

    i am searching code to extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    1st xml file which has two lines(text1.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xs:PrintDataRequest xmlns:xs="http://com.unisys.com/Anid"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    <xs:Person>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    These two lines has to be inserted in the existing another xml(text 2.xml) file(at line 3 and 4)
    Regards,
    bubbly

    Jadz_Core wrote:
    RandomAccessFile? If you know where you want to insert it.Are you sure about this? If using this, the receiving file would have to have bytes inserted that exactly match the number of bytes replaced. I'm thinking that you'll likely have to stream through the second XML with a SAX parser and copy information (or insert new information) as you stream with an XML writer of some sort.

  • Maximum size of upload file using Cross Domain Library

    Hi All 
    I need to know what is the maximum size of file that I can upload using Cross Domain Library from my Provider hosted app. I know that in msdn it is written that usign REST call we can upload upto 2GB but I have doubts if it is true with Cross domain library
    REST Calls. Please suggest.
     spExecutor.executeAsync(
                                   url: fileCollectionEndpoint,
                                   method: "POST",
                                   contentType: "application/json;odata=verbose",
                                   body: filedata,
                                   binaryStringRequestBody: true,
                                   headers: { "X-RequestDigest": $("#__REQUESTDIGEST").val(), "accept": "application/json;odata=verbose" ........
    And Can I pass ArrayBuffer directly or I need to pass only binary string ?
    Thanks in Advance 

    Hi,
    According to your post, my understanding is that you want to know the Maximum size of upload file using Cross Domain Library.
    Per my knowledge, you can upload files up to 2 GB with the REST API. 
    You can refer to:
    How to: Upload a file by using the REST API and jQuery
    In addition, you can pass ArrayBuffer directly. Please refer to:
    FileCollection methods
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Parsing large xml file and display using swing

    Hi all,
    I want to read a large xml file and display graphically in swing as a tree structure.
    I implemented it and works fine for files of 5MB size after increasing the jvm heap size (-Xmx). If the file size is larger than 5MB it throws out of memory error. I'm creating a custom datastructure from the xml and I'm using sax parsing.
    After displaying the datastructure, the user could do some operation on this, like search etc.
    Can any of you suggest a method, to support larger files ? What I'm looking for is create the datastructure in file system, rather than in memory.
    Any other tips for memory management would be greatly appreciated
    Thanks in Advance.
    Nisha

    Use a memory-mapped file?
    http://javaalmanac.com/egs/java.nio/CreateMemMap.html

  • REST API: Create Deployment throwing error BadRequest (The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.)

    Hi All,
    We are trying to access the Create Deployment method stated below
    http://msdn.microsoft.com/en-us/library/windowsazure/ee460813
    We have uploaded the Package in the blob and browsing the configuration file. We have checked trying to upload manually the package and config file in Azure portal and its working
    fine.
    Below is the code we have written for creating deployment where "AzureEcoystemCloudService" is our cloud service name where we want to deploy our package. I have also highlighted the XML creation
    part.
    byte[] bytes =
    new byte[fupldConfig.PostedFile.ContentLength + 1];
                fupldConfig.PostedFile.InputStream.Read(bytes, 0, bytes.Length);
    string a = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
    string base64ConfigurationFile = a.ToBase64();
    X509Certificate2 certificate =
    CertificateUtility.GetStoreCertificate(ConfigurationManager.AppSettings["thumbprint"].ToString());
    HostedService.CreateNewDeployment(certificate,
    ConfigurationManager.AppSettings["SubscriptionId"].ToString(),
    "2012-03-01", "AzureEcoystemCloudService", Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot.staging,
    "AzureEcoystemDeployment",
    "http://shubhendustorage.blob.core.windows.net/shubhendustorage/Infosys.AzureEcoystem.Web.cspkg",
    "AzureEcoystemDeployment", base64ConfigurationFile,
    true, false);   
    <summary>
    /// </summary>
    /// <param name="certificate"></param>
    /// <param name="subscriptionId"></param>
    /// <param name="version"></param>
    /// <param name="serviceName"></param>
    /// <param name="deploymentSlot"></param>
    /// <param name="name"></param>
    /// <param name="packageUrl"></param>
    /// <param name="label"></param>
    /// <param name="base64Configuration"></param>
    /// <param name="startDeployment"></param>
    /// <param name="treatWarningsAsError"></param>
    public static
    void CreateNewDeployment(X509Certificate2 certificate,
    string subscriptionId,
    string version, string serviceName, Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot deploymentSlot,
    string name, string packageUrl,
    string label, string base64Configuration,
    bool startDeployment, bool treatWarningsAsError)
    Uri uri = new
    Uri(String.Format(Constants.CreateDeploymentUrlTemplate, subscriptionId, serviceName, deploymentSlot.ToString()));
    XNamespace wa = Constants.xmlNamespace;
    XDocument requestBody =
    new XDocument();
    String base64ConfigurationFile = base64Configuration;
    String base64Label = label.ToBase64();
    XElement xName = new
    XElement(wa + "Name", name);
    XElement xPackageUrl =
    new XElement(wa +
    "PackageUrl", packageUrl);
    XElement xLabel = new
    XElement(wa + "Label", base64Label);
    XElement xConfiguration =
    new XElement(wa +
    "Configuration", base64ConfigurationFile);
    XElement xStartDeployment =
    new XElement(wa +
    "StartDeployment", startDeployment.ToString().ToLower());
    XElement xTreatWarningsAsError =
    new XElement(wa +
    "TreatWarningsAsError", treatWarningsAsError.ToString().ToLower());
    XElement createDeployment =
    new XElement(wa +
    "CreateDeployment");
                createDeployment.Add(xName);
                createDeployment.Add(xPackageUrl);
                createDeployment.Add(xLabel);
                createDeployment.Add(xConfiguration);
                createDeployment.Add(xStartDeployment);
                createDeployment.Add(xTreatWarningsAsError);
                requestBody.Add(createDeployment);
                requestBody.Declaration =
    new XDeclaration("1.0",
    "UTF-8", "no");
    XDocument responseBody;
    RestApiUtility.InvokeRequest(
                    uri, Infosys.AzureEcosystem.Entities.Enums.RequestMethod.POST.ToString(),
    HttpStatusCode.Accepted, requestBody, certificate, version,
    out responseBody);
    <summary>
    /// A helper function to invoke a Service Management REST API operation.
    /// Throws an ApplicationException on unexpected status code results.
    /// </summary>
    /// <param name="uri">The URI of the operation to invoke using a web request.</param>
    /// <param name="method">The method of the web request, GET, PUT, POST, or DELETE.</param>
    /// <param name="expectedCode">The expected status code.</param>
    /// <param name="requestBody">The XML body to send with the web request. Use null to send no request body.</param>
    /// <param name="responseBody">The XML body returned by the request, if any.</param>
    /// <returns>The requestId returned by the operation.</returns>
    public static
    string InvokeRequest(
    Uri uri,
    string method,
    HttpStatusCode expectedCode,
    XDocument requestBody,
    X509Certificate2 certificate,
    string version,
    out XDocument responseBody)
                responseBody =
    null;
    string requestId = String.Empty;
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
                request.Method = method;
                request.Headers.Add("x-ms-Version", version);
                request.ClientCertificates.Add(certificate);
                request.ContentType =
    "application/xml";
    if (requestBody != null)
    using (Stream requestStream = request.GetRequestStream())
    using (StreamWriter streamWriter =
    new StreamWriter(
                            requestStream, System.Text.UTF8Encoding.UTF8))
                            requestBody.Save(streamWriter,
    SaveOptions.DisableFormatting);
    HttpWebResponse response;
    HttpStatusCode statusCode =
    HttpStatusCode.Unused;
    try
    response = (HttpWebResponse)request.GetResponse();
    catch (WebException ex)
    // GetResponse throws a WebException for 4XX and 5XX status codes
                    response = (HttpWebResponse)ex.Response;
    try
                    statusCode = response.StatusCode;
    if (response.ContentLength > 0)
    using (XmlReader reader =
    XmlReader.Create(response.GetResponseStream()))
                            responseBody =
    XDocument.Load(reader);
    if (response.Headers !=
    null)
                        requestId = response.Headers["x-ms-request-id"];
    finally
                    response.Close();
    if (!statusCode.Equals(expectedCode))
    throw new
    ApplicationException(string.Format(
    "Call to {0} returned an error:{1}Status Code: {2} ({3}):{1}{4}",
                        uri.ToString(),
    Environment.NewLine,
                        (int)statusCode,
                        statusCode,
                        responseBody.ToString(SaveOptions.OmitDuplicateNamespaces)));
    return requestId;
    But every time we are getting the below error from the line
     response = (HttpWebResponse)request.GetResponse();
    <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Code>BadRequest</Code>
      <Message>The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.</Message>
    </Error>
     Any help is appreciated.
    Thanks,
    Shubhendu

    Please find the request XML I have found it in debug mode
    <CreateDeployment xmlns="http://schemas.microsoft.com/windowsazure">
      <Name>742d0a5e-2a5d-4bd0-b4ac-dc9fa0d69610</Name>
      <PackageUrl>http://shubhendustorage.blob.core.windows.net/shubhendustorage/WindowsAzure1.cspkg</PackageUrl>
      <Label>QXp1cmVFY295c3RlbURlcGxveW1lbnQ=</Label>
      <Configuration>77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0NCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KDQogIFRoaXMgZmlsZSB3YXMgZ2VuZXJhdGVkIGJ5IGEgdG9vbCBmcm9tIHRoZSBwcm9qZWN0IGZpbGU6IFNlcnZpY2VDb25maWd1cmF0aW9uLkNsb3VkLmNzY2ZnDQoNCiAgQ2hhbmdlcyB0byB0aGlzIGZpbGUgbWF5IGNhdXNlIGluY29ycmVjdCBiZWhhdmlvciBhbmQgd2lsbCBiZSBsb3N0IGlmIHRoZSBmaWxlIGlzIHJlZ2VuZXJhdGVkLg0KDQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCi0tPg0KPFNlcnZpY2VDb25maWd1cmF0aW9uIHNlcnZpY2VOYW1lPSJXaW5kb3dzQXp1cmUxIiB4bWxucz0iaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS9TZXJ2aWNlSG9zdGluZy8yMDA4LzEwL1NlcnZpY2VDb25maWd1cmF0aW9uIiBvc0ZhbWlseT0iMSIgb3NWZXJzaW9uPSIqIiBzY2hlbWFWZXJzaW9uPSIyMDEyLTA1LjEuNyI+DQogIDxSb2xlIG5hbWU9IldlYlJvbGUxIj4NCiAgICA8SW5zdGFuY2VzIGNvdW50PSIyIiAvPg0KICAgIDxDb25maWd1cmF0aW9uU2V0dGluZ3M+DQogICAgICA8U2V0dGluZyBuYW1lPSJNaWNyb3NvZnQuV2luZG93c0F6dXJlLlBsdWdpbnMuRGlhZ25vc3RpY3MuQ29ubmVjdGlvblN0cmluZyIgdmFsdWU9IkRlZmF1bHRFbmRwb2ludHNQcm90b2NvbD1odHRwcztBY2NvdW50TmFtZT1zaHViaGVuZHVzdG9yYWdlO0FjY291bnRLZXk9WHIzZ3o2aUxFSkdMRHJBd1dTV3VIaUt3UklXbkFrYWo0MkFEcU5saGRKTTJwUnhnSzl4TWZEcTQ1ZHI3aDJXWUYvYUxObENnZ0FiZnhONWVBZ2lTWGc9PSIgLz4NCiAgICA8L0NvbmZpZ3VyYXRpb25TZXR0aW5ncz4NCiAgPC9Sb2xlPg0KPC9TZXJ2aWNlQ29uZmlndXJhdGlvbj4=</Configuration>
      <StartDeployment>true</StartDeployment>
      <TreatWarningsAsError>false</TreatWarningsAsError>
    </CreateDeployment>
    Shubhendu G

  • Reading from XML file and updating the table ????

    Hi
    I have package which reads the hier.XML file and does Update inserts into the 5 tables
    i have table called MAIN_tbl with the column cur_date.
    The package kicks if this cur_date is one day less than the hier.XML file DT.
    Currently i m manually checking this date's to make sure the Main_tbl cur_date is n sync with
    hier.XML file DT.
    for example :- hier.xml file DT is "20091020" then main_table cur_date should be 10/19/2009
    in order to kicks of the pakage.
    what i m looking to do ??
    compare the hier.xml DT with the main_table cur_date,
    if cur_date is -1(Preivous day) of hier.xml DT then run hier_pkg(Package)
    if not then update main_table cur_date to -1(previous day) of the hier.xml DATE
    Then later write the above logic to update the main_table in a procedure, and
    then call the package from the procedure.
    below are the top few lines of the hier.XML file which is relevant to the one which we are trying to do
    <?xml version = '1.0'?>
    <HIER_POSTING num ="111" HIER_TYP="CD" DT="20091020" Global="Y">
    FYI : The hier.XML file is located in UNIX space.
    How do i accomplish this. any idea ????
    Thank you so much in advance. For giving a thought on this problem!!!

    Any thought on this guys ???
    Thanks!!

  • Reading the datas in the Xml file  and store it in the array using java

    Hi every one
    Can any one send me the java coding for traversing through XML file and get the data and store it in the array (SAX parser is prefered)
    its a urgent requirement . please help me
    Regards
    Arun

    i send it to ur mail id ,
    could you please send me a mail to [email protected]

Maybe you are looking for

  • Creating websites in photoshop and export to dreamweaver

    Ok. I NEED HELP!!! I tend to create complex designs in photoshop, and I can never get my images to line up correctly in Dreamweaver. I had sliced each image in photoshop, and saved them as HTML and Images, I open it up in dreamweaver, and none of my

  • [SOLVED] pacman update fails: gcc requires gcc-libs=4.7.0-3

    Hi I ran pacman -Syu this morning and there's an update to pacman to install first, so I say yes but it fails like this: :: Synchronising package databases... core is up to date extra is up to date community is up to date :: The following packages sh

  • How to make attribute as a char

    Hi Experts, we have a Real time  cube , In this cube 0crm_prod as a char and product_id is an attribute of that char. as per my need I need to change that product_id to char by adding this to cube  and load the data of that attribute.How do I load da

  • Windows server 2008 r2 version 6.1 , erp 6.0

    hi Experts, I need your help, I installed ERP 6.0 SR3 in windows server 2008 r3 version 6.1, but I have this error when I enter in the system Error text of the first reported error: "OS release Windows NT 6.1 7600 24x AMD64 Level 6 (Mod 44 Step 2) is

  • Compressor won't export in MPEG-2.

    Hi, I'm using FCP 4.5 HD to edit a film shot with the Panasonic HVX200 and P2 cards. So far everything went pretty well, except I wasn't able to ingest the P2 files - I found a workaround solution by converting the .MXF files into .MOV files). So I n