Validation issues with XSD

I'm trying to validate a xml file with this schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns="http://www.jeromedroz.org/etc/lexicon.xsd"
               targetNamespace="http://www.jeromedroz.org/etc/lexicon.xsd">
     <xsd:element name="lexicon">
          <xsd:complexType>
               <xsd:sequence>
                    <xsd:element     ref="available-languages" minOccurs="1"
                                   maxOccurs="1"/>
                    <xsd:element ref="term" minOccurs="1" maxOccurs="unbounded"/>
               </xsd:sequence>
               <xsd:attribute name="name" type="xsd:string" use="optional" />
          </xsd:complexType>
          <xsd:key name="termPK">
               <xsd:selector xpath="./term" />
               <xsd:field xpath="@id" />
          </xsd:key>
          <xsd:keyref name="termFK" refer="termPK">
               <xsd:selector xpath="./term/include" />
               <xsd:field xpath="@idref" />
          </xsd:keyref>
     </xsd:element>
     <xsd:element name="available-languages">
          <xsd:complexType>
               <xsd:sequence maxOccurs="unbounded">
                    <xsd:element     ref="language" minOccurs="1" />
               </xsd:sequence>
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="language">
          <xsd:complexType>
               <xsd:attribute name="value" type="xsd:string" use="required" />
               <xsd:attribute name="default" type="xsd:boolean" use="optional" />
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="term">
          <xsd:complexType mixed="true">
               <xsd:choice minOccurs="0" maxOccurs="unbounded">
                    <xsd:any     namespace="http://www.w3.org/1999/xhtml"
                              processContents="skip" />
                    <xsd:element ref="translation" />
                    <xsd:element ref="include" />
               </xsd:choice>
               <xsd:attribute name="id" type="xsd:string" use="required" />
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="translation">
          <xsd:complexType mixed="true">
               <xsd:choice minOccurs="0" maxOccurs="unbounded">
                    <xsd:any     namespace="http://www.w3.org/1999/xhtml"
                              processContents="skip" />
                    <xsd:element ref="include" />
               </xsd:choice>
               <xsd:attribute name="language" type="xsd:string" use="required" />
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="include">
          <xsd:complexType>
               <xsd:attribute name="idref" type="xsd:string" use="required" />
          </xsd:complexType>
     </xsd:element>
</xsd:schema>And here is a portion of my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<lexicon     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:noNamespaceSchemaLocation="http://www.jeromedroz.org/etc/lexicon.xsd
                 ./lexicon.xsd"
                xmlns:html="http://www.w3.org/1999/xhtml"
             xmlns="http://www.jeromedroz.org/etc/lexicon.xsd"
                name="lexicon">
     <available-languages>
          <language value="fr" default="true" />
          <language value="en" />
     </available-languages>
     <term id="include-this">
          <translation language="fr">inclure cela</translation>
                <translation language="en">include this</translation>
     </term>
        <term id="home">
          <html:a href="http://www.mysite.org">    
                     <translation language="fr">accueil</translation>
                     <include idref="include-this" />
                </html:a>
     </term>
</lexicon>The idref attribute of the include tag is a reference to the id attribute of the term tag. The problem is the key and keyref definition in the xsd file: for example, if a term appears more than once (with the same id) the parser should notice it because the key is duplicated, but it doesn't. I've tried several places for the key and keyref definition in the xsd file but I get an error like KeyRefOutOfScope nearly all the time. Do anybody have a solution?

