XSD Validation, checking for required elements

I'm using the FTP Adapter to retrieve a flat file in a format like this -
H|1|1234|5-APR-2007
L|1|33123|2
L|1|12345|1
L|1|6969|5
S|1|Milton Park, Abingdon, OX142NF
I have generated an XSD file using the built in wizard that looks like this -
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://bpelns.corp.rmd.org/complex"
xmlns:tns="http://bpelns.corp.rmd.org/complex"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="order">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy="|">
<xsd:element name="HEADER" minOccurs="1" maxOccurs="1" nillable="false" nxsd:conditionValue="H">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ORDERID" nillable="false" minOccurs="1" maxOccurs="1" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="CUSTOMERID" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="ORDERDATE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="LINEITEM" minOccurs="1" maxOccurs="unbounded" nxsd:conditionValue="L">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ORDERID" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="PRODUCTCODE" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="QUANTITY" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SHIPPING" minOccurs="1" maxOccurs="1" nxsd:conditionValue="S">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ORDERID" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="ADDRESS" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I added the various minOccurs & maxOccurs attributes. I would like to be able to state that the element HEADER is required. However, despite the min & max values it carries straight through to the next point in the BPEL flow. I cannot use the required attribute type, as JDeveloper does not recognise this.
How can I acheive the validation I require ? Is the XSD the right place to be doing it (I thought so, as it is the schema definition) ? If I cannot do this with the XSD how else might I acheive it in a concise way, ie not using a big switch operation to test various elements.

I have just noticed that the XSD is creating the following XML document, which explains the validation failure. After the header it is treating everything else as a line item.
<?xml version="1.0" encoding="UTF-8" ?>
<order xmlns="http://bpelns.corp.rmd.org/complex">
<HEADER>
<ORDERID>1</ORDERID>
<CUSTOMERID>1234</CUSTOMERID>
<ORDERDATE>5-APR-2007</ORDERDATE>
</HEADER>
<LINEITEM>
<ORDERID>1</ORDERID>
<PRODUCTCODE>33123</PRODUCTCODE>
<QUANTITY>2</QUANTITY>
</LINEITEM>
<LINEITEM>
<ORDERID>L</ORDERID>
<PRODUCTCODE>1</PRODUCTCODE>
<QUANTITY>12345|1</QUANTITY>
</LINEITEM>
<LINEITEM>
<ORDERID>L</ORDERID>
<PRODUCTCODE>1</PRODUCTCODE>
<QUANTITY>6969|5</QUANTITY>
</LINEITEM>
<LINEITEM>
<ORDERID>S</ORDERID>
<PRODUCTCODE>1</PRODUCTCODE>
<QUANTITY>65 Milton Park, Abingdon, OX142NF</QUANTITY>
</LINEITEM>
</order>

