XML Validation - How to raise an alert

Hi PI Experts,
I enabled XML validation at "Validtion by Adapetr Engine". Its working fine. But how to integrate XML validation error with Alert Monitoring. Please advise.
Here below the error from Audit log:
2010-03-18 18:33:13     Information     The application tries to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.
2010-03-18 18:33:13     Information     Backward validation is enabled
2010-03-18 18:33:13     Error     Unable to validate the message with message ID b01d356e-1801-4b93-29fb-9ed84b25c6a3
2010-03-18 18:33:13     Error     Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
2010-03-18 18:33:13     Error     MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
2010-03-18 18:33:13     Error     File processing failed with com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
Thanks...
Ravi Kanakam

Hi Ravi,
Are you getting other adapter engine alerts? Or only you are not getting xml validation ones? Also take a look at this:
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
Regards,
---Satish

Similar Messages

  • XML validation: how to check ALL validation problem for XHTML

    I have a lot of documents in HTML format (not very good) that I would like to convert in XML (XHTML). I know it is not so easy and I would use this strategy in a Java program:
    1. Try to check the well-formness and validation with a XML parser (SAX or Xerces)
    2. If not valid: try to individuate ALL the problems the file has (*and not only the first one that halts the processing process*)
    3. Try to transform the HTML to a validable XHTML with some approach: regular expression or other methods
    So the questions I do to you are the following:
    1. What XML parser do you think is the best for this purposes? SAX or Xerces?
    2. How can I understand what are all the validation problems in the file and not only the first one (If I remember well XML parsers halt the parsing process at the first error...)?
    3. How can I transform the HTML to a valid XHTML? I have only to use RegEx or is there other tools to do this for XHTML and HTML problem?
    Thanks
    r
    Edited by: robertobat on Feb 21, 2009 7:09 PM

    >
    1. Neither of them. (Disregarding the fact that SAX and Xerces aren't in the same category and don't cover all the possibilities.I would say SAX default implementation in JRE and SAX parser in Xerces.
    2. I think you have "valid" and "well-formed" confused. And HTML isn't a dialect of XML so the idea of trying to use an XML parser to handle HTML isn't a good idea.I know very well what is the difference between valid and well-formed but I've used "validation" to represent all the conversion problem. But you are right. I'm convincing myself that using a XML parser as the first step is not a good idea.
    3. Well, this is the real question, isn't it? Those other two were just a waste. Don't screw about with regex, for one thing it doesn't work well for hierarchical structures and for another you won't finish in a finite time. Just use an HTML parser which can produce a DOM, like TagSoup for example. Or run them through HTMLTidy. You could also submit them to one of the internet sites which will validate XHTML for you.I've seen Tidy and its capability to convert an HTML to a XHTML and I think it is better then TagSoup because I have to implement this mechanism in a production environment and I want to use only open source projects that have a very long story and that are strong. But I'll see TagSoup as you say.
    I cannot use an Internet service to convert millions of private documents.

  • How to Raise alert in XI when a new file reaches application server

    Hey guys
    i have a requirement in which i need to trigger a piece of  ABAP code whenever a new file reaches a specific directory of Application server.
    i m using File adapter on receiver side and i want to raise a trigger so that the ABAP code is executed automatically whenever some new file reaches the directory
    we are running Win server
    thanx
    ahmad
    Message was edited by:
            Ahmad

    HI,
    It is possible to write a ABAP program to raise alert.and schedule it , In ABAP program we can check the file is existed or not in a specified folder if existes then we can raise Alert.Actually Alerts are maintained by SAP Alert Management only.
    So , but not clear , you said you are using the File receiver adapter .
    -- onoption is -this can bepossible with OS command .
    -- also we can raise alert from Payload itself , why becz i understand whenever you are going to write a file with file adapter then you need to raise an alert right?
    so if message is existed i mean data existed then from raise alert and store the file onoption
    -- Also you can try calling an ABAP program as the auto-reaction method of the MTE in CCMS
    Regards
    Chilla
    See the below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/434fa590-0201-0010-1e9a-c27e6283a0fe
    SMS through SAP ABAP program
    XI Alert from BPM with Follow-Up Activity
    ABAP programming BAPI To XML
    How to send qRFC Alert to Internet Email from AP0 3.1 running 4.6D BASIS
    /people/gregor.wolf3/blog/2005/03/05/create-users-in-an-abap-system-with-bapi-ostermiler-java-utilities

  • How to validate the incoming field value and raise an alert message

    Dear all,
    I have the following structure
    If incoming value for the field externalid is empty then i have to raise a alert message to end user "externalid field is empty for the id : id number" and for all incoming values it should work. I used the following udf on field externalid with two arguments
    if(externalid.equals(""))
    throw new RuntimeException("externalid field empty for the following id : " +id);
    else
    return externalid;
    This is working fine for single record. But for many records(multiple occurences), this logic is not working as if records 2 and 3 fails it is showing exception externalid field is empty for the id : record 2.
    how to achieve the tranformation logic ?
    Regards
    Koti Reddy

    Hi Amit,
    I have tried the above udf, but still stuck-up.
    For the above structure shown in image, i have tested giving the following payload
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:upsertRequest xmlns:ns0="http://sap.com/xi/SFIHCM01">
       <sessionId/>
       <upsert>
          <type/>
          <sfobject>
             <id>1</id>
             <businessKeys>1</businessKeys>
             <type>1</type>
             <status>1</status>
             <externalId>1</externalId>
             <username>1</username>
             <firstName>1</firstName>
             <lastName>1</lastName>
             <mi>1</mi>
             <gender>1</gender>
             <email>1</email>
             <managerExternalId>1</managerExternalId>
             <hrExternalId>1</hrExternalId>
             <department/>
             <jobCode/>
             <division/>
             <location/>
             <timeZone>1</timeZone>
             <hireDate/>
             <empId/>
             <title/>
             <businessPhone/>
             <fax/>
             <addressLine1/>
             <addressLine2/>
             <city/>
             <state/>
             <country/>
             <zipCode/>
             <reviewFreq/>
             <lastReviewDate/>
             <matrixManagerExternalIds/>
             <defaultLocale/>
             <customManagerExternalIds/>
             <secondManagerExternalId/>
             <loginMethod/>
             <proxy/>
          </sfobject>
          <sfobject>
             <id>2</id>
             <businessKeys>2</businessKeys>
             <type>2</type>
             <status>2</status>
             <externalId>2</externalId>
             <username>2</username>
             <firstName>2</firstName>
             <lastName>2</lastName>
             <mi>2</mi>
             <gender>2</gender>
             <email>2</email>
             <managerExternalId>2</managerExternalId>
             <hrExternalId/>
             <department/>
             <jobCode/>
             <division/>
             <location/>
             <timeZone/>
             <hireDate/>
             <empId/>
             <title/>
             <businessPhone/>
             <fax/>
             <addressLine1/>
             <addressLine2/>
             <city/>
             <state/>
             <country/>
             <zipCode/>
             <reviewFreq/>
             <lastReviewDate/>
             <matrixManagerExternalIds/>
             <defaultLocale/>
             <customManagerExternalIds/>
             <secondManagerExternalId/>
             <loginMethod/>
             <proxy/>
          </sfobject>
          <processingParam>
             <name/>
             <value/>
          </processingParam>
       </upsert>
    </ns0:upsertRequest>
    No node is creating for success records, instead it throws exception that "externalid field is missing for the id": id     for empty externalid field value in second record.
    But my requirement is..... when i process 50 records, records with missing value for field externalid should raise an alert message to end user intimating him to check the externalid field for particular id. If the value for externalid field is present in incoming record/payload, then it should be passed to target system.
    How can i implement this logic ?
    Regards
    Koti Reddy

  • How to raise alert in BPM

    Hi Experts,
    Please tell me how to raise alert using control step in BPM. What are the other steps to be used with control step for raising alerts?
    Is CCMS Alerts and Alerts by BPM are same? If they are not the same, how they are different to each other?
    my requirement is, simply i want to raise a mapping, data related errors by Alert.
    in addition to it, i want to raise alerts for any failure in IE.
    Could any one tell , what are the sequence of steps needed in BPM for the above requirement?  Plz take a IDOC to FTP receiver scenario and explain me BPM steps.
    thnx
    RAMS

    Hi rams
    for more details refer these
    refer these link for more details about Alert
    For email alerts
    /people/aravindh.prasanna/blog/2005/12/24/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-2
    /people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3
    /people/sap.user72/blog/2005/01/14/alert-management--improving-monitoring-of-your-landscape
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    You have to do SMTP Configuration for EMail and SMS.....
    http://help.sap.com/saphelp_nw04/helpdata/en/af/73563c1e734f0fe10000000a114084/content.htm
    Alerts
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-stepCheck out these:
    RWB- Alert Configuration LInk isnot working
    Unable to login into Alert configuration
    Get all the details here
    CCMS ALERTS
    /people/sap.user72/blog/2005/11/24/xi-configuring-ccms-monitoring-for-xi-part-i
    /people/sap.user72/blog/2005/12/05/xi-grmg-customizing-for-xi-ccms-heartbeat-monitoring-part-ii
    /people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3
    Alerts
    transaction handling in XI
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    • Auto triggering of alerts
    transaction handling in XI
    • SCOT
    not sending email from alert inbox
    See this link : http://help.sap.com/saphelp_nw70/helpdata/en/da/a3a7408f031414e10000000a1550b0/frameset.htm
    heck this weblogs on creating them and troubleshooting:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9418d690-0201-0010-85bb-e9b2c1af895b
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    Further reference
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/content.htm
    Also suggested go through the blog:Alerts with variables from the messages payload
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    /people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
    /people/matt.kangas/blog/2006/06/27/personalized-alert-delivery
    U may proceed in the following ways:
    1. Reduce the securit settings of ur browser and enable the cookies
    2. Try to SSO enable ur scenario
    Have a look here:
    SAP Note 840849
    The configuration required as per ur patch level
    SAP Note 913858
    Check out these:
    RWB- Alert Configuration LInk isnot working
    Unable to login into Alert configuration
    Thanks !!

  • XML Validation in PI 7.1 - Restart and skip validation possible, but how?

    Hello all,
    I read about schema validation in PI 7.1 and did a few tests on my own, but could not restart and skip validation for invalid payloaded messages. The documents say it is possible.
    Anyone know how? Thanks.
    BTW, I really think putting the schemas in server file system will cause a lot of authorization trouble in enterprises. No one gives access to the server filesystem and I don't think they will also like to open the required subdirectories for share. Asking the basis team to create the folder structures and maintaining schemas would be another pain. Don't you also think that SAP could find a better approach, like automatically uploading the schemas to the filesystem, or validating them from repository directly if possible?
    Kind regards,
    Gökhan

    Hi Gökhan,
    I am facing the same issue.
    I set up outbound xml validation in receiver agreement and tested it with valid and invalid messages.
    The validation works fine.
    But in case of validation error I tried to restart with skipping the validation. But this wasn't possible.
    I am always facing the same valdiation error.
    I already tried all different tools I know (sxi_monitor, message monitoring in rwb and in nwa)
    I am working on PI 7.11 SP6
    Did you find a solution for skipping the validation for a single message out of the monitoring?
    I know that there is the possibility of deactivate the validation in receiver agreement but thid doesn't meet the requirement of skip the validation only for a single message.
    Maybe anyone else faced and solved this issue already.
    Thanks in advance
    Jochen

  • BPM: How to Raise Alert and Restart together ?

    The requirement is like this.My Integration Process receives a message, performs a 1:N split and undergoes further processing using Transformation steps. I want to ensure the following in case any one of the Transfofrmation fails(Because of some coding error in the step):
    1. Raise an Alert
    2. Should be able to restart the Process again from the
       failed step once the Transformation code is fixed.
    3. To raise an Alert for any file adapter level errors, 
       and to restart the processing of the message once the
       file adpter error is resolved
    I have tried the following approaches, but it does not help me achieve all of the above condition.
    I have put the Transformation step in a Block and introduced an exception branch with one control step which raises an Alert.
    Issue: This will raise an alert when the step fails, but it ends the BPM with a Processed status and hence I will not be able to restart the BPM.
    So I put another Control step immediately following the Alert step which raises an exception. However I have not handled this exception. Hence when a step fails, I am able to raise an alert as well as the BPM gets errored out.
    Issue : However, now when I restart the process in swf_xi_swpr, The process restarts with the Control step which was used to throw exception. It does not restart with the Failed mapping step.
    To raise Alerts for Adpter level errors which might occur before the message comes to BPM, I have defined alert category and rule in runtime workbench. However, the Alerts are not triggered when the file adapter fails.
    Please share any ideas on how to achieve all the 3
    requirements together.
    Thanks in advance.

    Hi Joachim!
    I was facing a very similar problem in my BPM modelling.
    Is there really no other chance than to loop (and maybe wait some time) over the critical (e.g. networking down, ...) parts of the BPM to have some active notification via alerts AND a possibility for retry?
    In my opinion this would a very inflexible way of doing error-handling stuff - if so - is it about to change in the upcoming releases?
    Currently I guess I can have:
    a) either ALERTING (by catching exception and raise alert)
    OR
    b) convenient retry mechansisms via "SWF_XI_SWPR" (by not catching exceptions at all and let the relevant block become "errorenous") ...
    Any other suggestions ...?
    Many Thanks,
    Andy

  • How to disable xml validation

    I'm trying to write an SVG parser using Xerces. The problem is that when the SVG file contains the doctype tag <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">my program throws the following exception:
    java.net.UnknownHostException: www.w3.org
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
            at java.net.Socket.connect(Socket.java:507)
            at java.net.Socket.connect(Socket.java:457)
    etc.If I remove <!DOCTYPE> tag, it works fine. According to what I read here, it's necessary to disable XML validation. The Xerces API documentation says that there is a method setValidation() in org.apache.xerces.framework.XMLParser but I can't locate it. Moreover, I don't see any org.apache.xerces.framework package in Xerces supplied with NetBeans 5.0 nor in Xerces 2.8.0 downloaded from apache.org (the XMLParser class available to me is located in org.apache.xerces.parsers).
    My question is simple:
    How to disable XML validation if the setValidation() method is not avaliable
    OR
    how to make the setValidation method available to my program?
    I'm really confused :(
    Here is the code:
    package svgviewer;
    import java.io.File;
    import org.w3c.dom.*;
    import org.w3c.dom.traversal.*;
    import org.apache.xerces.parsers.*;
    public class SVGFileParser {
        public void parse(String filename) throws Exception {
            File file = new File(filename);
            DOMParser parser = new DOMParser();
            parser.parse(file.toURL().toString()); //exception is thrown if doctype tag is present in the svg file

    You're solving the wrong problem here. Turning off validation won't help, because DTDs don't only do validation. Even non-validating parsers have to read the DTD in case it contains entity definitions, for example.
    If you want to stop the parser from looking for the DTD then you write a EntityResolver and apply it to the parser. The EntityResolver should be just like the one in the example in the API docs except it should return new InputSource(new StringReader("")).

  • How to obtain XML error node after  XML validation

    Hello,
    We are developing a web application which uses XML documents.
    We try to obtain the exact error which occurs during XML validation against a schema in order to alert users with a proper message - for example: "Invalid value for element date".
    We validate our XML documents using DBMS_xmlparser. But it only retuns a string message indicating there is an error and document cannot be validated. What can we use to reference to the node object which contains the error?
    We develop our application under Oracle 9.2.0.4.
    Any help will be appreciated.

    Validate with a DOMParser or a SAXParser.
    Set a ErrorHandler on the parser.
    The custom ErrorHandler class should override the startElement & endElement methods of the DefaultHandler class.
    private class Validator extends DefaultHandler     
           public boolean  validationError = false;     
           public SAXParseException saxParseException=null;
           public void error(SAXParseException exception) throws SAXException     
               validationError = true;     
               saxParseException=exception;
           public void fatalError(SAXParseException exception) throws SAXException          
                validationError = true;     
                saxParseException=exception;     
           public void warning(SAXParseException exception) throws SAXException          
           public void startElement(String uri,
                             String localName,
                             String qName,
                             Attributes attributes)
                      throws SAXException{
             System.out.println("Start Element: "+qName);
             public void endElement(String uri,
                           String localName,
                           String qName)
                    throws SAXException{
             System.out.println("End Element: "+qName);

  • HTTP to File with source XML validation

    Hey guys
    i have a HTTP to File scenario wherein i m getting XML over HTTP from an external system.i need to perform a validation check on this payload and if the check fails then i need to send this payload as a mail attachment to a certain address,if check is successful then i need to post this XML to the File server.
    i have done simple scenario without any validation but now i need to upgrade and perform validations,do i need to do that in Message mappin?
    some links will be really helpful
    thanx
    ahmad

    Hi,
    I hope the following two ways are possible.
    1)
    Maintain one message as source and two messages as target.One is actual message and second one message structure should containt the structure with  error details with source details.
    Validate the message in MM with UDF.
    If the source is valid then assign the msg to correct target messages.and ResultList.SUPPRESS to suppress the second message
    Else then assign the error details with source details to second message.and ResultList.SUPPRESS to suppress the first message
    Be sure that the target messages occurrences are 0..unbound or 0..1
    then use the IM in interface determination.
    and maitain two CCs one for actual receiver, second for MAIL receiver with HTTP attatchment.
    2) You can raise an alert from payload. in alert you should maitain the mail, su01 mail id , designated reciept.
    See the below links
    Alerts with variables from the messages payload (XI) - UPDATED - /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    Triggering XI Alerts from a User Defined Function - /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
    /people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u - Triggering Email from folder
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter - XI: HTML e-mails from the receiver mail adapter
    Regards
    Chilla

  • Raising an Alert ,when the Legacy system is down

    Hi,
      I want to raise an Alert or some thing when my Source Legacy system is down.
    My scenario is  File -to - IDOC .  I'm getting all the XML files from the FTP server. so, My source system is FTP srever . Due to network problem or some other problem  my FTP server is  getting down very frequently. Now i want to send this information to respected persons in a automated way.
    Is there any option that know  the Legacy server status , How can we  know that FTP server is down .
    Please suggest me some solution for this type of prblems.
    Regards
    Jain

    Hi
    You can use BPM and check whether the system is up or nt (using the Connection FM STFC_CONNECTION )
    In case of system errors and application errors you can use alerts.
    System error: Runtime errors, mapping errors , application system is down, Adapter engine is down etc....
    application error: If you are checking some validations , if they fails you can throw alerts.
    For application errors you use BPM.
    You can raise alerts if mapping, receiver determination etc.. fails in the integartion engine. You need to configure alert rules for this. You can go to RWB->Alert Configuration->Where did the error occur? choose integration engine and you can see different error categories and error codes which can be configured using alert rules. Refer this michal's weblog for configuring the same..
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    Currently alerts for Adapter framework errors are not supported.
    You can also raise an alerts from BPM for any mapping failures, send step system errors/application errors using fault messages (through exception branch).
    Refer this weblog for configuring an alert in the BPM
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    hope this helps..
    Regards
    Abhishek
    Edited by: Abhishek Agrahari on Jan 30, 2009 7:54 AM

  • XML Validation: ignore non-XML-Header in XML-file(payload): any solutions?

    Dear Experts,
    after I finally managed to configure the XML Validation, we're facing the next problem:
    The payload of the XML files looks like that:
    Abcdef#ABCDEF
    AbcDef#123
    <?xml version="1.0" encoding="UTF-8"?><Document xmlns.....
    as you can see, there's a header which is necessary. The XML Validation works fine if the header is removed manually for testing. If the header is not removed, the validation is not possible ("Content is not allowed in prolog.")
    Is it possible to realise the validation WITH that header? Can I tell SAP PI to ignore the header? Or make any changes to the XSD file?
    Thanks alot!

    Hi Armin,
    Armin Kern wrote:
    > After leaving SAP PI, those 2 lines have to be in that exact place (before the XML part) for further processing. Just deleting it wouldn't be enought. Does the complex design you mentioned complay with this requirement?
    You can put it into the message instead of deleting. And rebuild the "header" in the second step. So you can fullfill the requirement. As mentioned before: The design is complex, this will lead later on to problems. Any change will be difficult, as another developer had to read a long documentation.
    An alternative would be to do all with one interface mapping (without validation):
    1. ABAP / Java mapping deleting the "header" (put it to memory)
    2. Messges Mapping 1:1 each field (will fail in case of wrong format and act as validator)
    3. ABAP / Java mapping restoring the header
    4. Alert will be raised in case of an error (to get the result of the validation)
    Armin Kern wrote:
    > I also thought about splitting the message, deleting those 2 rows in one of the messages, sending this one message to PI again, validate it and if it is correct, send the second message (without mapping) to the final destination. No idea if that is possible at all..
    As well possible. You would need a virtual receiver for the first message, which is sending back a response. For example a servlett, a proxy or a RFC module. In that design you put some logic to the sender, what is actually not bad. But if you do so, why you dont validate there as well (for example with Java)? It would make your design much easier..
    Regards,
    Udo

  • How to Use the alert in popup

    Hi all,
    I have created a popup with some fields. Doing mandatory fields validation in the button of popup. Popup is called from the button by using the show popup behavior.
    In the button action method, if the mandatory fields are missing am raising the alert by using the below code:
    FacesMessage msger = null;
    msger =
    new FacesMessage("Inside Validate");
    msger.setSeverity(FacesMessage.SEVERITY_ERROR);
    FacesContext.getCurrentInstance().addMessage(null, msger);
    It is showing the alert. But it closes the popup. My requirement is should not close the popup when the alert is showing.pls guide me in this.
    Regards
    C.Karukkuvel
    Edited by: C.Karukkuvel on Dec 27, 2010 3:57 AM

    Hi,
    For ur Case u need to open and close the popup programatically.....
    Open Popup : Open Popup Programmatically
    Close Popup : how to close a popup by backing bean?
    Remove the show poupbehaviour
    Define popup type as none and inside the buttonbar facet of the dialog have ok cancel buttons... In the buttons have the closing logic of the popup after ur validations gets passed
    Regards,
    Suganth.G

  • XML validation error while parsing MXI Manifest

    Hi,
    I have created an hybrid extension for Photoshop. I want to upload my extension on Adobe Exchange. during the upload process I get an error,
    "XML validation error while parsing MXI Manifest: Declarations can only occur in the doctype declaration. Line: 19 Position: 791 Last 80 unconsumed characters".
    The error description specifies that description in MXI file is not valid. Below are the contents of my MXI file.
    <macromedia-extension
               name="yyy"
               id="com.yyy"
               version="1.0.0"
               type="object"
               requires-restart="true">
              <author name="abcd" />
              <products>
              <product familyname="Photoshop" maxversion="" primary="true" version="12.0"/>  
              </products>
    <description>
              <![CDATA[
    <p><font size="14" color="black"><b>abcd</b> qwertyuioipafgjhkjljljklkjl
    <br><br>
    Open Extension via: Photoshop top menu > Window > Extensions > abcd.
    <br><br>
    Online support at: <a href="http://www.abcd.com/help.php">http://www.abcd.com/help.php</a></font></p>
    <br>]]>
    </description>
    <ui-access>
              </ui-access>
    <license-agreement>
    </license-agreement>
    <files>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.html" products="" source="zxp-support/Description/abcd.html"/>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.png" products="" source="zxp-support/Description/abcd.png"/>
                <file destination="" file-type="CSXS" products="" source="abcd.zxp"/> 
                <file destination="$automate" file-type="plugin" platform="mac" products="Photoshop" source="mac/abcd.plugin"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop32" source="win32/abcd.8li"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop64" source="win64/abcd.8li"/>
    </files>
    </macromedia-extension>
    Can anyone please point out why am I getting the error?
    Thanks

    Hi CarlSun,
    Thanks for the reply. I have made the changes suggested by you.
    I have few queries:
    1.  Can we use attribute "source" in the description tag?
         I have created a local html page and specified it in source attribute. but the Extension Manager CS6 did not render the local html page and displayed      the following:
         No description avaliable. Click the following link for more details.
         "http://www.abcd.html". Is it possible to display a local html page in Extension Manager CS6?
    2. Can I display an image (png) in CDATA under description tag? If yes, then can you please guide me how can I do so?
    3. As suggested in tech notes MXI file must include UTF-8 encoding as header (<?xml version="1.0" encoding="UTF-8"?>). The MXI I am using does      not have this header. Do I need to include the header?
    Thanks

  • XML Validation

    Since there is no XML validation currently in the Flex/Flash framework, I've decided to start a class that parses a string in an effort to validate the markup, returning whether the XML is valid. I have a need for it in my non-server based application, and have read in numerous places where there is desire for it as well. I have built the class far enough to get the ball rollin', but figure it should be :
    A) available to the community
    B) able to be improved upon by the community
    If you improve upon the code, please post your work here so everyone can benefit.
    Here is the source code :
    XML Validator : v0.2 - last edit by Justin Myers | J2 CREATIVE MEDIA DESIGN
    NOTES:
    Parser is a bit weak and needs work.
    Still need to :
    - Make sure tags are ended properly
    - Make sure there is space between tag name and attribute
    Parser currently handles :
    - Making sure there is no space between tags (with exception to white space)
    - Making sure that attributes open and close properly
    - Making sure there is proper space after an attribute or that it is immediately followed with the tag closing
    package community.classes.parsers
           public class XMLValidator
                  public function XMLValidator()
                  public static function validate(str:String , ignoreWhiteSpace:Boolean = true):Boolean
                          // validation defaults to true (innocent til proven guilty)
                          var valid:Boolean = true;
                          // minimum char length to be valid XML
                          if (str.length < 4)
                                 valid = false;
                          var withinTag:Boolean;
                          var withinAttribute:Boolean;
                          var tags:Array = [];
                          var tag:String;
                          for (var i:uint = 0 ; i < str.length ; i++)
                                 var char:String = str.charAt(i);
                                 // if we are closing a tag
                                 if (char == ">")
                                        // invalid if we never opened a tag, or if we never closed the last attribute
                                        if (!withinTag || withinAttribute)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = false;
                                               tags.push(tag);
                                 // invalid if last character is not a closing tag
                                 else if (i == str.length - 1)
                                        valid = false;
                                        break;
                                        // if we are entering a tag
                                 else if (char == "<")
                                        // invalid if we haven't closed the last tag
                                        if (withinTag)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = true;
                                               tag = "";
                                        // all other characters
                                 else
                                        if ((char != " " || char != "\n") || ((char == " " || char == "\n") && !ignoreWhiteSpace) )
                                               // invalid if there are any characters between tags
                                               if (!withinTag)
                                                      valid = false;
                                                      break;
                                               else
                                                      if (char == "\"")
                                                              // entering attribute
                                                              if (!withinAttribute)
                                                                     // invalid if = does not preclude ", or there is space before =
                                                                     if (str.charAt(i-1) != "=" || str.charAt(i-2) == " ")
                                                                            valid = false;
                                                                            break;
                                                                     else
                                                                            withinAttribute = true;
                                                                     // exiting attribute
                                                      

    961190 wrote:
    so whats the best way to store Rules?
    How to get the data validated with those rules given the source data is in a xml file
    The "integrity rules"?
    Since they have to be ececutable code I'd suggest Java classes...
    How to get the data validated with those rules given the source data is in a xml file
    as @hsc71 wrote, that each XML element select the rules this particular element should pass and run each rule with the current element as parameter.
    This meight be easiser in the Rules have a common interface like
    interface Rule{
      public boolean isPassedBy(XmlElement theCurrentElement, XmlElement theRootElement);
    You could use the ServiceRegistry class from the JVM to fetch the known rules, so that you can add new ones with minimum effort.
    bye
    TPD

Maybe you are looking for

  • Trouble connecting consoles to tv

    This only talked about Wireless. We just bought a Nintendo Wii and a Nintendo Component Cable (Red/Blue/Green and Red/White cables) to connect. We connected the Wii console to the Cable box using the component cable, but when we switched the TV to Co

  • How can I get role configuration key in an abap program?

    Hello there! In a abap program I would like to get which configuration key it is running. The idea is, our abap program will decide which instruction execute depend on the current configuration key, but, we donu2019t know how to get this information.

  • Snapshot enhancements

    I like the addition of snapshots in Camera Raw. I haven't used CS5 yet, so correct me if these are already in there. 1. Snapshots available on right click. List them in the Development Settings submenu. Click on a snapshot's name to change the image'

  • Changing script from CS2 to CS4

    Hi everyone! Having a bit of a problem (not to mention working against a deadline) with an old CS2 script created for a client. ESTK throws up an "Undefined is not an object" error. Below is the code that seems to be the culprit. ESTK stops on the li

  • Are there any more line types ( stroke types )

    I want to be able to create a certain stroke around a textbox like this: Is this possible in Pages '09 ??? Any help appreciated.