I'm trying to validate a xml file with this schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns="http://www.jeromedroz.org/etc/lexicon.xsd"
               targetNamespace="http://www.jeromedroz.org/etc/lexicon.xsd">
     <xsd:element name="lexicon">
          <xsd:complexType>
               <xsd:sequence>
                    <xsd:element     ref="available-languages" minOccurs="1"
                                   maxOccurs="1"/>
                    <xsd:element ref="term" minOccurs="1" maxOccurs="unbounded"/>
               </xsd:sequence>
               <xsd:attribute name="name" type="xsd:string" use="optional" />
          </xsd:complexType>
          <xsd:key name="termPK">
               <xsd:selector xpath="./term" />
               <xsd:field xpath="@id" />
          </xsd:key>
          <xsd:keyref name="termFK" refer="termPK">
               <xsd:selector xpath="./term/include" />
               <xsd:field xpath="@idref" />
          </xsd:keyref>
     </xsd:element>
     <xsd:element name="available-languages">
          <xsd:complexType>
               <xsd:sequence maxOccurs="unbounded">
                    <xsd:element     ref="language" minOccurs="1" />
               </xsd:sequence>
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="language">
          <xsd:complexType>
               <xsd:attribute name="value" type="xsd:string" use="required" />
               <xsd:attribute name="default" type="xsd:boolean" use="optional" />
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="term">
          <xsd:complexType mixed="true">
               <xsd:choice minOccurs="0" maxOccurs="unbounded">
                    <xsd:any     namespace="http://www.w3.org/1999/xhtml"
                              processContents="skip" />
                    <xsd:element ref="translation" />
                    <xsd:element ref="include" />
               </xsd:choice>
               <xsd:attribute name="id" type="xsd:string" use="required" />
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="translation">
          <xsd:complexType mixed="true">
               <xsd:choice minOccurs="0" maxOccurs="unbounded">
                    <xsd:any     namespace="http://www.w3.org/1999/xhtml"
                              processContents="skip" />
                    <xsd:element ref="include" />
               </xsd:choice>
               <xsd:attribute name="language" type="xsd:string" use="required" />
          </xsd:complexType>
     </xsd:element>
     <xsd:element name="include">
          <xsd:complexType>
               <xsd:attribute name="idref" type="xsd:string" use="required" />
          </xsd:complexType>
     </xsd:element>
</xsd:schema>And here is a portion of my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<lexicon     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:noNamespaceSchemaLocation="http://www.jeromedroz.org/etc/lexicon.xsd
                 ./lexicon.xsd"
                xmlns:html="http://www.w3.org/1999/xhtml"
             xmlns="http://www.jeromedroz.org/etc/lexicon.xsd"
                name="lexicon">
     <available-languages>
          <language value="fr" default="true" />
          <language value="en" />
     </available-languages>
     <term id="include-this">
          <translation language="fr">inclure cela</translation>
                <translation language="en">include this</translation>
     </term>
        <term id="home">
          <html:a href="http://www.mysite.org">    
                     <translation language="fr">accueil</translation>
                     <include idref="include-this" />
                </html:a>
     </term>
</lexicon>The idref attribute of the include tag is a reference to the id attribute of the term tag. The problem is the key and keyref definition in the xsd file: for example, if a term appears more than once (with the same id) the parser should notice it because the key is duplicated, but it doesn't. I've tried several places for the key and keyref definition in the xsd file but I get an error like KeyRefOutOfScope nearly all the time. Do anybody have a solution?

