Forum Discussion

erki's avatar
erki
Occasional Contributor
16 years ago

[SOLVED]Update of interface failed

I'm trying to update my WSDL, but update fails :

Fri Mar 19 14:20:41 EET 2010:ERROR:An error occured [error: cos-element-consistent: Type of '_x003C_CustomValidationData_x003E_k__BackingField@http://schemas.datacontract.org/2004/07/pr.Common.Schemas.Generated' is inconsistent with another element with the same name in this content model.], see error log for details
Fri Mar 19 14:20:41 EET 2010:WARN:Error: error: cos-element-consistent: Type of '_x003C_CustomValidationData_x003E_k__BackingField@http://schemas.datacontract.org/2004/07/pr.Common.Schemas.Generated' is inconsistent with another element with the same name in this content model.
Fri Mar 19 14:20:41 EET 2010:WARN:Error: error: cos-element-consistent: Type of 'BirthDate@http://schemas.datacontract.org/2004/07/pr.Common.DTO.Person' is inconsistent with another element with the same name in this content model.
Fri Mar 19 14:20:41 EET 2010:WARN:Error: error: cos-element-consistent: Type of 'BirthDate@http://schemas.datacontract.org/2004/07/pr.Common.DTO.Person' is inconsistent with another element with the same name in this content model.
Fri Mar 19 14:20:41 EET 2010:ERROR:An error occured [com.eviware.soapui.impl.wsdl.support.xsd.SchemaException], see error log for details
Fri Mar 19 14:20:41 EET 2010:ERROR:Loading of definition failed for [http://pr.wm.int/UnitTest/RService.svc?wsdl]; com.eviware.soapui.impl.wsdl.support.xsd.SchemaException: Error loading schema types
Fri Mar 19 14:20:41 EET 2010:ERROR:An error occured [Error loading schema types], see error log for details
Fri Mar 19 14:20:41 EET 2010:ERROR:Error loading schema types from http://pr.wm.int/UnitTest/RService.svc?wsdl, see log for details

------------
Fri Mar 19 14:22:44 EET 2010:ERROR:org.apache.xmlbeans.XmlException: error: cos-element-consistent: Type of '_x003C_CustomValidationData_x003E_k__BackingField@http://schemas.datacontract.org/2004/07/pr.Common.Schemas.Generated' is inconsistent with another element with the same name in this content model.
   org.apache.xmlbeans.XmlException: error: cos-element-consistent: Type of '_x003C_CustomValidationData_x003E_k__BackingField@http://schemas.datacontract.org/2004/07/pr.Common.Schemas.Generated' is inconsistent with another element with the same name in this content model.
    at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
    at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
    at org.apache.xmlbeans.XmlBeans.compileXsd(XmlBeans.java:553)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.buildSchemaTypes(SchemaUtils.java:275)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.loadSchemaTypes(SchemaUtils.java:185)
    at com.eviware.soapui.impl.support.definition.support.XmlSchemaBasedInterfaceDefinition.loadSchemaTypes(XmlSchemaBasedInterfaceDefinition.java:79)
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlInterfaceDefinition.load(WsdlInterfaceDefinition.java:52)
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:66)
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:30)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:264)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:44)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:230)
    at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
    at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:140)
    at java.lang.Thread.run(Unknown Source)
----------
Can anybody assume what could be the problem?
  • erki's avatar
    erki
    Occasional Contributor
    thanks for your answer, i already solved it.

    The problem was : i had i class called Person and inherited class VerdictPerson (from person) -> and for class person i had defined class CustomValidation and property CustonValidationData -> and VerdictPerson also had the same class and property -> code compiled, program worked with no problem, but soapUI didnt handle the WSDL. So i simply renamed some classes.
    So you should follow that you dont make this mistake, and if you get into this situation, you should rename the inherited class CustomValidation to CustomValidation[inherited_class_name] or something like that (same with property)

    sorry about my english.

    ----
    Schema Component Constraint: Element Declarations Consistent
    If the {particles} contains, either directly, indirectly (that is, within the {particles} of a contained model group, recursively) or ·implicitly· two or more element declaration particles with the same {name} and {target namespace}, then all their type definitions must be the same top-level definition, that is, all of the following must be true:
    1 all their {type definition}s must have a non-·absent· {name}.
    2 all their {type definition}s must have the same {name}.
    3 all their {type definition}s must have the same {target namespace}.

    reference : http://www.w3.org/TR/xmlschema-1/#cos-e ... consistent