Atribute Validation - printStackTrace()

Hi,
Just a small query.
When I validate an attribute of an entity in BC4J using JDev 3.0, I do get the dialog box depending on the validation...but along with it I also get a stackTrace() in the message console.
Is there a way to prevent this stack trace from occuring in the console.I presume the Dialog box is good enough!!
---Sandeep

Hi,
Thanks for the piece of code.
What this means is that the only alternative
I have is to redirect the stackTrace().
Is there no other way out?
What I would like to know is suppose I throw a JboException or any other exception like it, does these classes donot take care of trapping the stackTrace and not showing it on the console.
Regards,
Sandeep
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);This code would replace the usual e.printStackTrace() so that no output is sent to the console.
Hope that helps you out!
Jim<HR></BLOCKQUOTE>
null

Similar Messages

  • Atribute Validation Against a VO Value

    I am a beginner and have no professional experience on OAF. I am an oracle forms developer professional.
    My problem is I have a master detail form with an AM, may AM contains three VO
    AMCRequisitionsHeaderVO -> Header (Based On EO)
    AMCRequisitionsLinesVO -> Lines (Based On EO and will have more then one row in my Page)
    StockQtyVO -> (Query Based)
    Select sum(Primary_Qty) primaryQty
    From mtl_material_transactions
    Where organization_id = :source_organization_id
    And inventory_item_id = :inventory_item_id;
    Now I want to validate an attribute named DemandedQty in my AMCRequisitionsLinesVO (keep in mind, it will have more then one row on my page) against my StockQtyVO.
    This was my whole requirement; can you people please tell me the code to handle my this problem and also suggest me what is the best practice to write validations and what is the alternate solution in OAF for
    Raise Form_Trigger_Failure ?

    Hi,
    Code Snippet:
    RowSetIterator Iter;
    PeriodsVORowImpl row=null;
    PeriodsVOImpl mpvo=getPeriodsVO1();
    fetchedrowcount=mpvo.getRowCount();
    Iter = mpvo.createRowSetIterator("Iter");
    Iter.setRangeStart(0);
    Iter.setRangeSize(fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    row= (PeriodsVORowImpl)Iter.getRowAtRangeIndex(i);
    DemandedQty=row.getAttribute("DemandedQty");
    if("Yes".equal(DemandedQty))
    throw new OAException("Error",OAException.ERROR);
    else
    Regards
    Meher Irk

  • Problem with f:validator and f:attribute

    Here is part of my code:
    <h:dataTable value="#{getQuestionsBean.answers}"
                                       var="question">
                                       <h:column>
                                       <h:panelGrid columns="1">
                                                 <h:inputText id="inputAnswer" value="#{question.answer}"
                                                      rendered="#{question.isInputText}" required="true">
                                                      <f:attribute name="pattern" value="#{question.validatePattern}"/>
                                                      <f:attribute name="errorMessage" value="error text" />
                                                      <f:validator validatorId="custom" />
                                                 </h:inputText>
                                                 <h:message for="inputAnswer" errorClass="errorMessage"/>
    </h:dataTable>
    "custom" is a custom validator witch need a dynamic pattern and error message text. When I send this values like in my code(in pattern atribute), in validator I have only null's. When I put into value just text (like in errorMessage attribute)everything is ok. Any ideas? It's very importent and I can't solve it. Please help.

    Hi,
    I'm stuck in the same problem...did u get any solution for this problem.
    Thanks
    ved

  • Issue in keeping the InfoView session valid using Custom JSP Open Document

    Hi
    We are using OpenDocument URL in custom JSP to show BO Web Intelligence Document.  The documents are opening fine but some of our WebI documents have links to other WebI document,  when the link is clicked it takes to Info View Login Page.
    If I login and logout once from InfoView then the WebI document links work fine.
    Can you please guide me on how to make the session valid for WebI internal links?  Do I need to create a Cookie or use URL Encoding?
    Following is the sample JSP code:
    <%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
    <%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
    <%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
    <%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
    <%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore" %>
    <%@ page import="com.crystaldecisions.sdk.occa.security.ILogonTokenMgr"%>
    <%
    try{
    String systemName = "ServerName";
    String userName = "user";
    String password = "pass";
    String authType = "secEnterprise";
    IEnterpriseSession enterpriseSession=null;
    if (enterpriseSession == null)
    ISessionMgr enterpriseSessionMgr = CrystalEnterprise.getSessionMgr();
    enterpriseSession = enterpriseSessionMgr.logon(userName, password, systemName, authType);
    ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();
    String defaultToken = logonTokenMgr.createWCAToken("",20,10);
    response.sendRedirect("http://boServer:port/OpenDocument/opendoc/openDocument.jsp?iDocID=16894&token="+defaultToken);
    catch(Exception e)
    e.printStackTrace();
    %>

    Thanks Aasavari for responding. My problem is solved. 
    I need not create any cookie or create token using getLogonToken
    Some of the URLs in the webi documents were incorrect and so Info View was taking to the Info View Login page.  
    But I am surprised though why info view not complain about incorret and rather takes to the login page.
    Thanks for your help again.

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • ' is not a valid XML character.

    Hi All,
    May be an XML Expert can help me in understanding this XML Exception.
    I am trying to expose a EJB as webservice using AXIS 1.2 Final. When
    deployed my ear/ejb on WAS 4.0 on HP-UX operation system and trying
    to consume the web service using AXIS 1.2 generated stubs I am getting below error on the server side.
    [9/12/05 8:17:55:260 MST] ed128 WebGroup X Servlet Error: The
    char &#39;0x0&#39; in &#39;java.rmi.RemoteException: CORBA
    BAD_OPERATION 0 No&#59; nested exception is:
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    at com.amla.as.cameron.ejb._EJSRemoteStatelessCS_146c46e9_Tie._invoke&#40;_EJSRemoteStatelessCS_146c46e9_Tie.java:340&#41;
    at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch&#40;ExtendedServerDelegate.java:532&#41;
    at com.ibm.CORBA.iiop.ORB.process&#40;ORB.java:2450&#41;
    at com.ibm.CORBA.iiop.OrbWorker.run&#40;OrbWorker.java:186&#41;
    at com.ibm.ejs.oa.pool.ThreadPool$PooledWorker.run&#40;ThreadPool.java:104&#41;
    at com.ibm.ws.util.CachedThread.run&#40;ThreadPool.java:144&#41;
    minor code: 0 completed: No&#39; is not a valid XML character.:
    java.lang.IllegalArgumentException: The char '0x0' in
    'java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception
    is:
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    at com.amla.as.cameron.ejb._EJSRemoteStatelessCS_146c46e9_Tie._invoke(_EJSRemoteStatelessCS_146c46e9_Tie.java:340)
    at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.java:532)
    at com.ibm.CORBA.iiop.ORB.process(ORB.java:2450)
    at com.ibm.CORBA.iiop.OrbWorker.run(OrbWorker.java:186)
    at com.ibm.ejs.oa.pool.ThreadPool$PooledWorker.run(ThreadPool.java:104)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:144)
    minor code: 0 completed: No' is not a valid XML character.
    at org.apache.axis.components.encoding.AbstractXMLEncoder.encode(AbstractXMLEncoder.java:110)
    at org.apache.axis.utils.XMLUtils.xmlEncodeString(XMLUtils.java:117)
    at org.apache.axis.AxisFault.dumpToString(AxisFault.java:366)
    at org.apache.axis.AxisFault.printStackTrace(AxisFault.java:796)
    at org.apache.commons.logging.impl.SimpleLog.log(SimpleLog.java:338)
    at org.apache.commons.logging.impl.SimpleLog.warn(SimpleLog.java:446)
    at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:523)
    at org.apache.axis.Message.getContentType(Message.java:475)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:713)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
    at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
    at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
    at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
    at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
    at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:317)
    at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:477)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:341)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:144)
    Can anyone please suggest under what cases we get this error.
    When I monitor the request soap message using AXIS handlers, the soap
    message seems to be valid and well-formed. The EJB deployment on WAS
    4.0 is successfully and it can be successfully accessed by a ejb
    client :
    Thanks & Regards,
    bab.

    I am having similar problem. Did you find the solution for this
    thanks

  • Processing Schema Validation error in BPM?

    Hi all,
    We have a file to IDOC scenario where if the schema validation fails on the file adapter sender agreement, we want to pull the filename and send it in an error email. So, we are talking about the adapter specific message attribute "Filename".
    unfortunately, this does not seem to be available as a container element for alert catagories in ALRTCATDEF. So, we are starting to look into using BPM to send a email via the email adapter. However, since the validation happens prior to BPM being called I am at a bit of a loss. Any ideas on how to get the email with the filename out to the suport group would be appreciated.
    Thanks,
    Chris

    package com.validate;
    import com.sap.aii.mapping.api.*;
    import com.sap.aii.mappingtool.tf7.rt.Container;
    import java.io.*;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.*;
    public class ValidateXML extends AbstractTransformation {
        public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {
            OutputStream outputstream = null;
            try {
                InputStream inputstream = transformationInput.getInputPayload().getInputStream();
                outputstream = transformationOutput.getOutputPayload().getOutputStream();
                byte[] b = new byte[inputstream.available()];
                inputstream.read(b);
                String XMLinputFileContent = new String(b);
                // define the type of schema - we use W3C:
                String schemaLang = "http://www.w3.org/2001/XMLSchema";
                // get validation driver:
                SchemaFactory factory = SchemaFactory.newInstance(schemaLang);
                //Place XSD file in PI server same as http://help.sap.com/saphelp_nwpi711/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/frameset.htm
                //OR I think you can place any where on server.
                File XSDfile = new File("C:/xi/runtime_server/validation/schema/SchemaFile.xsd");
                // create schema by reading it from an XSD file:
                Schema schema = factory.newSchema(new StreamSource(XSDfile));
                Validator validator = schema.newValidator();
                // at last perform validation:
                validator.validate(new StreamSource(XMLinputFileContent));
                //If XML it not valid, exception will be thrown, if it is valid sent this PassOutputXML to output
                String PassOutputXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns:MT_OutputXML xmlns:ns=\"http://sap.com/xi\"> <Name>FileName.txt</Name><Validation>Pass</Validation> </ns:MT_OutputXML>";
                outputstream.write(PassOutputXML.getBytes());
            } catch (Exception exception) {
                //Get File name using http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
                Container container = null;
                DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
                String inputFileName = conf.get(key);
                String FailOutputXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns:MT_OutputXML xmlns:ns=\"http://sap.com/xi\"> <Name>" + inputFileName + "</Name><Validation>Fail</Validation> </ns:MT_OutputXML>";
                try {
                    outputstream.write(FailOutputXML.getBytes());
                } catch (IOException ex) {
                    exception.printStackTrace();
                    ex.printStackTrace();

  • Validator on the generated form on the server WL

    Hello, i'm using Jdev 10g.
    i have the form
    <af:iterator value="#{informClient_bean.fields}" var="row"
                                   rows="40">
                        <af:switcher id="sw1" facetName="#{row.type}"
                                     defaultFacet="Text">
                          <f:facet name="3">
                            <af:selectInputDate label="#{row.label}"
                                                value="#{row.value}"
                                                maximumLength="#{row.maxlength}"
                                                shortDesc="#{row.shortDesc}"
                                                rendered="#{row.rendered}"
                                                validator="#{informClient_bean.validateFieldT}"
                                                required="#{row.requared}"
                                                readOnly="#{row.readOnly}"
                                                requiredMessageDetail="обязательное поле не заполнено"/>
                          </f:facet>
                          <f:facet name="1">
                            <af:inputText label="#{row.label}" value="#{row.value}"
                                          maximumLength="#{row.maxlength}"
                                          shortDesc="#{row.shortDesc}"
                                          rendered="#{row.rendered}"
                                          validator="#{informClient_bean.validateFieldT}"
                                          required="#{row.requared}"
                                          onkeydown="validMask();"
                                          readOnly="#{row.readOnly}"
                                          requiredMessageDetail="обязательное поле не заполнено"/>
                          </f:facet>
                          <f:facet name="9">
                            <af:selectOneChoice value="#{row.value}"
                                                requiredMessageDetail="обязательное поле не заполнено"
                                                autoSubmit="#{row.autoSubmit}"
                                                immediate="#{row.immediate}"
                                                label="#{row.label}"
                                                readOnly="#{row.readOnly}"
                                                onmouseup="validMask();">
                              <f:selectItems value="#{row.list}"/>
                            </af:selectOneChoice>
                          </f:facet>
                          <f:facet name="10">
                            <af:outputText value="#{row.label}"
                                           inlineStyle="font-size:large; color:rgb(51,102,153);"/>
                          </f:facet>
                          <f:facet name="11">
                            <af:selectBooleanCheckbox value="#{row.value}"
                                                      label="#{row.label}"
                                                      readOnly="#{row.readOnly}"/>
                          </f:facet>
                        </af:switcher>
                      </af:iterator>and have a bean for it form
    public class InformClient extends FormFields {
        public InformClient() {
            super();
        public void validateFieldT(FacesContext facesContext,
                                  UIComponent uiComponent, Object object) {
            try{
            ApplicationModule am = FacesUtil.getAM("PrototypeAMDataControl");
            ReqFieldValidationViewImpl voFieldParam =
                (ReqFieldValidationViewImpl)am.findViewObject("ReqFieldValidationView");
            voFieldParam.setFormName(uiComponent.getAttributes().get("requiredMessageDetail").toString()); //id поля
            voFieldParam.setFormCode("4");
            voFieldParam.executeQuery();
            ReqFieldValidationViewRowImpl fieldRow =
                (ReqFieldValidationViewRowImpl)voFieldParam.first();
            if (fieldRow != null) {
                Pattern p = Pattern.compile(fieldRow.getRffMask());
                Matcher m = p.matcher(object.toString());
                if (!m.matches()) {
                    FacesMessage fm =
                        new FacesMessage(FacesMessage.SEVERITY_ERROR, fieldRow.getRffName(),
                                         fieldRow.getRffErrorMsg());
                    throw new ValidatorException(fm);
            catch(Exception e){
                e.printStackTrace();
    }If I'm testing on a local machine validation work out, but if build and run on the server WL validation fails. Why is this happening?

    validation method did not work out (
    it works for a local test if run at Jdev, if you start to WebLogic the validation does not work (((
    Edited by: 6AZblJlb on 29.03.2013 2:21

  • Validating a digital signature in an xml

    Hi,
    Im working on validating a digital signature from an xml file . Im using the below code to get the value of signature node from the xml file.
    NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
    I'm getting it as nodelist object . When i try to get the length of the signature element it says 0 and hence it throws me an exception .
    I have to pass this nodeliest object to validate the xml file. Im attaching the xml file as well as the progarm to validate the xml file . Can somebody help me on this.
    Validate.java
    import javax.xml.crypto.*;
    import javax.xml.crypto.dsig.*;
    import javax.xml.crypto.dom.*;
    import javax.xml.crypto.dsig.dom.DOMValidateContext;
    import javax.xml.crypto.dsig.keyinfo.*;
    import java.io.File;
    import java.io.FileInputStream;
    import java.security.*;
    import java.util.Collections;
    import java.util.Iterator;
    import java.util.List;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    * This is a simple example of validating an XML
    * Signature using the JSR 105 API. It assumes the key needed to
    * validate the signature is contained in a KeyValue KeyInfo.
    public class Validate {
    public static void main(String[] args) throws Exception {
    try
    File file = new File("c:\\test.xml");
    // Instantiate the document to be validated
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         DocumentBuilder db = dbf.newDocumentBuilder();
         dbf.setNamespaceAware(true);
         //Document doc = dbf.newDocumentBuilder().parse(new FileInputStream("C://signature.xml"));
    Document doc = db.parse(file);
         // Find Signature element
    NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
    System.out.println("the nodelist value is"+nl);
              if (nl.getLength() == 0) {
         throw new Exception("Cannot find Signature element");
         // Create a DOM XMLSignatureFactory that will be used to unmarshal the
         // document containing the XMLSignature
         XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
         // Create a DOMValidateContext and specify a KeyValue KeySelector
    // and document context
         //DOMValidateContext valContext = new DOMValidateContext
         // (new KeyValueKeySelector(), nl.item(0));
         DOMValidateContext valContext = new DOMValidateContext
    (new KeyValueKeySelector(), nl.item(0));
              // unmarshal the XMLSignature
         XMLSignature signature = fac.unmarshalXMLSignature(valContext);
         // Validate the XMLSignature (generated above)
         boolean coreValidity = signature.validate(valContext);
         // Check core validation status
         if (coreValidity == false) {
         System.err.println("Signature failed core validation");
         boolean sv = signature.getSignatureValue().validate(valContext);
         System.out.println("signature validation status: " + sv);
         // check the validation status of each Reference
         Iterator i = signature.getSignedInfo().getReferences().iterator();
         for (int j=0; i.hasNext(); j++) {
              boolean refValid =
              ((Reference) i.next()).validate(valContext);
              System.out.println("ref["+j+"] validity status: " + refValid);
         } else {
         System.out.println("Signature passed core validation");
    catch (Exception e)
         e.printStackTrace();
    * KeySelector which retrieves the public key out of the
    * KeyValue element and returns it.
    * NOTE: If the key algorithm doesn't match signature algorithm,
    * then the public key will be ignored.
    private static class KeyValueKeySelector extends KeySelector {
         public KeySelectorResult select(KeyInfo keyInfo,
    KeySelector.Purpose purpose,
    AlgorithmMethod method,
    XMLCryptoContext context)
    throws KeySelectorException {
    if (keyInfo == null) {
              throw new KeySelectorException("Null KeyInfo object!");
    SignatureMethod sm = (SignatureMethod) method;
    List list = keyInfo.getContent();
    for (int i = 0; i < list.size(); i++) {
              XMLStructure xmlStructure = (XMLStructure) list.get(i);
         if (xmlStructure instanceof KeyValue) {
    PublicKey pk = null;
    try {
    pk = ((KeyValue)xmlStructure).getPublicKey();
    } catch (KeyException ke) {
    throw new KeySelectorException(ke);
    // make sure algorithm is compatible with method
    if (algEquals(sm.getAlgorithm(), pk.getAlgorithm())) {
    return new SimpleKeySelectorResult(pk);
    throw new KeySelectorException("No KeyValue element found!");
    //@@@FIXME: this should also work for key types other than DSA/RSA
         static boolean algEquals(String algURI, String algName) {
    if (algName.equalsIgnoreCase("DSA") &&
              algURI.equalsIgnoreCase(SignatureMethod.DSA_SHA1)) {
              return true;
    } else if (algName.equalsIgnoreCase("RSA") &&
    algURI.equalsIgnoreCase(SignatureMethod.RSA_SHA1)) {
              return true;
    } else {
              return false;
    private static class SimpleKeySelectorResult implements KeySelectorResult {
         private PublicKey pk;
         SimpleKeySelectorResult(PublicKey pk) {
         this.pk = pk;
         public Key getKey() { return pk; }
    test.xml
    <?xml version="1.0" encoding="UTF-8"?><Signature XMLNS="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#CWRT"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>VWmTb6knCBXhNjDLp6w5aX79AW4=</DigestValue></Reference><Reference URI="js/weatherData.js"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>aRyqMcnVA7UsxHaq3VPjIzKnR30=</DigestValue></Reference><Reference URI="js/accuweather.js"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>NKBau43TGuOTSwOiFLtC7xgeUxk=</DigestValue></Reference><Reference URI="js/location.js"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>SNowBnKItayjP8hVg2a+qlrNnl4=</DigestValue></Reference><Reference URI="index.html"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>ImhqtDT/KgYLUMwhzBjxo7kX16c=</DigestValue></Reference><Reference URI="images/bg_fade_current.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>6YBFwLJdH7wLSLwgheOzTgLxe0g=</DigestValue></Reference><Reference URI="images/setdefault.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>VD9Ay9DjNvHoCt4QpWI6H5gHo84=</DigestValue></Reference><Reference URI="images/bg_portrait.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>eMNhpeowX/LaxFhZ0choyWoGdnU=</DigestValue></Reference><Reference URI="images/form_bg.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>xRsfhpWI8R21vXcPd73EJ0SPg4c=</DigestValue></Reference><Reference URI="images/nav_hourly_off.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>7tBjRZQ6PC5uVRg8J5bAFTmBS4s=</DigestValue></Reference><Reference URI="images/bg_landscape.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>nTZ9DoZPW1UgjEvE3WfSBt3DdYA=</DigestValue></Reference><Reference URI="images/nav_maps_off.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>ywLUlQ+DCMuybGr2YLYDQx85jJw=</DigestValue></Reference><Reference URI="images/nav_graph_off.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>853j9KcFEpuI5c8e5+0TEpmU33U=</DigestValue></Reference><Reference URI="images/label_forecast.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>2feKnZklWElbyqItqq5Q1bZRtn4=</DigestValue></Reference><Reference URI="images/bg_fade_content_wide.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>GDFP4Tcu96NBOCo9qRw7K25l8as=</DigestValue></Reference><Reference URI="images/btn_getlocation.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>sJajd6TTV4VyB2ibMRl8hM4cV+8=</DigestValue></Reference><Reference URI="images/bg_fade_home.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>joxnBor/RV5uvqc+SiNU613+W6U=</DigestValue></Reference><Reference URI="images/label_hourly.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>uinbV5pKm/XFwNsBjI21m0tYkhs=</DigestValue></Reference><Reference URI="images/wxicons/33.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>X8HvsFhHLUr3624myAcox9QyagQ=</DigestValue></Reference><Reference URI="images/wxicons/37.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>ldJztK5xrBf3UOyRkSN9zFAootc=</DigestValue></Reference><Reference URI="images/wxicons/13.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>bAah/tMqPUVrXis2iiOZLYo4jRw=</DigestValue></Reference><Reference URI="images/wxicons/16.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>UZ2CKfWZN/FCLnILVz8bIXWlRAA=</DigestValue></Reference><Reference URI="images/wxicons/19.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>jRL/Ea5Dcj7DpvKOHnqGvUmpw4Q=</DigestValue></Reference><Reference URI="images/wxicons/18.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>76si6qIfm8bAPKBRIQCQScg0Mow=</DigestValue></Reference><Reference URI="images/wxicons/44.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>HkCAXti0I181Pjqkw2QNTjXN6/8=</DigestValue></Reference><Reference URI="images/wxicons/08.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>OAvQ6xMeMXCFznUUMZyL1frgJQk=</DigestValue></Reference><Reference URI="images/wxicons/20.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>BavTiifJ1XKhQx/AO4Y2PywHi+w=</DigestValue></Reference><Reference URI="images/wxicons/12.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>NNVCA+3eTGXWUXGjO1G4qoPPDaU=</DigestValue></Reference><Reference URI="images/wxicons/36.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>5Wy7pMJKjwc+fdL0+ez3OrhZ/WY=</DigestValue></Reference><Reference URI="images/wxicons/32.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>GrhBWg3ODd19NHkdaEyuzUDYGaQ=</DigestValue></Reference><Reference URI="images/wxicons/25.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>kVSt7ZBsrGBlnRp2mnNd4jzbjdc=</DigestValue></Reference><Reference URI="images/wxicons/29.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>CHkrsHgL9qFAKCgxQfGOaBgCg+A=</DigestValue></Reference><Reference URI="images/wxicons/17.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>SxQBu2aYDFDTD1N6XXcL/Z9r2G0=</DigestValue></Reference><Reference URI="images/wxicons/05.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>UR0ntm9xdDzhcq9m+EqdcDRhk5I=</DigestValue></Reference><Reference URI="images/wxicons/06.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>XUKHRCVRhhgG7M44QlhzFKulVf0=</DigestValue></Reference><Reference URI="images/wxicons/40.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>0vBrc/yiUz4pE8epTER19nblmCA=</DigestValue></Reference><Reference URI="images/wxicons/41.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>y5a8jOOsS/qPhcEMQV3Aufb/aNE=</DigestValue></Reference><Reference URI="images/wxicons/Thumbs.db"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>pch5wjLWZAPSgNO09d1x7SMayY=</DigestValue></Reference><Reference URI="images/wxicons/14.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>QoLGKWD8MVS0XxCvkvweDmYg1U=</DigestValue></Reference><Reference URI="images/wxicons/42.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>D9K0JzNNrtpryfckrNQNS87y1BQ=</DigestValue></Reference><Reference URI="images/wxicons/43.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>qlRMGFaqLYTej/k3k1wAGL+GWxM=</DigestValue></Reference><Reference URI="images/wxicons/04.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>a2ftn992/Hl3y1wp9IzsLSSqDdk=</DigestValue></Reference><Reference URI="images/wxicons/30.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>6Ad7HYjHxySf33JzQdS/oDTgcno=</DigestValue></Reference><Reference URI="images/wxicons/23.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>LsAfryFOtLhgviUgiOXM3z4lBAA=</DigestValue></Reference><Reference URI="images/wxicons/07.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>bV4gju3kZ780HDNOVP2lHE1TDW4=</DigestValue></Reference><Reference URI="images/wxicons/22.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>AeFmuHupwwVszEvbV94o0rngpCQ=</DigestValue></Reference><Reference URI="images/wxicons/01.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>6DsWdqkV1/ub3FaeUeXvxsQxckA=</DigestValue></Reference><Reference URI="images/wxicons/21.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>Z4W51hSrbkM5N91/F9xwDJwABb0=</DigestValue></Reference><Reference URI="images/wxicons/38.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>Jfl9KECyaQ68D0Fq2iyAHubQYJE=</DigestValue></Reference><Reference URI="images/wxicons/35.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>c1SmObYV0bMJwveQBuyOk/aHjoY=</DigestValue></Reference><Reference URI="images/wxicons/39.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>apdCy1y7Bhx4c8j8xZKpw9sLiHQ=</DigestValue></Reference><Reference URI="images/wxicons/34.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>RlUoSL1kyNF/LNHglKJojfidqDo=</DigestValue></Reference><Reference URI="images/wxicons/24.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>rp274RE36TIQ/cJqykbC1pfma64=</DigestValue></Reference><Reference URI="images/wxicons/31.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>4T9iGJPK46NYQtmGWyvMhFXqefg=</DigestValue></Reference><Reference URI="images/wxicons/15.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>V/kRSkl8RuSLp5XHkK+Ev2qkA/Q=</DigestValue></Reference><Reference URI="images/wxicons/02.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>LnzYacHZQ8dWbBsfY/xIBFf+FhY=</DigestValue></Reference><Reference URI="images/wxicons/26.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>L/fdXr1GduUly+gZoqoHtjSEeug=</DigestValue></Reference><Reference URI="images/wxicons/11.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>5tlEUU8jkLu69GjxyKrj/dlCBnE=</DigestValue></Reference><Reference URI="images/wxicons/03.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>eVam0Q5Ns+f0ivmOFlayoQjFJuQ=</DigestValue></Reference><Reference URI="images/btn_severe_on.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>xkpq8N5rnVv2QUOOPEC3t2UZ3io=</DigestValue></Reference><Reference URI="images/bg_fade_prefs.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>mGtHZB8HWR4Kr46E9ibtgPqkSjg=</DigestValue></Reference><Reference URI="images/btn_previous.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>tYsSyliuIQHfoqX8Ljjd514gjiY=</DigestValue></Reference><Reference URI="images/btn_search.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>Xs3TiHv5GVKqvqKcH4QQTLGeL5M=</DigestValue></Reference><Reference URI="images/nav_calendar_on.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>km6Jeefk1pbxhKPuKdX0tAikn20=</DigestValue></Reference><Reference URI="images/bg_fade_location.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>dsoQD4U3FStFnFCn9IU8XZOnbZ8=</DigestValue></Reference><Reference URI="images/logo_leaf.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>AI6UYnx1653B/rX71hqlXRYayK0=</DigestValue></Reference><Reference URI="images/radar.jpg"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>IEaZz7VDYcwgBHJhTFttbNpSr8=</DigestValue></Reference><Reference URI="images/btn_done.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>VZYygwwnJmzSykTWnC3UMjx7UVU=</DigestValue></Reference><Reference URI="images/Thumbs.db"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>aXryLm/7bU2iLfP6mwM96Q7iFfk=</DigestValue></Reference><Reference URI="images/btn_plus.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>apIaI0Q/XpYkQIZgrE8y4KDpe34=</DigestValue></Reference><Reference URI="images/label_calendar.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>Ek3gLnM9lZCvsJrn49FinTEFoc=</DigestValue></Reference><Reference URI="images/btn_severe_off.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>rMRQheIr8WGukddQsbW79yPUa68=</DigestValue></Reference><Reference URI="images/bg_fade_about_wide.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>exAFOiVOEx5VKUopSxkbRc3RTLc=</DigestValue></Reference><Reference URI="images/btn_removelocation.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>BAAQeIMdUoZumMexhxIJFLOXy8M=</DigestValue></Reference><Reference URI="images/label_weathermap.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>QLd8kSOk/dq9/PtPl3hycoufBGw=</DigestValue></Reference><Reference URI="images/space.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>lPyPvOmX8EoCzEM8iIruq8hfHIE=</DigestValue></Reference><Reference URI="images/btn_magnify.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>3lSDkwWlIMufqacsbJ8dShiDvPc=</DigestValue></Reference><Reference URI="images/btn_next.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>5l3/6rRyibJQXlQdSfopJ4Q9e3o=</DigestValue></Reference><Reference URI="images/bg_fade_current_wide.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>klPlC3aqn33AAxtAzDCksik4CXo=</DigestValue></Reference><Reference URI="images/nav_hourly_on.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>oW7HwXpGfcEz6q1UEixc48IuEf0=</DigestValue></Reference><Reference URI="images/btn_shrink.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>/6ORP54At9CAqkQno9aCvbXCF2E=</DigestValue></Reference><Reference URI="images/bg_cal_date.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>g10327Jhy+CE2XXE62b6Ea6cUZg=</DigestValue></Reference><Reference URI="images/key.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>anFOcEcBGzbkeEsfKJ7+y3S2Y0E=</DigestValue></Reference><Reference URI="images/degree_f.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>QtJd4lj3Gaqm59G0J6TT87N9jLk=</DigestValue></Reference><Reference URI="images/bg_fade_about.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>rYYhIG+rT3f8jPqSuzC65g2BRuE=</DigestValue></Reference><Reference URI="images/degree_c.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>0AwnOwXF+1iAySDhG6u+WKGzmEE=</DigestValue></Reference><Reference URI="images/nav_maps_on.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>B7IsyllFvqC+hrxow9QlM+IdDkQ=</DigestValue></Reference><Reference URI="images/label_graph.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>8dKb7eEM6PKj2NqpJmTIA6d4OZw=</DigestValue></Reference><Reference URI="images/bg_fade_nav.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>0gR7yxY7kUde+5gnApaniAR70c4=</DigestValue></Reference><Reference URI="images/nav_forecast_off.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>T6cSnzVZ6+NYmcJkSxagrBG34VA=</DigestValue></Reference><Reference URI="images/bg_fade_content.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>eAAeix95CFcyTRFP0L37wCTiCT4=</DigestValue></Reference><Reference URI="images/nav_calendar_off.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>+7NYqrzg6E42x4bcSmI7oR+06Ok=</DigestValue></Reference><Reference URI="images/nav_graph_on.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>IuDRMdZ5SGeHtOUrIO6N8Kz2ug0=</DigestValue></Reference><Reference URI="images/logo_accu.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>/uv3wU6UomVHWqNw6FnQYutp19g=</DigestValue></Reference><Reference URI="images/nav_forecast_on.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>x+QqY/MePBUZryW4TH5q+IF1G+g=</DigestValue></Reference><Reference URI="config.xml"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>xo9qqZXg+0DwkCx8Kks9jgMLaLA=</DigestValue></Reference><Reference URI="css/accuweather.css"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>wIZ0bV7p0RmG7GEQzl9GoN+MMEs=</DigestValue></Reference><Reference URI="icon.png"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>vReEx8PURNyRoFZDvLHfXSAW5U=</DigestValue></Reference></SignedInfo><SignatureValue>H6RxXxj0OfpZuhbNHUkm048kZ1uzlGUwQV4TadOvFJ0VKHIyjTcJgzx7ApSUmCTjg/5JaRufBjAzihXmd7UTkq+aVm8smRgHpr3puz0w2wKGhPizO0dz4qfw3U7lqV6eLgSDakRj1jnFgqcMVHI+0k5vvYeVxgUVi6bz2b+IbM=</SignatureValue><Object Id="CWRT"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties" ><SignatureProperty Id="profile"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile" /></SignatureProperty><SignatureProperty Id="role"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor" /></SignatureProperty><SignatureProperty Id="identifier"><dsp:Identifier>{247220a7-f378-4151-83d3-6be32024c0ae}</dsp:Identifier></SignatureProperty></SignatureProperties></Object><KeyInfo><X509Data><X509Certificate>MIICzDCCAjWgAwIBAgIBADANBgkqhkiG9w0BAQUFADArMRAwDgYDVQQKEwdSRCBD
    ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZTAeFw0wNDExMTUxMjQyMDZaFw0z
    NzA5MjMxMjQyMDZaMCsxEDAOBgNVBAoTB1JEIENlcnQxFzAVBgNVBAMTDlJEIENl
    cnRpZmljYXRlMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDLRF+r1FGGkCwT
    rb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW46Y+LWaA8HMlDdoHRB0FgASisYcFa
    gwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh7W7Dt9F5FZij8F7/9Pi6+FhhxZFI
    f1DD+yry9D7+Sp+BgdNALe4XOpf25QIBA6OCAQAwgf0wDAYDVR0TBAUwAwEB/zAL
    BgNVHQ8EBAMCAoQwHQYDVR0OBBYEFFi/kuGzxhVpjGxe9ZwlxC3fH9jFMFMGA1Ud
    IwRMMEqAFFi/kuGzxhVpjGxe9ZwlxC3fH9jFoS+kLTArMRAwDgYDVQQKEwdSRCBD
    ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZYIBADBsBgNVHSAEZTBjMGEGBFUd
    IAAwWTATBggrBgEFBQcCARYHaHR0cDovLzBCBggrBgEFBQcCAjA2GjRGb3IgUiZE
    IHVzYWdlIG9ubHkuIFRoaXMgY2VydGlmaWNhdGUgaXMgbm90IHRydXN0ZWQuMA0G
    CSqGSIb3DQEBBQUAA4GBAHGB4RQMAgBdeT2hxfOr6f2nA/dZm+M5yX5daUtZnET9
    Ed0A9sazLawfN2G1KFQT9kxEParAyoAkpbMAsRrnRz/9cM3OHgFm/NiKRnf50DpT
    7oCx0I/65mVD2kt+xXE62/Ii5KPnTufIkPi2uLvURCia1tTS8JmJ8dtxDGyQt8BR</X509Certificate></X509Data></KeyInfo></Signature>

    >
    // Instantiate the document to be validated
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    dbf.setNamespaceAware(true);
    Document doc = db.parse(file);Your problem is that you've instantiated the DocumentBuilder before you've made the factory namespace aware. As a result, does not know against which namespace it is parsing the XML file.
    Change the lines of code to have the factory be namespace-aware before you instantiate the DocumentBuilder and then parse the class. You'll get past your "node not found" error to receive a number of other errors which you need to correct.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    Document doc = dbf.newDocumentBuilder().parse(file);As a practice when generating an XML document, you should try to validate it inside an IDE like Netbeans/Eclipse before trying to do anything with the document to ensure you've not only got a well-formed XML document, but also one that is "schema-conformant. Your XML signature is not (the Object element cannot come before the KeyInfo element, and the SignatureProperty element is missing the required Target attribute); as a result your Signature element will fail to pass validation even if your code is correct. A cursory review of the XML Signature specs and its XSD is always helpful: [http://www.w3.org/TR/xmldsig-core/].
    Finally, please use the {code} tag for source-code to make it readable. Thanks.
    Arshad Noor
    StrongAuth, Inc.

  • Xerces - validator won't catch wrong input in xml file

    Hi there,
    I am using xerces 2.9.1 and Java 5
    here is my code
    package xmltesting;
    import java.io.IOException;
    import org.apache.xerces.parsers.DOMParser;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXNotRecognizedException;
    import org.xml.sax.SAXNotSupportedException;
    public class DomParserExample {
         Document dom;
         public DomParserExample() {
         public void runExample() {
              //parse the xml file and get the dom object
              parseXmlFile();
         private void parseXmlFile(){
              //get the factory
              DOMParser parser = new DOMParser();
              try {
                   parser.setFeature("http://apache.org/xml/features/validation/schema",true);
              } catch (SAXNotRecognizedException e) {
                   e.printStackTrace();
              } catch (SAXNotSupportedException e) {
                   e.printStackTrace();
              try {
                   ErrorChecker errors = new ErrorChecker();
                   parser.setErrorHandler(errors);
                   //parse using builder to get DOM representation of the XML file
                   parser.parse("xmltesting/shiporder.xml");
                   dom = parser.getDocument();
              } catch(IOException ioe) {
                   ioe.printStackTrace();
              } catch (SAXException saxe) {
                   saxe.printStackTrace();
              System.out.println("Everything parsed without any problem");
         public static void main(String[] args){
              //create an instance
              DomParserExample dpe = new DomParserExample();
              //call run example
              dpe.runExample();
    }My xml is following
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <shiporder orderid="889923"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="shiporder.xsd">
    <orderperson>John Smith</orderperson>
    <shipto>
      <name>Ola Nordmann</name>
      <address>Langgt 23</address>
      <city>4000 Stavanger</city>
      <country>Norway</country>
    </shipto>
    <item>
      <title>Empire Burlesque</title>
      <note>Special Edition</note>
      <quantity>1</quantity>
      <price>10.90</price>
    </item>
    <item>
      <title>Hide your heart</title>
      <quantity>1</quantity>
      <price>9.90</price>
    </item>
    </shiporder>
    </xs:schema>and schema xsd is
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="shiporder">
    <xs:complexType>
      <xs:sequence>
       <xs:element name="orderperson" type="xs:string"/>
       <xs:element name="shipto">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="name" type="xs:string"/>
          <xs:element name="address" type="xs:string"/>
          <xs:element name="city" type="xs:string"/>
          <xs:element name="country" type="xs:string"/>
         </xs:sequence>
        </xs:complexType>
       </xs:element>
       <xs:element name="item" maxOccurs="unbounded">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="title" type="xs:string"/>
          <xs:element name="note" type="xs:string" minOccurs="0"/>
          <xs:element name="quantity" type="xs:positiveInteger"/>
          <xs:element name="price" type="xs:decimal"/>
         </xs:sequence>
        </xs:complexType>
       </xs:element>
      </xs:sequence>
      <xs:attribute name="orderid" type="xs:string" use="required"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>Now I wanted to try and create problems in the xml file so the validator can catch those errors so i changed the quantity and price values to 'abc' string (they should be integer and decimal values respectively) everywhere in the xml file BUT the validation did not throw any errors and that is where i am confused.
    do i need to do something else in the Java code?
    thanks
    Edited by: Shazmiester on Aug 11, 2008 10:20 AM
    Edited by: Shazmiester on Aug 11, 2008 10:25 AM

    here is my ErrorChecker code
    package xmltesting;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.SAXParseException;
    public class ErrorChecker extends DefaultHandler
         public ErrorChecker() {
         public void error (SAXParseException e) {
              System.out.println("Parsing Error: " + e.getMessage());
         public void warning (SAXParseException e) {
              System.out.println("Parsing warning: " + e.getMessage());
         public void fatalError(SAXParseException e) {
              System.out.println("Fatal Parsing Error.: " + e.getMessage());
              System.out.println("Exiting...");
              System.exit(1);
    }Looks ok to me, the warnings don't show up at all.

  • Error in validating XML against schema

    Hi am getting some critical errors while Validating XML against schema
    error is:
    cvc-elt.1: Cannot find the declaration of element 'position' , here <position> is my root element.
    my code is as follows:
    package com.glemser.xmLabeling.library.component.spl;
    import com.documentum.com.DfClientX;
    import com.documentum.com.IDfClientX;
    import com.documentum.fc.client.IDfClient;
    import com.documentum.fc.client.IDfSession;
    import com.documentum.fc.client.IDfSessionManager;
    import com.glemser.common.helper.OperationHelper;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParserFactory;
    import java.io.CharArrayWriter;
    import java.io.IOException;
    import java.io.InputStream;
    public class Test {
    static IDfSession m_session;
    public static void main(String[] args) {
    try {
         new Test().validate();
    } catch (Exception e) {
    e.printStackTrace();
    private XMLReader xmlReader;
    private DefaultHandler handler; // Defines the handler for this parser
    private boolean valid = true;
    public void validate() {
    try {
    SetXML setXML = new SetXML();
    OperationHelper operation = new OperationHelper();
    String splObjPath = "C://Documents and Settings/dparikh/My Documents/xmLabelingStage/Test.xml";//operation.executeExportOperation(m_session, new DfId(m_objectId), true);
    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setNamespaceAware(false);
    spf.setValidating(true);
    spf.setFeature("http://xml.org/sax/features/validation", true);
    spf.setFeature("http://apache.org/xml/features/validation/schema", true);
    spf.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
    if (spf.isValidating()) {
    System.out.println("The parser is validating");
    javax.xml.parsers.SAXParser sp = spf.newSAXParser();
    sp.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
    sp.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "file://C:/Documents and Settings/dparikh/My Documents/xmLabelingStage/Test.xsd");
    System.out.println("The parser is validating1");
    //Create XMLReader
    xmlReader = sp.getXMLReader();
    xmlReader.setFeature("http://apache.org/xml/features/validation/schema", true);
    xmlReader.setEntityResolver(new SchemaLoader());
    ContentHandler cHandler = new MyDefaultHandler();
    ErrorHandler eHandler = new MyDefaultHandler();
    xmlReader.setContentHandler(cHandler);
    xmlReader.setErrorHandler(eHandler);
    System.out.println("The parser is validating2");
    parseDocument(splObjPath);
    } catch (SAXException se) {
    se.printStackTrace();
    } catch (ParserConfigurationException e) {
    e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
    public void parseDocument(String xmlFile) {
    try {
    xmlReader.parse(xmlFile);
    if (valid) {
    System.out.println("Document is valid!");
    } catch (SAXException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    } catch (Exception e) {
    e.printStackTrace();
    class MyDefaultHandler extends DefaultHandler {
    private CharArrayWriter buff = new CharArrayWriter();
    private String errMessage = "";
    /* With a handler class, just override the methods you need to use
    // Start Error Handler code here
    public void warning(SAXParseException e) {
    System.out.println("Warning Line " + e.getLineNumber() + ": " + e.getMessage() + "\n");
    public void error(SAXParseException e) {
    errMessage = new String("Error Line " + e.getLineNumber() + ": " + e.getMessage() + "\n");
    System.out.println(errMessage);
    valid = false;
    public void fatalError(SAXParseException e) {
    errMessage = new String("Error Line " + e.getLineNumber() + ": " + e.getMessage() + "\n");
    System.out.println(errMessage);
    valid = false;
    public class SchemaLoader implements EntityResolver {
    public static final String FILE_SCHEME = "file://";
    public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
    if (systemId.startsWith(FILE_SCHEME)) {
    String filename = systemId.substring(FILE_SCHEME.length());
    InputStream stream = SchemaLoader.class.getClassLoader().getResourceAsStream(filename);
    return new InputSource(stream);
    } else {
    return null;
    My XML and XSD are as below:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="position" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="position_number" type="xsd:string"/>
    <xsd:element name="position_title" type="xsd:string"/>
    <xsd:element name="report_to_position" type="xsd:string"/>
    <xsd:element name="incumbent" type="xsd:string"/>
    <xsd:element name="operation" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <position xsi:schemaLocation="Test.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <position_number>12345</position_number>
    <position_title>Sr. Engr</position_title>
    <report_to_position>23456</report_to_position>
    <incumbent>23456</incumbent>
    <operation>INSERT</operation>
    </position
    Please help me out

    --> Could not find cached enumeration value Custom.CI.Enum.PeripheralDevice.Printer for property Type, class BMC.Custom.CI.PeripheralDevice in enumeration cache.
    You must specify either the Name or Guid of an enumeration of type Custom.CI.Enum.PeripheralDevice.Type.
    Be sure that you are specifying the Name property of the enumeration value you want to set, and not the DisplayName; the Internal Name is something like "IncidentCategoryEnum.Category" for out of the box enumerations, or ENUM.210ADA2282FDABC3210ADA2282FDABC
    for enumerations created in the console.
    you can check this by finding the enumeration in the XML or by using the the
    SMLets commandlet
    Get-SCSMEnumeration | ?{$_.DisplayName –eq “Printer”}
    and then checking your value with
    Get-SCSMEnumeration -Name "ENUM.210ADA2282FDABC3210ADA2282FDABC"
    and see if you get the right displayname back

  • Validation Error in Parsing

    Hi
    Please help i am trying to fix this for last 2 days ..
    I am trying to validate the XML in SAX parser and i am getting
    "java.lang.ClassCastException: " error.
    I am pasting the code i have and the sample XML. If some one faced the same kind of problem please share the thoughts
    thanks in advance.
    I am sending the XML from the command prompt
    This is the code i have
    class XMLBean {
    public void onMessage (String uri) {
    Object [] schemas = new Object[] { "C:/Murugaraj/Projects/Atlys-interface/XSD/Schemas/Common/Types/Public/rDataModel.xsd",
    "C:/raj/Projects/Atlys-interface/XSD/Schemas/Atlas/jms/Public/SubscriberNotification.xsd",
    "C:/raj/Projects/Atlys-interface/XSD/Schemas/Atlas/Container/Public/SubscriberNotification.xsd",
    "C:/raj/Projects/Atlys-interface/XSD/Schemas/Atlas/Container/Public/MessageHeader.xsd"};
    System.out.println("Parsing XML File: " + uri + "\n\n");
    // The SAX handler Events are in RequestHandler which is extends from Defaulthandler
    RequestHandler rh = new RequestHandler();
    try {
    String txt = uri;
    System.out.println(txt);
    SAXParserFactory fact = SAXParserFactory.newInstance();
    fact.setNamespaceAware(true);
    fact.setValidating(true);
    fact.setFeature("http://xml.org/sax/features/validation", true);
    fact.setFeature("http://apache.org/xml/features/validation/schema",true);
    fact.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
    SAXParser sp = fact.newSAXParser();
    sp.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",schemas);
    InputSource inSource = new InputSource(new FileInputStream(txt));
    sp.parse(inSource, rh);
    }catch(SAXNotRecognizedException x){
         System.out.println(" SAXNotRecognizedException Parsing error" );
         x.getMessage();
    }catch(SAXParseException spe){
         System.out.println("\n** Parsing error SAXParseException" + ", line " + spe.getLineNumber() + ", uri " + spe.getSystemId());
    System.out.println(" " + spe.getMessage());
         Exception x = spe;
         if (spe.getException() != null)
         x = spe.getException();
         x.printStackTrace();
    }catch(SAXException sxe){
         System.out.println(" SAXException Parsing error" );
         Exception x = sxe;
         if(sxe.getException() != null)
              x=sxe.getException();
         x.printStackTrace();
    }catch (IOException ioe) {
    System.out.println(" IOException Parsing error" );
    ioe.printStackTrace();
    }catch (Throwable t){
    t.printStackTrace();
    } // End of catch
    } // End of onMessage
    public static void main(String[] args) {
         if (args.length != 1) {
         System.out.println("Usage: java SAXParserDemo [XML URI]");
         System.exit(0);
         String uri = args[0];
         XMLBean call = new XMLBean ();
         call.onMessage(uri);
    } // End of main
    } // End of XMLBean
    This is the error i am getting
    java.lang.ClassCastException: [Ljava.lang.Object;
    at weblogic.apache.xerces.impl.xs.XMLSchemaValidator.reset(Lweblogic/apa
    che/xerces/xni/parser/XMLComponentManager;)V(XMLSchemaValidator.java:1374)
    at weblogic.apache.xerces.parsers.BasicParserConfiguration.reset()V(Basi
    cParserConfiguration.java:523)
    at weblogic.apache.xerces.parsers.DTDConfiguration.reset()V(DTDConfigura
    tion.java:624)
    at weblogic.apache.xerces.parsers.DTDConfiguration.parse(Z)Z(DTDConfigur
    ation.java:498)
    at weblogic.apache.xerces.parsers.DTDConfiguration.parse(Lweblogic/apach
    e/xerces/xni/parser/XMLInputSource;)V(DTDConfiguration.java:581)
    at weblogic.apache.xerces.parsers.XMLParser.parse(Lweblogic/apache/xerce
    s/xni/parser/XMLInputSource;)V(XMLParser.java:152)
    at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(Lorg/xml/sax/I
    nputSource;)V(AbstractSAXParser.java:1175)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(Lorg/xml/sax/InputSource;)V
    (WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(Lorg/xml/sax/InputSource;)V
    (RegistryXMLReader.java:152)
    at javax.xml.parsers.SAXParser.parse(Lorg/xml/sax/InputSource;Lorg/xml/s
    ax/helpers/DefaultHandler;)V(SAXParser.java:345)
    at XMLBean.onMessage(Ljava/lang/String;)V(XMLBean.java:80)
    at XMLBean.main([Ljava/lang/String;)V(XMLBean.java:130)
    The Sample XML looks like this
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SubscriberNotification xmlns:cng="http://csi.test.com/CSI/Namespaces/Types/Public/DataModel.xsd" xmlns="http://csi.test.com/ATLAS/Namespaces /Container/JMS/SubscriberNotification.xsd" xmlns:sn="http://csi.test.com/ATLAS/Namespaces/Container/Public/SubscriberNotification.xsd" xmlns:mh="http://csi.test.com/ATLAS/Namespaces/Container/Public/MessageHeader.xsd">
    - <mh:MessageHeader>
    - <mh:TrackingMessageHeader>
    <cng:version>v3</cng:version>
    <cng:messageId>08001200312101117273772521</cng:messageId>
    <cng:originatorId>CARE</cng:originatorId>
    <cng:dateTimeStamp>2005-08-23T13:45:57Z</cng:dateTimeStamp>
    </mh:TrackingMessageHeader>
    - <mh:SequenceMessageHeader>
    <cng:sequenceNumber>1</cng:sequenceNumber>
    <cng:totalInSequence>1</cng:totalInSequence>
    </mh:SequenceMessageHeader>
    </mh:MessageHeader>
    - <sn:SubscriberNotification>
    <sn:billingSystemEventGenrationDateTime>2003-12-10T11:17:27.377Z</sn:billingSystemEventGenrationDateTime>
    <sn:notificationType>UpdateSubscriberStatusNotification</sn:notificationType>
    <sn:notificationSubType>3400</sn:notificationSubType>
    - <sn:Account>
    - <sn:billingMarket>
    <sn:billingMarket>08</sn:billingMarket>
    </sn:billingMarket>
    <sn:billingSystemId>CARE</sn:billingSystemId>
    </sn:Account>
    </sn:SubscriberNotification>
    </SubscriberNotification>

    Thanks bckrispiYou're welcome, :)
    seems like i can pass array of objects so then i
    decided to pass multiple schemas. Also there is one
    sun website claims validating multiple schemasIf you're talking about the new Validation Framework, yes, the tutorials say you can pass it multiple schemas with the same namespace. Unfortunately, the implementation is broken
    Yes, i want to validate with more than one schema ..
    'cos my XML generated based on 4 schemas ( xsd's)
    I did not get what you mean by "import" dependand
    schemas..
    import the depandant schema on the "parent schema"
    thats what you meant ?If you have a "parent" xsd that uses an <xsd:import> on its dependencies, then you just need to pass the parent xsd into your SAX Parser.

  • Error validating xml with xsd schema on JSDK 1.4

    Hi All,
    Asked to me do it a Web Service client in Java and validate its xml answer with an xsd file using 1.4 plataform.
    I googled and I saw many samples to 1.5 plataform, and few samples to 1.4, but anyway I tried to do what they asked to me.
    I got connect with service, got the response and so I went to validate that xml with an xsd file.
    But I got an error on that task. The error occurs in the following line
    "Schema schema = factory.getSchema();"
    Bellow my code
    final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
              final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
              final String schemaSource = "C:\\GetAuthorizationServiceOutput.xsd";
              final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();          
              factory.setNamespaceAware(true);
              factory.setValidating(true);
              try {
              factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
              factory.setAttribute(JAXP_SCHEMA_SOURCE,new File(source));
              catch (IllegalArgumentException x) {
                   System.out.println(x.getMessage());
    DocumentBuilder builder = null;
              Document document = null;
              try {
                   builder = factory.newDocumentBuilder();
                   document = builder.parse(new InputSource(new StringReader(ret.toString())));
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              **Schema schema = factory.getSchema();**
              Validator validator = schema.newValidator();
              try {
                   validator.validate(new DOMSource(document));
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    and here is the exception :
    Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
    Method onLinkClicked of interface wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = btBack, page = br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails, path = 30:form:btBack.RelationsDetails$4, isVisible = true, isVersioned = true]] threw an exception
    wicket.WicketRuntimeException: Method onLinkClicked of interface wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = btBack, page = br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails, path = 30:form:btBack.RelationsDetails$4, isVisible = true, isVersioned = true]] threw an exception
         at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:198)
         at wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
         at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
         at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57)
         at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:896)
         at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
         at wicket.RequestCycle.step(RequestCycle.java:1010)
         at wicket.RequestCycle.steps(RequestCycle.java:1084)
         at wicket.RequestCycle.request(RequestCycle.java:454)
         at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:187)
         ... 39 more
    Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
         at br.com.weev.finan.mkb_er.business.manager.impl.RelationManagerImpl.getAuthorizationService(RelationManagerImpl.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy22.getAuthorizationService(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:377)
         at wicket.proxy.$Proxy39.getAuthorizationService(Unknown Source)
         at br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails$4.onClick(RelationsDetails.java:125)
         at wicket.markup.html.link.Link.onLinkClicked(Link.java:254)
         ... 43 more
    It's my first time doing that, so I'm confuse to do it.
    Thank you
    Juliano.

    This is how.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
    dbfac.setNamespaceAware(true);
    SchemaFactory factory1 = SchemaFactory
                        .newInstance("http://www.w3.org/2001/XMLSchema");
    Schema schema = factory1.newSchema(new File("person.xsd"));
    dbfac.setSchema(schema);
    DocumentBuilder dbparser1 = dbfac.newDocumentBuilder();
    Document doc1 = dbparser1.parse(new File("person.xml"));
    Validator validator1 = schema.newValidator();
    DOMSource dm1 = new DOMSource(doc1);
    DOMResult domresult1 = new DOMResult();
    validator1.validate(dm1, domresult1);

  • HttpURLConnection and valid cookies

    Hi,
    I have implemented a web server with a login page to authenticate a user.
    When the browser has not send a valid cookie, the server redirects to the
    login page, where the user can fill a form to post the username and password.
    I am implementing a java stand-alone client to access this web server. I use
    the HttpURLConnection class for this.
    First, i authenticate the user sending a post request with the login and
    password. The server responds with a cookie. To access other resources in
    the server i send the cookie in each request.
    My problem is: i am using java class HttpURLConnection. When the cookie
    is not valid, the server redirects to the login page, but i have not
    found a way to know about it without parsing the response html. I get the http
    header fields but there is no info about this.
    Thanks in advance

    You should extraxt the sessionID from the cookie, when logging on to the system.
    From then on, pass the session ID to all further connections.
    You can obtain the session-ID like this:
    public void retrieveSessionID() {
                   String key = "";
                   String id = "";
                   try {
                     URL url = new URL ( "http://localhost/yourapplication/logon.jsp?username=Homer&password=donut);
                     URLConnection urlConnection = url.openConnection();
                     if (urlConnection != null)
                          for (int i = 1;(key = urlConnection.getHeaderFieldKey(i)) != null; i++)
                               if (key.equalsIgnoreCase("set-cookie"))
                                    id = urlConnection.getHeaderField(key);
                                    id = id.substring(0, id.indexOf(";"));
                               }     //if
                          }     //for
                     }     //if
                   } catch (IOException e) {
                                                                          e.printStackTrace();
                   }     //catch
                     this.jSessionId = id;
         }     //getSessionIDAnd then make every connection like this:
    URL url = new URL("http:......");
    HttpURLConnection connection = (HttpURLConnection)url.openConnection();
                    connection.setRequestProperty("Cookie", this.jSessionId);
                    connection.connect();                Hope I could help!
    Greetings
    Stef

  • Xsd validation of an xml.. another program...

    hiii......this is another program ..........
    please see the problem with the code..
    package com.pgs.tma;
    import java.io.*;
    import javax.xml.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class valid {
         static final String JAXP_SCHEMA_SOURCE =
                        "http://java.sun.com/xml/jaxp/properties/schemaSource";
         public static void main(String args[]) throws IOException, SAXException, ParserConfigurationException
         if(args.length < 2)
                             System.err.println("usage is:");
                             System.err.println(" java -jar tips.jar -validatedom "
                                                      + "xml.xml xsd.xsd");
                             return;
         System.out.println(args[0]);
         System.out.println(args[1]);
         File input = new File(args[0]),
                             schema = new File(args[1]);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
              factory.setValidating(true);
         System.out.println("1");
         try{
              System.out.println("2");
              factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
    "http://www.w3.org/2001/XMLSchema");
              System.out.println("3");
              factory.setAttribute(JAXP_SCHEMA_SOURCE,"C://TWWorkspace//TMA//input//schema.xsd");
    //     factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",schema);
         System.out.println("4");
         catch(IllegalArgumentException x)
                   System.out.println("5");
                   System.err.println(" DOM parser is not JAXP 1.2 compliant"+x);
         System.out.println("6");
         Document doc = null;
         try{       
              DocumentBuilder parser = factory.newDocumentBuilder();
              //factory.setErrorHandler( myErrorHandler );
              doc = parser.parse(input);
              System.out.println("7");
         catch (ParserConfigurationException e){
              System.out.println("Parser not configured: " + e.getMessage());
         catch (SAXException e){
              System.out.print("Parsing XML failed due to a " + e.getClass().getName() + ":");
              System.out.println(e.getMessage());
         catch (IOException e){
              e.printStackTrace();
         System.out.println("end of program");
    the error message is:
    C:\TWWorkspace\TMA\input\input.xml
    C:\TWWorkspace\TMA\input\schema.xsd
    1
    2
    3
    5
    DOM parser is not JAXP 1.2 compliantjava.lang.IllegalArgumentException: http://java.sun.com/xml/jaxp/properties/schemaSource
    6
    Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
    set, which is probably not what is desired. Parser will use a default
    ErrorHandler to print the first 10 errors. Please call
    the 'setErrorHandler' method to fix this.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=3: cvc-elt.1: Cannot find the declaration of element 'shiporder'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=4: cvc-elt.1: Cannot find the declaration of element 'orderperson'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=5: cvc-elt.1: Cannot find the declaration of element 'shipto'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=6: cvc-elt.1: Cannot find the declaration of element 'name'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=7: cvc-elt.1: Cannot find the declaration of element 'address'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=8: cvc-elt.1: Cannot find the declaration of element 'city'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=9: cvc-elt.1: Cannot find the declaration of element 'country'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=11: cvc-elt.1: Cannot find the declaration of element 'item'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=12: cvc-elt.1: Cannot find the declaration of element 'title'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=13: cvc-elt.1: Cannot find the declaration of element 'note'.
    7
    end of program

    I see you problem but the strictness of XML is essential. One has learned from of HTML - each browser trying to fix and show the stuff in spite of, say, invalid tags. To blow up at the first error is a compliant (and maybe desired?) behaviour.

Maybe you are looking for

  • How can I trap & display HTML syntax errors in mx:HTML at run time?

    I am loading HTML pages into an mx:HTML component in an AIR application. If the HTML contains errors, they show up in the trace window in debug mode.  I'd like to trap that information so I can tell the usere that there are errors (and what they are)

  • Mp4 won't play in quicktime player

    I have an mp4 file that I'm trying to watch on my quicktime player but I just get an error that says it cannot be opened.  The codecs are H264 - MPEG-4 - AVC, and A52 audio (aka AC3). I have Perian installed.  Any suggestions?

  • Compiz fails to refresh screen [Solved]

    Hi archers, After some months without internet, I did a system upgrade and now my compiz standalone setup is stuffed up, in a funny way: Mouse and keyboard works. Conky is functional for a second or two, and then apparently freezes. No windows are di

  • MRP type - Forecast indicator

    Hi, my company is using a Z - MRP type which has the following settings: MRP procedure =        D - Material requirements planning Forecast Indicator =    No Forecast Consump.ind.forecast = G - Total consumption MRP ind. forecast  =  G - Total requir

  • Unread emails in folder

    My mail icon shows I have 350 unread emails. However after opening there are none in any of the folders.   Setting shows to remove when deleted.