Similar Messages

  • Validation issues with form (was: Validation)

    I am having validation issues with my form.  Even after I put in a name and last name it says the entries are invalid.  Could this be a hosting problem?  www.bussmanncomputers.net/Nx

    Below is mail form from my isp, which is Godaddy:
    This is the form that I am having some problems with configuring.
    <?php
    if ( !isset($_SERVER['SPI'])) {
            die();
    if (!isset($_SERVER['DOCUMENT_ROOT'])) {
            echo("CRITICAL: we seem to be running outside of the norm.\n");
            header("Location: http://".$_SERVER["HTTP_HOST"]."/");
            die("CRITICAL: Document root unavailable.\n");
    $request_method = $_SERVER["REQUEST_METHOD"];
    if($request_method == "GET") {
            $query_vars = $_GET;
    elseif ($request_method == "POST") {
            $query_vars = $_POST;
    reset($query_vars);
    function customsort($a,$b) {
            // $a is array for form vars, $b is comma seperated case sensitive field order
            // this is case sensitive -- good idea to hrc that.
            $data = array();
            if ( strstr($b,',') == FALSE )  {
                    $b = $b.",";
            $ordering = split(',',$b);
            foreach ($ordering as $orderitem) {
                    if ( ($orderitem != null) && ($orderitem != "") ) {
                            if (isset($a[$orderitem])) {
                                    $data[$orderitem] = $a[$orderitem];
            foreach ($a as $key=>$val) {
                    $data[$key] = $a[$key];
            return $data;
    function xmlentities($string) {
            return str_replace ( array('&', '"', "'", '<', '>'), array('&amp;', '&quot;', '&apos;', '&lt;', '&gt;'), $string);
    $t = date("U");
    $formhomedir = preg_replace('/.*\/home\/content/','',$_SERVER['DOCUMENT_ROOT']);
    $formhomedir = explode('/',$formhomedir);
    if (count($formhomedir) <= 4) {
            $formhome="/home/content/".$formhomedir[1]."/".$formhomedir[2]."/data/";
    else {
            $formhome="/home/content/".$formhomedir[1]."/".$formhomedir[2]."/".$formhomedir[3]."/".$f ormhomedir[4]."/data/";
    $file_order = ".default";
    $file_format = ".text";
    $file_interval = ".15m";
    $field_order = "";
    if (isset($query_vars['form_order'])) {
            if ($query_vars['form_order'] != "alpha") {
                    $field_order=$query_vars['form_order'];
                    $file_order=".custom";
                    $query_vars = customsort($query_vars,$field_order);
            else {
                    switch ($query_vars['form_order']) {
                            case "alpha":
                                    uksort($query_vars,'strnatcasecmp');
                                    $file_order=".alpha";
                            break;
                            default:
                                    $file_order=".default";
                            break;
    if (isset($query_vars['form_format'])) {
            switch ($query_vars['form_format']) {
                    case "csv":
                            $file_format = ".csv";
                    break;
                    case "html":
                            $file_format = ".html";
                    break;
                    case "xml":
                            $file_format = ".xml";
                    break;
                    case "text":
                    case "default":
                    default:
                            $file_format = ".text";
                    break;
    if (isset($query_vars['form_delivery'])) {
            switch ($query_vars['form_delivery']) {
                    case "hourly":
                            $file_interval = ".60m";
                    break;
                    case "hourly_digest":
                            $file_interval = ".60mc";
                    break;
                    case "daily":
                            $file_interval = ".24h";
                    break;
                    case "daily_digest":
                            $file_interval = ".24hc";
                    break;
                    case "digest":
                            $file_interval = ".15mc";
                    break;
                    case "default":
                    default:
                            $file_interval = ".15m";
                    break;
    $file = $formhome."form_".$t.$file_order.$file_format.$file_interval;
    $fp = fopen($file,"w");
    reset($query_vars);
    switch ($file_format) {
            case ".csv":
                    $csvkeys = "";
                    $csvvals= "";
                    $firsttime = "";
                    while (list ($key, $val) = each ($query_vars)) {
                            if ( ($key == "form_order") ||
                                    ($key == "form_format") ||
                                    ($key == "form_delivery") ||
                                    ($key == "redirect") ) {
                            else {
                                    if ($csvkeys != "") {
                                            $firsttime=",";
                                    $tmpkey=escapeshellcmd($key);
                                    $csvkeys = $csvkeys.$firsttime."'".$tmpkey."'";
                                    $tmpval=escapeshellcmd($val);
                                    $csvvals = $csvvals.$firsttime."'".$tmpval."'";
                    fputs($fp,"$csvkeys\n");
                    fputs($fp,"$csvvals\n");
            break;
            case ".html":
                    fputs($fp,"<table border=\"1\" cellspacing=\"1\" cellpadding=\"2\">\n");
            break;
            case ".xml":
                    fputs($fp,"<form>\n");
            break;
    reset($query_vars);
    while (list ($key, $val) = each ($query_vars)) {
            if ($key == "redirect") {
                    $landing_page = $val;
            if ( ($key == "form_order") ||
                    ($key == "form_format") ||
                    ($key == "form_delivery") ||
                    ($key == "redirect") ) {
            else {
                    switch ($file_format) {
                            case ".html":
                                    fputs($fp,"\t<tr>\n");
                                    fputs($fp,"\t\t<td><b>$key</b></td>\n");
                                    fputs($fp,"\t\t<td>$val</td>\n");
                                    fputs($fp,"\t</tr>\n");
                            break;
                            case ".csv":
                                    // content is already output
                            break;
                            case ".xml":
                                    fputs($fp,"\t<field>\n");
                                    fputs($fp,"\t\t<fieldname>".xmlentities($key)."</fieldname>\n");
                                    fputs($fp,"\t\t<fieldvalue>".xmlentities($val)."</fieldvalue>\n");
                                    fputs($fp,"\t</field>\n");
                            break;
                            case ".text":
                            default:
                                    fputs($fp,$key.": ".$val."\n");
                            break;
    switch ($file_format) {
            case ".html":
                    fputs($fp,"</table>\n");
            break;
            case ".xml":
                    fputs($fp,"</form>\n");
            break;
    fclose($fp);
    if ($landing_page != "") {
            header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
    else {
            header("Location: http://".$_SERVER["HTTP_HOST"]."/");
    ?>

  • Xerces Validation Issues with Honour All schema Locations

    Way back in 2009/2010 there was a bug - 284272 - that was never updated with Xerces information about validation. We have a similar issue in Luna and Mars with the WTP validation framework (with Xerxes at the center) and I'm wondering if it's due to Xerces 2.9 or something else.
    I'm not a savvy XSD guy, but the issues detailed in 284272 still occur for us with certain schema combinations. We're encountering it specifically with the JBoss/SwitchYard project and the SCA schemas we extend for the SwitchYard runtime.
    The following error is displayed in the Problems tab:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'sca:interface.java'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":interface, "http://docs.oasis-open.org/ns/opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected. switchyard.xml src/main/resources/META-INF line 7 XML Problem
    Can someone revisit 284272 and let me know if this is indeed a Xerxes issue under the covers with the example included in the bug? It's not our example, but has the same general problem.
    I just don't want to open a duplicate of 284272 without knowing more about how the Honour All Schema Locations stuff works under the covers and if it is indeed caused by Xerces - indeed if it might be fixed by an update to Xerces further down the line (they're up to 2.11 and there was a 2.9.1 it looks like we might be able to more simply move to if it's fixed there).
    Thanks all!
    --Fitz

    I think this is the odata4 that you need for 7.3
    SCA
    ODATACXFEXT11_0-10012140.SCA
    SP11 for SAP ODATA4J+CXF-REST LIB 7.30
    0
    Info
    10352
    26.02.2014
    This might be the only package you need; it might be in your best interest to avoid manually downloading files and rely upon Solution Manager's MOpz feature to query your IdM system and let it track down all the needed packages.

  • Issue with xsd Data type mapping for collection of user defined data type

    Hi,
    I am facing a issue with wsdl for xsd mapping for collection of user defined data type.
    Here is the code snippet.
    sample.java
    @WebMethod
    public QueryPageOutput AccountQue(QueryPageInput qpInput)
    public class QueryPageInput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class QueryPageOutput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class Account_IO implements Serializable, Cloneable {
    protected ArrayList <AccountIC> fintObjInst = null;
    public ArrayList<AccountIC>getfintObjInst()
    return (ArrayList<AccountIC>)fintObjInst.clone();
    public void setfintObjInst(AccountIC val)
    fintObjInst = new ArrayList<AccountIC>();
    fintObjInst.add(val);
    Public class AccountIC
    protected String Name;
    protected String Desc;
    public String getName()
    return Name;
    public void setName(String name)
    Name = name;
    For the sample.java code, the wsdl generated is as below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="SimpleService"
    targetNamespace="http://example.org"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    <xs:schema version="1.0" targetNamespace="http://examples.org" xmlns:ns1="http://example.org/types"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://example.org/types"/>
    <xs:element name="AccountWSService" type="ns1:accountEMRIO"/>
    </xs:schema>
    <xs:schema version="1.0" targetNamespace="http://example.org/types" xmlns:ns1="http://examples.org"
    xmlns:tns="http://example.org/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://examples.org"/>
    <xs:complexType name="queryPageOutput">
    <xs:sequence>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="accountEMRIO">
    <xs:sequence>
    <xs:element name="fIntObjectFormat" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageType" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageId" type="xs:string" minOccurs="0"/>
    <xs:element name="fIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fOutputIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fintObjInst" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="queryPageInput">
    <xs:sequence>
    <xs:element name="fPageSize" type="xs:string" minOccurs="0"/>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    <xs:element name="fStartRowNum" type="xs:string" minOccurs="0"/>
    <xs:element name="fViewMode" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.org" xmlns:ns1="http://example.org/types">
    <import namespace="http://example.org/types"/>
    <xsd:complexType name="AccountQue">
    <xsd:sequence>
    <xsd:element name="arg0" type="ns1:queryPageInput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQue" type="tns:AccountQue"/>
    <xsd:complexType name="AccountQueResponse">
    <xsd:sequence>
    <xsd:element name="return" type="ns1:queryPageOutput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQueResponse" type="tns:AccountQueResponse"/>
    </schema>
    </wsdl:types>
    <wsdl:message name="AccountQueInput">
    <wsdl:part name="parameters" element="tns:AccountQue"/>
    </wsdl:message>
    <wsdl:message name="AccountQueOutput">
    <wsdl:part name="parameters" element="tns:AccountQueResponse"/>
    </wsdl:message>
    <wsdl:portType name="SimpleService">
    <wsdl:operation name="AccountQue">
    <wsdl:input message="tns:AccountQueInput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    <wsdl:output message="tns:AccountQueOutput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SimpleServiceSoapHttp" type="tns:SimpleService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="AccountQue">
    <soap:operation soapAction=""/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SimpleService">
    <wsdl:port name="SimpleServicePort" binding="tns:SimpleServiceSoapHttp">
    <soap:address location="http://localhost:7101/WS-Project1-context-root/SimpleServicePort"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    In the above wsdl the collection of fintObjInst if of type xs:anytype. From the wsdl, I do not see the xsd mapping for AccountIC which includes Name and Desc. Due to which, when invoking the web service from a different client like c#(by creating proxy business service), I am unable to set the parameters for AccountIC. I am using JAX-WS stack and WLS 10.3. I have already looked at blog http://weblogs.java.net/blog/kohlert/archive/2006/10/jaxws_and_type.html but unable to solve this issue. However, at run time using a tool like SoapUI, when this wsdl is imported, I am able to see all the params related to AccountIC class.
    Can some one help me with this.
    Thanks,
    Sudha.

    Did you try adding the the XmlSeeAlso annotation to the webservice
    @XmlSeeAlso({<package.name>.AccountIC.class})
    This will add the schema for the data type (AccountIC) to the WSDL.
    Hope this helps.
    -Ajay

  • Spry validation issue with submit button

    Hi,
    I'm new to Spry but am having an issue getting it to work at all.  I created a very simply form (i.e. table with Spry text field and submit button).  I've read many articles and been to several forums, but I can't seem to find the issue I'm having.  Basically, when I go to preview the page in a browser, the table with the Spy text field and submit button comes up fine, but when I hit the submit button, I see the page refresh and any values I had in the text field disappear, but nothing ever comes up saying "A value is required," which is what I'm looking for. This happens even if I don't have any values in the text field.  Below are images of what I'm describing and also the code.  I verified that the "Required" check box is checked in the SpryTextField and the submit button action is selected to "Submit Form."  My setup is Win 7, DW6, & XAMPP.  Any help you can provide would be greatly appreciated.
    Before Submit Button pressed:
    Browser after button pressed: (same as above but no message saying "A value is required.")
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    test
    <table width="600" border="1">
      <tr>
        <td><form id="form1" name="form1" method="post" action="">
          <span id="sprytextfield1">
          <label for="test"></label>
          <input type="text" name="test" id="test" />
          <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
        </form></td>
      </tr>
      <tr>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
      </tr>
      <tr>
        <td><form id="form2" name="form2" method="post" action="">
          <input type="submit" name="submit" id="submit" value="Submit" />
        </form></td>
      </tr>
      <tr>
        <td> </td>
      </tr>
    </table>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "email");
    </script>
    </body>
    </html>

    Do yourself a big favor and don't waste time with Spry Validation.  Most modern browsers support HTML5 forms with the required attribute. 
    If you must placate older browsers, use jQuery validate script.  It's lightweight and works when HTML5 support is missing.  You can see an example below. If you hit submit with empty form fields, the required fields pop-up with messages.  View source in browser to see the code. 
    HTML5 Form with jQuery Validation
    Nancy O.

  • Problem validating XML with XSD

    Hi everyone. I have an xsd schema and I want to validate some XML doc with the schema using SAX parser.
    The user make the xml and then upload it to the server.
    I want to enable client side validation but, for security reasons, I want also to validate this document when it's uploaded to the server.
    The schema called ContentSchema.xsd
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         targetNamespace="www.mysite.com/Content" xmlns="www.mysite.com/Content">
         <xs:element name="content">
              <xs:complexType>
    A document produced by the client starts in this way:
    <?xml version="1.0" encoding="UTF-8"?>
    <p:content xmlns:p="www.mysite.com/Content" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="www.mysite.com/Content ContentSchema.xsd">
    in this way users can validate the XML doc before uploading. If the XSD is in the same folder of the uploaded XML the validation is ok.
    The problem is that, on the server, I've stored the xsd file in a folder and I want the SAX parser to use this xsd to validate the XML. Even I pass the complete URI of the file to the parser, it won't work:
    SAXParserFactory spf = SAXParserFactory.newInstance();
              spf.setValidating(true);
              spf.setNamespaceAware(true);
              spf.setFeature("http://apache.org/xml/features/validation/schema",true);
              spf.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
              SAXParser sp=spf.newSAXParser();
              sp.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", schemaURL );
    I set the schemURL with setProperty method but it's like the parser is looking for the XSD in the URL declared in the XML doc and not in the URI I specify. Anyone can help me?
    Thank you very much

    You will have to associate the schema with the namespace, like in your xsi:schemaLocation attribute.
    Try something like this:
    sp.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "www.mysite.com/Content "+schemaURL);

  • 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);

  • 10.1.3.3 JDev web service client proxy: Issue with XSD:anySimpleType

    Hi,
    One of our Web services XSD elementss has "anySimpleType" as the type:
    <xsd:element name="Value" type="xsd:anySimpleType" minOccurs="0" nillable="true"/>
    The client proxy is generated using JDev 10.1.3.3. We observed that the corresponding Java object is created with "String" data type:
    protected java.lang.String value;
    exp.setValue("100");
    We need to be able to pass arguments with other simple types as well (E.g. Decimal). We tried changing the auto generated code, but weren't successful.
    Any pointers in this regard are much appreciated.
    Thanks,
    Phani

    Hi all,
    can anyone please respond to my issue. Its sort of urgent.
    thanks,

  • Feed Has No Episodes & Validation Issues with RSS Feed

    Hello! I am beyond my wits end..having many issues getting this podcast submitted and never had such issues before. Any step-by-step help would be GREATLY appreciated!!
    Here is my feedburner: http://feeds.feedburner.com/High-achievingWomensBlogazine
    And here is the page where I have followed the instructions for the audio player and files: http://www.highachievingwomen.biz/podcasts/high-achieving-womens-blogazine-podca sts/
    Is there something I am missing for this feed to be picking up my audio files?
    (Note: since I am using feedburner, I did install the Plugins (Audio player & FeedSmith) that they recommend to use with their system as well)
    And here is what I get when I submit the RSS for validation:
    Congratulations!
    This is a valid RSS feed.
    Recommendations
    This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
    line 14, column 1689: Misplaced Item (10 occurrences) [help]... nt &amp; Marketing" /></itunes:category><item>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/High-achievingWomensBlogazine" /><feedburner:info uri="high-achievingwomensblogazine" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:copyright>© 2011 Dr. Laureen Wishom</media:copyright><media:thumbnail url="http://www.highachievingwomen.biz/wp-content/uploads/2010/01/LW.framed.medium.jpg" /><media:keywords>Branding,Identity,Tips,Coaching,Entrepreneurs,Laureen,Wishom,Marketplace,Positioning,Small,Business,Owners,Women,Entrepreneurs</media:keywords><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Business/Management &amp; Marketing</media:category><itunes:owner><itunes:email>[email protected]</itunes:email><itunes:name>Dr Laureen Wishom</itunes:name></itunes:owner><itunes:author>Dr Laureen Wishom</itunes:author><itunes:explicit>no</itunes:explicit><itunes:image href="http://www.highachievingwomen.biz/wp-content/uploads/2010/01/LW.framed.medium.jpg" /><itunes:keywords>Branding,Identity,Tips,Coaching,Entrepreneurs,Laureen,Wishom,Marketplace,Positioning,Small,Business,Owners,Women,Entrepreneurs</itunes:keywords><itunes:subtitle>Global Association of High-Achieving Women</itunes:subtitle><itunes:summary>This association is designed to gift the members with the tools and techniques to gain a competitive edge in the marketplace and assist the members in moving up, moving out or changing directions with ease, purpose and clarity.</itunes:summary><itunes:category text="Business"><itunes:category text="Management &amp; Marketing" /></itunes:category><item>
    Thank you!!

    Your feed has no media files referenced. Your web page has embedded audio players: these won't work in the feed. You need direct links to the media files, which should be mp3 or m4a, not rm, swf or wma. These links have to be contained in an 'enclosure' tag for each episode.
    This page eplains the basics of making a podcast and includes a sample basic feed soi you can see what I'm talking about:
    http://rfwilmut.net/pc
    I'm not suggesting you should write your own feed, but the page will tell you what to look for in a feed.
    You're using Wordpress: it's not really generating a podcast feed. You may need to add the PodPress plugin - I'm not sure whether you can get a podcast feed out of WordPress by itself - I'm afraid I can't advise on this.
    You can ignore the FeedValidator comment - it's only because you have the 'item' tag at the end of a line, and this doesn't matter.

  • Data Validation issue with Standard Extraction

    Hi Experts,
    I have a requirement to publish a report in BI from ECC, all the details are coming from this DataSource : 2LIS_02_ITM.
    This particular DataSource have the many fields which are from the following tables
    EKKO
    EKPO
    MARA
    EKBE
    I tried replicating the DataSource in BI and created transformation extracted full data.The number of record the DSO (0PUR_O01) has is 27910.
    I checked with the ECC tables. And the number of records they have are
    EKKO -   79129
    EKPO -  250502
    MARA -   40950
    EKBE - 1447470 
    I just don't know how do I check whether BI data is correct with ECC.
    Can anyone please tell me how do I reconcile the data.
    Thanks

    Hi,
    you have to check the number of records for the datasource in RSA3 transaction.
    Also, check the start routine at transformation level, as well as the selections if you have loaded.
    Hope this helps,
    Regards,
    Rama Murthy.

  • Issue with back end validation in jsf 2.0

    I am upgrading my apps to jsf2.0 and I came across something that I hope you have already solved.
    In jsf 1.1 action methods returned a string. If that string was NOT mapped as a navigation in faces-config.xml, then it just rerendered the active page. this made doing back end validation easy because I could add messages to the faces context and when the active page rerendered the validation messages would get displayed and no one was the wiser than it was done on the back end instead of on the front end.
    In jsf 2.0 I get null pointers if I return a string that is NOT mapped as a navigation. So I changed the code to return a string that is mapped as a navigation for that page when there is a validation error. but that is treating it like a new request and not a rerender so the validation messages I added to the faces context are not there when the page renders.
    if i test submit a form that has only front end validation then it works fine and the validation messages are correctly shown.
    any suggestions?

    In 11.2.0.3 you are unlikely to see the various truncate/drop issues relating to large numbers of small extents - unless you use dictionary managed tablespaces.
    There are a couple of possible threats with small extents and highly concurrent inserts with ASSM that might be a temporary problem when the object size is small. There may still be some issues with large uncommitted inserts or deletes making other session's work very hard to identify free blocks until the large transaction has committed - these things can be hard to test.
    There may still be a couple of inefficiencies with parallel query and small extents, although parallel CTAS did have a (possibly temporary) hack to allocate immediate large extents to work around some of the silly details.
    Really you need to think through your requirements and them model them on your system - some of the anomalies have changed several times over the last three years.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Now on Twitter: @jloracle

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • XML Validation with XSD in java mapping

    Hi experts,
    I have created an interface to send differents messages between bussines system, the bussiness system receiver is put in the message, to get this value I have a configuration file indicating the path of this field for each message type. In a java mapping I transform the message sent in this structure:
    <document>
    <message>HERE THE MESSAGE AS STRING</message>
    <parameters>
    <sender>HERE SENDER BUSSINESS SYSTEM</sender>
    <receiver>HERE RECEIVER BUSSINESS SYSTEM</receiver>
    </parameters>
    </document>
    the messaging interface works fine, but now I have to validate the XML vs XSD. I need doing in a java mapping because the messaging interface send the message and a email to sender in error case.
    To do this validation I have implemented two java mappings that works fine in my local, the first way is with class Validator of java 5, but my system PI 7.1 return an error with this class. The second way is with SAX parse:
    String schema = "XXXXXxsd";
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setNamespaceAware(true);
    docBuilderFactory.setValidating(true);
    docBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage","http://www.w3.org/2001/XMLSchema");
    InputStream is = this.getClass().getClassLoader().getResourceAsStream(schema);
    docBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",is);
    in my local works fine but in PI always return OK never fail.
    For this moment the schema is hardcoded to do proofs, in the future will be loaded from my configuration file.
    Any idea?
    Thanks in advance
    Jose

    hi Jose,
    PI 7.1 has a built in feature available called XML vaidations ..
    your source xml can be validated against a XSD placed at a specific location on the PI server..
    validation can be performed at adapter/integration engine
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1?quicklink=index&overridelayout=true

  • How to implement the schema validation with XSD in adapter module

    Dear All,
    I am trying to develop a EJB as the file adapter mudule.
    Please guide me how to implement the schema validation of the source message with XSD.
    Or provide me the relative resources about this task.
    Thanks & Regards,
    Red
    Edited by: Grace Chien on Nov 19, 2008 8:23 AM

    Hi Grace,
    You can do the xml scema validation in PI7.1 version directly.
    To develop the adapter module for xml schema validation
    Validating messages in XI using XML Schema
    Schema Validation of Incoming Message
    Regards
    Goli Sridhar

  • Issue with FI Validation check Screen

    Hello Friends,
    I am having an issue with creating FI validation, specifically the check tab. I need to input BSEG-GSBER = 'EES', but I dont see BSEG in the list of structures. How can I add it?
    Thanks.
    Zack

    Hi,
    I have asked to check whether the BSEG structure is allowed to be used in the Pre-requisits part of the validation or not.
    Also check that you are defining the validation step at level 2 (Line Item level) or at level 3 (Complete Document Level).
    As level 1 (Header Level) does not allow the BSEG structure.
    Regards,
    Gaurav

Maybe you are looking for

  • How many applications can I run simultaneously?

    I just bought a new MacBook Air after owning a white Macbook for the last four years. I used to push that pretty hard, but I feel I'm still habituated towards quitting applications when I'm done with them, rather than keeping everything open. With th

  • E 72 GPS and E-mail problem after firmware upgrade...

    Hi - to all the gurus out there, 1. i upgraded my firmware to 31.023. Now My GPS (whether using Ovi Maps or Google Maps) locks only at home ( probably the place of my last GPS lock before the upgrade- my guess). Tried many times but it simply refuses

  • Created pages in SP 2013 Online and they are not showing up in SPD 2013

    Hi Am reposting this question as the suggested solution did not work :-( I created pages in SP Online 2013, on the public side, as suggested I did find where pages had to be approved, they were I did see others that were marked as "draft" they were n

  • How to compare two files in SAP

    Hi All, I have downloaded the contents of a custom table in two files and saved in the uncoverted format, now I want to comapre the contents of these files and see if there is any difference in these files or not. So is there any utility in SAP which

  • Moving Numbers Tables to Pages '08

    Hi guys, I've used Numbers to create some tables that were larger than 8.5x11. To fit them on a single sheet, I used the Content Scale slider. Works like a charm. Now, when I go to copy one of these tables to put it in Pages, I get the original, full