Similar Messages

  • Check for required fields before locking subforms and submitting

    Hello,
    I have a 5-page form with many questions, to be completed by the original requestor and multiple approvers.  What I'm trying to do is have the original requestor's Submit button on p. 3 lock the input on the first three pages, but first check if all those fields have some content.  I currently have all the fields on pp. 1-3 set to "Required" in the object properties, but my script still locks them when there's is one empty one.  Here's what I have:
    //Lock portions of form
    Page1.access = "readOnly"
    Page2.access = "readOnly"
    Page3.access = "readOnly"
    //Save document, allow user to change name
    app.execMenuItem("SaveAs");
    //Submit via e-mail
    Submit_REAL.event__click.submit.target = "mailto:[email protected]" +
    "?subject=Subject text" +
    "&body=Message";
    Submit_REAL.execEvent("click");
    The automatic check for required fields happens after the pages get locked.  I would like the check to stop the process before it locks the pages.  Is there any way to check all at once that all "Required" fields on those pages have some content before allowing the script to proceed?  I know how to script it to manually check the 50 or so questions on those pages, but I would like to avoid that.  Thanks for any help.

    There are a few problems that I can see from the start. First, your code is going to pick up EVERY node that exists on these pages. Some of those nodes will not have a rawValue, and some will not have an actual name. As an example, you can take your code and create a text field to dump all of the names of the nodes that you get when you pull in all of the nodes this way. Here's an example:
    The result:
    Now, the question is, do you have a consistent naming convention for your fields that might be empty? That could be text fields, radio button lists, etc. For instance, I always prefix the names of objects in order to more easily keep track of what they are in scripts. Since I'm doing that, I can check the name of the field for tf, nf, rbl, cb, or whatever I have included to make sure that I'm checking an actual field before I check for things like rawValue.
    var nodeName = oNodes.item(nNodeCount).name;
    if (nodeName.indexOf("tf")>-1 || nodeName.indexOf("rbl") > -1 || /*check other field types*/) {
      //insert your code to check for empty answers here
    As for your line 7 issue. The syntax problem is that you've put extra parentheses in your if statement. Take out the parentheses that are just before and after the or "||".
    *This is my fourth attempt to reply. Something was going on with Adobe/Jive earlier, I suppose.

  • Validation check for Tcode FB10 and FB60 - FICO.

    I have an issue in validation check for Tcode 'FB60' and  'FB10'.
    there are two exits coded for these transactions through transaction 'GGB0'.
    details for the two exits.
    exit 1.
      when posting a vendor invoice, the network status is checked whether it is completed or not - if status is completed error message is raised.
    exit 2.
      when posting vendor invoice - for G/L Account in 60000 - 69999 series network should not be posted. if posted error message is raised.
    when these two exits are entered via a prerequisites in code 'KGB' a code is generated automatically to call these exits- when transaction 'FB10' 'FB60' is executed.
    Issue:
    for  code 'FB10' is executed with network with status completed and with G/LP account in 60000 - 69999 series -
    error message is raised in sequence i.e. exit 1 is raised and then exit 2 is raised.
    but for code 'FB60' if condition for exit 2 is  not satisfied then exit 1 message is raised.
    but it should be in sequence in raising the error message i.e. exit 1 and then exit.
    Even though for both the transaction the auto generated code is similar and even exits are similar - but it is execution in raising the error message is diffrent.
    - Since it is auto generated code i am able to figure out the issue.
    i would appreciate if any one could help me out in this issue.
    thank you,
    with dregs,
    Karthik.

    Hi,
    I have tried what you have suggested. But still validation is not working
    I have done the following validation based on your inputs.
    Prerequisite
    Company Code = '1265' AND Transaction code = 'FB60' AND
    Account Type = 'K' OR
    Transaction code = 'F-43' AND Account Type = 'K' OR
    Transaction code = 'F-48' AND Account Type = 'K'
    Check
    Business Place > '' AND Business Place = Section Code
    Message
    E - Error Message
    Still it is not working.
    Please suggest.
    Best Regards
    Shashikanth.M

  • Validation check for Cash Payments

    Hi Gurus,
    I need to put validation check for cash payment only - not more than Rs. 20000/- & no check for cash receipt.
    Please guide me what is reqd in - PREQUISITE & CHECK.
    Thanks,
    Vikas

    Hi Vikas,
    Try this, its working at my place.
    Prerequsite:
    BKPF-AWTYP = 'CAJO' AND BSEG-WRBTR > '20000.00' AND (
    BSEG-HKONT = 'XXXXXX' AND BSEG-BSCHL = '50' )
    Check:
    NOT SYST-UNAME IN <Set name@>
    @ being set created with Table-SYST and field name- UNAME
    Here the set was created to allow few user to post more than 20000/-
    Regards,
    Kiran

  • Raw Device Validation Check for Name Failed..

    Hi all,
    I have installed Oracle Clusterware 10.2.0.4 and Oracle database software 10.2.0.4 on Solaris SPARC 10 and i using a NAS storage for the same
    And when i try to create a database using DBCA i got the following error.
    Raw Device Validation Check for Name /u03/oradata/spfile/spfile{SID}.ora failed. The specified file /u01/oradata/spfile/spfile{SID}.ora doesnot exit.Please a existing file.
    Note: i am not using ASM., i am using RAW device for Database
    Any help highly thankful
    -Arun

    Hi
    this is how i have mounted the NAS...
    10.0.0.0:/vol/prodt3_vol16/ora_dbfr_inn1s - /u07/DBFR/INS nfs - yes rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,forcedirectio,vers=3,suid
    how do i ensure that it is not being used....we should not use ASM its an client requinment ...
    Thanks

  • How do I obtain spell check for Photoshop Elements 12

    I use spell check with my Photoshop CS but I don't see a spell check for my Elements 12.   Is there a plug in I can get for a spell check?

    In photoshop cs2 record the spell check action:
    1. Create a new document and type a word you know is misspelled
    2. Go to Window>Actions
    3. At the bottom of the actions palette press the Create New Set button
    4. At the bottom of the actions palette press the Create New Action button
    5. Press Record, go to Edit>Check Spelling, press Done on the spell check dialog and click on the Stop Recording button at the bottom of the actions palette
    6. Save your action set to somewhere like your desktop using the Save Actions from the actions palette fly-out menu.
    In the photoshop elements 12 editor in the Expert mode
    1. Go to window>Actions and load the spell check action from the fly-out menu on the actions panel
    2. Click on the name of the action (not the name of the action set) and press Play to play the action.
    The check spelling action should work in pse 12 just as check spelling does in photoshop cs2

  • Validation Check for business place and section code.

    Hi Gurus
    Please provide me the prequisite check for creating a validation check for business place and section code.
    Regards,
    Vikas Malhotra

    Hii..
    Goto T.Code Ob28 write the following validation.
    Prerequisite
    BKPF-BUKRS = 'XXXX' AND BSEG-KOART = 'K' AND
    BSEG-QSSKZ = 'XX' AND BSEG-BSCHL <> '35' AND
    BSEG-BSCHL <> '25'
    Check
    BSEG-BUPLA = 'XXXX' AND BSEG-SECCO = 'XXXX'
    Message
    Message number ZFI    002
    Regards,
    Aakash

  • AnyConnect hangs when checking for required updates

    Several of our customers require us to use Cisco AnyConnect to connect to their computers.  I cannot connect to any of them because AnyConnect hangs when checking for required updates.  If I start AnyConnect myself, it will eventually (after five minutes) tell me that it cannot connect to a server.  If it is started from a web page, AnyConnect hangs forever.
    In the past, this error has been random.  If I try later, or the next day, it may work.  Or it may not.
    No customer has been able to give us any support on this issue.
    Could you please give me some ideas on how to overcome this problem?
    Thank you very much.

    Disable anti virus software if installed
    Make sure the firewall is turned off in System Preferences > Security & Privacy > Firewall
    Make sure Gatekeeper is enabled
    Open System Preferences > Security & Privacy then select the General tab.
    Make sure either Mac App Store or Mac App Store and identified developers is selected. If that area is grayed out, click the padlock icon to proceed.
    OS X: About Gatekeeper

  • Validation check for an item

    I am not sure about how to use regular expression for a validation check for an Item
    I might need to check for an item for the below format -
    1 , XXX-XXXXX-## ( "3 alphanumeric" , "middle score" , "5 alphanumeric" , "2 digit year" )
    2, XX##-### ("2 alphabets ", "2 digit number", " middle score ",3 digit number

    Lucy,
    Create an item level validation of type regular expression, and use the following for the respective Regular Expression values:
    1) ^[[:alnum:]]{3}-[[:alnum:]]{5}-[[:digit:]]{2}$
    2) ^[[:alpha:]]{2}[[:digit:]]{2}-[[:digit:]]{3}$I'm only very new to regular expressions, so I welcome being corrected if there's a more efficient way of declaring this. But this works.
    Anthony.

  • Xml parsing and checking for certain elements

    Hi,
    I need your help on how to parse an xml and check for certain elements
    in the xm. Can any one help on this regard. If you can pls send me the sample code for this one.
    Thanks and Regards,
    Srini

    http://java.sun.com/xml/tutorial_intro.html

  • Validation check for BP external id type and id number

    Hi,
    I need to validate the external Id type and Id no. ( from table BUT0ID) based on some conditions from the WebUI while adding a new id type and also during deletion of that id.
    I have found out 2 Badi's BUPA_IDENT_UPDATE, BUPA_IDENT_CHECK
    Will these BADI triggered from the WebUI ?
    What would be the other way to implement these checks for the Business Partner?
    Provide some possible solutions.
    Thanks for all your help.
    Regards,
    Shobhit

    Issue resolved by coding at UI level

  • Checking for an element in a string from another string

    Hi Guru's,
    I have 2 comma seperated strings. Say like this.
    a VARCHAR2(100) := '1,2,3,4,5,6,7,8,9,10';
    b VARCHAR2(100) := '2,6,9';
    My requirement is like I want to check the string a, whether it has any of the element in b. I am trying to use the regular expression. But I was not able to do it.
    Kindly help me.
    Regards,
    VJ

    SQL> var cur refcursor
    SQL> declare
       a              varchar2 (100) := '1,2,3,4,5,6,7,8,9,10';
       b              varchar2 (100) := '2,6,9';
    begin
       open :cur for 'select column_value common
            from table (sys.dbms_debug_vc2coll (' || a || ') multiset intersect sys.dbms_debug_vc2coll (' || b || '))';
    end;
    PL/SQL procedure successfully completed.
    SQL> print
    COMMON                                                                                                                           
    2                                                                                                                                
    6                                                                                                                                
    9                                                                                                                                
    3 rows selected.

  • Form Features: Checking for required fields on scrolling or moving to the next page.

    Hi! I am developing a form which will be distributed to people using Adobe Reader without the JavaScript functionality. I have a form with about 20+ pages and each page has 4 required fields. I would like to make it easy for the users to show the errors then and there when they miss a require field, instead of having a generic "required field not filled" message at the end of the document. How do I do this without JavaScript? It would be better if the document jumps to the page where there is an empty "required" field.

    This isn't possible without using JavaScript.

  • Bug report, toplink lacks checking for required attributes

    given the following code, I get an ORA-00911: invalid character error code . Instead you should expect to be getting an error from toplink saying missing argument...
    final String sql = "select....where line.Da_Object_Id =#id ";
    final DataReadQuery dataReadQuery = new DataReadQuery();
    dataReadQuery.setSQLString(sql);
    dataReadQuery.addArgument("id"); // tell it #id is a marker
    dataReadQuery.bindAllParameters();
    List databaseRows = (List) uow.executeQuery(dataReadQuery);
    the code is wrong in the executeQuery needs to have a vector of the arguments for the query..

    For Oracle TopLink customers can report bugs using a support request on metalink.oracle.com.
    For TopLink Essentials customer can directly file bugs in the GlassFish system.
    Doug

  • Spry validation - check for character

    Hello - I want to use a spry text area to warn if the user
    enters a special string, like " -- " or " : ". Do you know if this
    is posiable?
    Thanks!

    Hi Vikas,
    Try this, its working at my place.
    Prerequsite:
    BKPF-AWTYP = 'CAJO' AND BSEG-WRBTR > '20000.00' AND (
    BSEG-HKONT = 'XXXXXX' AND BSEG-BSCHL = '50' )
    Check:
    NOT SYST-UNAME IN <Set name@>
    @ being set created with Table-SYST and field name- UNAME
    Here the set was created to allow few user to post more than 20000/-
    Regards,
    Kiran

Maybe you are looking for

  • Webutil and Arabic

    Dear all, we are using the webutil to read (.DAT) file and in this file there is arabic strings. the webutil is not reading these arabic strings properly it is reading them (????). so i want to ask if the problem from the webutil it self and how it c

  • Adding Payment Terms: 45 days End of Month

    Hi, I am trying to add payment terms to Oracle 11i that are: 45 days then End of Month Can anyone let me know if this is possible? I have been able to add many other terms required, but cannot figure this one out. Thanks

  • What do I need to do to reinstall working copy of Firefox?

    Repeatedly receives the message "A copy of Firefox is already open. Only one copy of Firefox can be open at a time". Firefox stopped working and after trying troubleshooting on my own and with Apple Support, I'm still receiving this message. Firefox

  • Called form obscured by caller

    I have an application that has been converted from 6i to 10g. Most of the forms were developed in much earlier versions of Developer. There are some newer forms that were developed in 6i. They all worked fine together in 6i but in 10g, when an older

  • Screen layout of MIRO

    DEAR ALL, PLEASE TELL ME CONFIG SETTING OF FIELD CONTROL OF MIRO SO THAT I CAN SET SCREEN LAYOUT AS PER USER REQUIREMENT. PLEASE HELP...