Package org.jibx.schema.validation

Examples of org.jibx.schema.validation.ValidationContext.addWarning()


           
            // check if nonamespace attribute is in the allowed set
            String name = uctx.getAttributeName(i);
            if (uctx.getAttributeNamespace(i).length() == 0) {
                if (attrs.indexOf(name) < 0) {
                    vctx.addWarning("Undefined attribute " + name, this);
                }
            }
        }
    }
   
View Full Code Here


            } else if (!other) {
               
                // warn on non-WSDL attribute present where forbidden
                ValidationContext vctx = (ValidationContext)ictx.getUserContext();
                String qname = UnmarshallingContext.buildNameString(ns, name);
                vctx.addWarning("Non-WSDL attribute not allowed " + qname, ictx.getStackTop());
               
            }
        }
    }
   
View Full Code Here

     */
    private void setNameConverter(NameConverter nconv, IUnmarshallingContext ictx) {
        if (nconv != null) {
            if (m_nameConverter != null) {
                ValidationContext vctx = (ValidationContext)ictx.getUserContext();
                vctx.addWarning("Repeated 'name-converter' element overrides previous setting", new ProblemLocation(ictx));
            }
            m_nameConverter = nconv;
        }
    }

View Full Code Here

               
                // check if nonamespace attribute is in the allowed set
                String name = ctx.getAttributeName(i);
                if (ctx.getAttributeNamespace(i).length() == 0) {
                    if (s_allowedAttributes.indexOf(name) < 0) {
                        vctx.addWarning("Undefined attribute " + name, ctx.getStackTop());
                    }
                }
            }
           
            // skip content, and create and return object instance
View Full Code Here

                                Constructor cons = clas.getConstructor(new Class[] { prior.getClass() });
                                try {
                                    return cons.newInstance(new Object[] { prior });
                                } catch (IllegalArgumentException e) { /* ignore failure */
                                } catch (InvocationTargetException e) {
                                    vctx.addWarning("Failed passing existing name converter to constructor for class " +
                                        cname + ": " + e.getMessage(), new ProblemLocation(ctx));
                                }
                               
                            } catch (SecurityException e) { /* ignore failure */
                            } catch (NoSuchMethodException e) { /* ignore failure */ }
View Full Code Here

           
            // check if nonamespace attribute is in the allowed set
            String name = uctx.getAttributeName(i);
            if (uctx.getAttributeNamespace(i).length() == 0) {
                if (attrs.indexOf(name) < 0) {
                    vctx.addWarning("Undefined attribute " + name, this);
                }
            }
        }
    }
   
View Full Code Here

            } else if (!extra) {
               
                // warn on non-schema attribute present where forbidden
                ValidationContext vctx = (ValidationContext)ictx.getUserContext();
                String qname = UnmarshallingContext.buildNameString(ns, name);
                vctx.addWarning("Non-schema attribute not allowed " + qname, ictx.getStackTop());
               
            }
        }
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.